The strategy in this research is to filter the moving
objects and then build the background, and the object
mask is created by background. The aim of the motion
mask level 1 is to set up the moving object mask for the
reference of background creation. The motion mask level 1
is only able to mask the moving object, and the motion
mask level 2 will contain the static foreign objects. We use
the inter-frame difference algorithm to find out the motion
region, and the difference is we use the three-framedifference
method that gets the pixel values of the
previous frame are subtracted from the current and the
following frame's pixel values, and the absolute value of
the values is taken. The purpose of the method is to extend
the area of motion because the object will affect its
surrounding pixels. The three-frame-difference method in
Pt(x, y) is illustrated in (3):