how to calculate threshold value in frame difference algorithm

조회 수: 5 (최근 30일)
Ayesha ayub
Ayesha ayub 2014년 8월 18일
댓글: Mohammedashraf Shaikh 2017년 4월 6일
i was studying frame difference algorithms and in every pdf it says find threshold value and didn't mention how can anyone tell me how
  댓글 수: 3
Ayesha ayub
Ayesha ayub 2014년 8월 19일
for motion detection i am using frame difference algorithm that is current frame-previous frame but this algorithm is comparing the frame difference with a threshold value. i saw a code where they took threshold 25 with no reason why
Image Analyst
Image Analyst 2014년 8월 19일
Because it worked for them. The value that "works" for you may be different, as I said in my Answer below.

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2014년 8월 18일
Subtract the frames. Be sure to cast to double before you do so to avoid clipping values less than zero. You might want to take the absolute value of the difference image. Then pick a threshold however you want. The lower the threshold, the more stuff you will get and the higher the threshold the fewer pixels will be selected. Choose the threshold to get just the pixels you want and no others. Thresholding may not do it - you may have to combine with other methods, like spatial operations that consider neighborhoods around each pixel, or shape, or whatever. It really depends on what you want to find.
  댓글 수: 3
Image Analyst
Image Analyst 2014년 8월 28일
Can you go ahead and officially "Accept" the answer then? Thanks in advance.
Mohammedashraf Shaikh
Mohammedashraf Shaikh 2017년 4월 6일
By frame differncing, I got the subtracted image, now how to get thresold and use thresold to detect activity

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by