A method for object detection that utilizes a patterned background.
Patterned backgrounds are chosen such that each reference image analyzed
will have both light and dark pixels. The method calculates the
difference between the expected value for the light pixels and the
expected value of the dark pixels in the reference image. This difference
is used to chose a threshold value. The difference in expected values for
the corresponding pixels in a live image is calculated and compared to
the threshold value. If the difference in expected values of the live
image are less than the threshold value, object detection is indicated.