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 adapted to divide the target image into a plurality of divided images of a size of the given interval; a pile unit adapted to pile up the plurality of divided images obtained by said division unit so as to obtain a piled image; and a specifying unit adapted to specify positions of the plurality of types of patterns in the target image on the basis of an alignment pattern obtained by compositing the plurality of types of patterns and the piled image obtained by said pile unit.