Why do we care about the minimum here?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Rik
am 4 Sep. 2021
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.
Antworten (1)
Image Analyst
am 4 Sep. 2021
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.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!