vipmotion.mdl
Open this model

# Motion Detection

The sum of absolute differences (SAD) method is a popular technique for motion detection in video processing. This demo applies the SAD method independently to four quadrants of a video sequence. If motion is detected in a quadrant, the demo highlights the quadrant in red.

## Contents

- Demo Model
- Motion Detection Results

## Demo Model

The following figure shows the Motion Detection demo model:

## Motion Detection Results

If you double-click the Switch block so that the signal is connected to the SAD side, the Video Viewer block displays the SAD values, which represent the absolute value of the difference between the current and previous image. When these SAD values exceed a threshold value, the demo highlights the quadrant in red.

Note that the difference image itself may be viewed, in place of the original intensity image, along with the red motion highlighting, which indicates how the SAD metric works.