Why do we care about the minimum here?

2 ビュー (過去 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