Specifications

∑∑
=
yx
yxSyxS
N
MAD ),(),(
1
21
The x, y are the row and column which is a pointer of dot in the image,
the N is total dots in the image, the S1 and S2 are image1 and image2,
therefore the MAD is the sum of the difference of every dot in image to
divide the total dots in the image.
The motion detection occurs with four frames around, if the 12 images
grabbed in 1 second by M318B, the motion detection then occurs 3 times per
second. (The M318B grabs 11 images per sec.) .
Wait
Difference
Wait
Two-times
Difference
Motion
Detection
Yes
Yes
No
NO
Yes
N
o
Figure 25. The State Diagram of Motion Detection
Figure 25 shows the state diagram of motion detection, it has three
states which are:
State 1 : Wait Difference
The difference is occurred, if the absolute value of MAD is bigger than
1, this value was obtained from the characteristic of M318B webcam whose
MAD is sometimes not stable in some static frames. If the difference was
not occurred then the state would not change else the state would change to
the Double Difference stat.
State 2 : Double Difference
The double difference means the difference continuous occurs twice
that can avoid the grabbing image has error. If the double difference not
occurs, then back to state 1, or go to next state. In the other hand although
the motion detection need more two images to decide it, it only spends 1/3
sec. in reasonable time.
State 3 : Motion Detection
This state was keep by the motion detection, if motion does not be
45