The present invention provides a method for detecting an object. The method includes
capturing a binary image of the object, and determining a projection of the binary
image to a first axis. The method further includes determining a difference between
a profile of a target object to the first axis and the projection at a plurality
of positions along the first axis, and detecting the object by determining if the
difference between the profile and the projection is less than a threshold at one
of the plurality of positions.