Specifications

the usage of SDL_UpdateRect as following:
SDL_UpdateRect (pscreen, 0, 0, 0, 0);
Shut down SDL
Use SDL_Quit to shut down SDL.
SDL_Quit ();
3-4-4 Motion Detection
The motion detection is referenced with PHPMotionDetect[12], the
motion detection is on, if the grabbed image is different than the previous
image. Then some applications in top layer would be issued if the motion
detection is on, ex. auto recorder, notification. The following figure and
article was described in more detail:
Image 4
time
Image 1Image2Image3
MAD (3,4) MAD (1,2)
If ( |MAD1 - threshold|>1 ) and
( |MAD2 - threshold| > 1 ) then
Motion Detected !!
Image 5
Figure 24. Motion Detection with Double Difference
Figure 24 shows the motion detection with double difference, the
double difference is to prevent the error motion detection occurs with the
error image, because the M318B sometime grabbed error images. Using
MAD[13] (mean absolute difference) formula calculates the variance of
image1 with image2, show as following:
44