1. An image processing apparatus for specifying positions of a plurality of types of patterns from a target image on which the respective patterns are laid out at a given interval, comprising: a division unit that obtains a plurality of divided images by dividing the target image at the given interval so that the divided images do not overlap each other; a pile unit that piles up the plurality of divided images obtained by said division unit so as to obtain a piled image; a generating unit that generates a position alignment pattern by compositing the plurality of types of patterns; and a specifying unit that specifies positions of the plurality of types of patterns in the target image on the basis of the position alignment pattern and the piled image that is obtained by said pile unit.