Why do we care about the minimum here?

조회 수: 1 (최근 30일)
Andrew Killian
Andrew Killian 2021년 9월 4일
답변: Image Analyst 2021년 9월 4일
We have an example in class where are to detect a walking human through a series of continuous pictures/frames. The idea is that we compute the difference for each pixel in subsequent frames.
diff1 = abs(frame61 - frame62);
diff2 = abs(frame63 - frame62);
My understanding is that any pixel that is not equal to zero is where motion has been detected and where the human was walking. Pixel differences that equate to zero are places in the frames where nothing happened.
But then the next step says for each pixel, to find the smallest value from diff1 and diff2.
motion = min(diff1, diff2);
First of all, would this equate to a single value for each diff?
But also, when subtracting subsequent frames, wouldn't it just be any of the pixels that are not equal to zero?
Why do we care about the minimum?
  댓글 수: 1
Rik
Rik 2021년 9월 4일
I suspect this is done to suppress noise. By taking the minimum, you take the least amount of change of the two differences, so a high value indicates movement between 3 frames, instead of just 2.

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

답변 (1개)

Image Analyst
Image Analyst 2021년 9월 4일
No because there will be video noise so there might be no person moving there but due to noise there are non-zero values. You have to set a threshold, like 5 gray levels or something. See attached demo where I take differences.

Community Treasure Hunt

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

Start Hunting!

Translated by