1. An image processing apparatus for recognizing at least the attitude of an object by comparing an input image of said object captured by imaging means with a teaching model of said object, comprising: a first teaching model constituted by direction data obtained when images of said object are captured from a plurality of directions so as to cover discretely the entire range of views that said object is able to take, and captured images corresponding to said direction data; a second teaching model constituted by direction data obtained when images of said object are captured from a plurality of directions, covering only a partial range of the views that said object is able to take at a narrower directional variation pitch than that of said first teaching model, and captured images corresponding to said direction data; first comparing means for comparing a first input image of said object captured by said imaging means with each image of said first teaching model; relative position and attitude modifying means of said imaging means for modifying the position and attitude of said object relative to said imaging means on the basis of the comparison result of said first comparing means so as to enter the range of views of said second teaching model; and second comparing means for comparing a second input image of said object captured by said imaging means in the modified relative position and attitude thereof, using said second teaching model.