Patent ID: 6980685

Claim:
An object inspection method comprising: offline modeling of an object type; and runtime matching of an object corresponding to the object type; wherein runtime matching comprises: receiving an image having an object of the object type; performing a coarse search for the object; and performing a refined search for the object; wherein performing a coarse search comprises localizing the object from the image in accordance with a model; wherein performing a refined search comprises measuring the localized object; wherein localizing comprises: iteratively segmenting the object; and applying a moment transformation to the segmented object; and wherein iteratively segmenting the object comprises: selecting an initial estimate of a threshold by using the average gray-level of the 2n brightest pixels in the image, where n is the size of the model; segmenting the image into a background region and an object region in accordance with the threshold, with the pixels having a gray-level less than the threshold being assigned to the background region and all other pixels being assigned to the object region; calculating the mean gray-levels within the background and object regions, respectively; calculating a new threshold in accordance with the calculated mean gray-levels and the number of pixels in each region; repeating the above steps of segmenting, calculating gray-levels and calculating new thresholds until-convergence is reached; and obtaining the segmented object from the final pixels in the object region.