This demo applies the SAD (Sum of absolute differences) method to detect the motion in four distinct quadrants of a video sequence.
In this demo we compute the SAD values, which represent the absolute value of the difference between the current and previous image frames. When these SAD values exceed a threshold value, motion is detected and the affected quadrant is highlighted in red.
open_system('vipmotion_all.mdl'); sim('vipmotion_all.mdl',20);
Video and Image Processing Blockset, V1.0