An image processing apparatus for positioning with accuracy higher than at an initially given position upon searching out of an image to be searched and positioning an object to be searched that is similar to a pre-registered image by use of a pattern model corresponding to the registered image, the apparatus comprising:
- an image input device for acquiring the registered image and the image to be searched;
- an image reducing device for reducing the image to be searched with a predetermined reduction ratio;
- an edge angle image creating device for computing an edge angle image including edge angle information with respect to each pixel constituting the image on the reduction-ratio image to be searched reduced by the image reducing device;
- an edge angle bit image creating device for transforming each pixel of the edge angle image, created by the edge angle image creating device, into an edge angle bit image expressed by an edge angle bit indicating an angle with a pre-defined fixed width;
- an edge angle bit image reducing device for performing, in order to create an edge angle bit reduced image reduced from the edge angle bit image, an OR operation on an edge angle bit of every pixel included in an OR operation region decided in accordance with a reduction ratio for reducing the edge angle bit image, to create an edge angle bit reduced image made up of reduced edge angle bit data representing each OR operation region;
- a coarse search device for performing a pattern search on a first edge angle bit reduced image created by the edge angle bit image reducing device by using as a template a pattern model for first coarse search created with a first reduction ratio with regard to a first-reduction-ratio image to be searched reduced by the image reducing device with the first reduction ratio, to find with first accuracy a first position and posture corresponding to the pattern model for first coarse search from the whole area of the first edge angle bit reduced image, and also performing a pattern search on a second edge angle bit reduced image created by the edge angle bit image reducing device by using as a template a pattern model for second coarse search created with a second reduction ratio that is not larger than the first reduction ratio and not smaller than unmagnification with regard to a second-reduction-ratio image to be searched reduced by the image reducing device into the second reduction ratio, to find with second accuracy that is higher than the first accuracy a second position and posture corresponding to the pattern model for second coarse search from a predetermined region of the second edge angle bit reduced image where the first position and posture are set as references;
- and
- the fine positioning device for arranging a pattern model so as to be superimposed on a third-reduction-ratio image to be searched, obtained by reducing as appropriate the image to be searched into a third reduction ratio that is not smaller than unmagnification and not larger than the second reduction ratio by use of the second position and posture of the third-reduction-ratio image to be searched, to find a corresponding edge point on the third-reduction-ratio image to be searched corresponding to a contour constituting the pattern model, regarding a relation between each contour and its corresponding edge point as an evaluation value, and performing fine positioning with third accuracy that is higher than the second accuracy such that an accumulated value of the evaluation values becomes minimal or maximal.