A method detects activity within a fixed view by comparing first and second images.
The first and second images respectively include a plurality of blocks, and each
of the blocks having a plurality of pixels. The method including: calculating an
average value A for each block of the second image, each of the average values
A is equal to an average of differences between pixels of one of the blocks of
the second image and pixels of a corresponding block of the first image; calculating
a mean difference B between average pixel values of the first and second images;
calculating a difference V between average value A and mean difference B for each
block of the second image, and selecting blocks of the second image that have corresponding
differences V greater than a threshold value; and determining whether there is
any object moving within the fixed view according to the selected blocks.