1. An image processing apparatus for identifying an object in a document image, which has been scanned by a scanning unit, as well as a mark that has been added to the document, and storing image data of the object in a storage unit upon classifying the image data in accordance with the mark identified, said apparatus comprising: an extraction unit adapted to extract information representing a region position of the object and information representing a region position of the mark as an object list and mark list, respectively, from the document image that has been scanned by the scanning unit; a search unit adapted to search for information representing the region position of a mark in the mark list for which the distance is the shortest with respect to information representing a region position of each object in the object list; and a search control unit which, in a case where the mark list contains information representing the region position of a mark for which there is no shortest distance with respect to information representing the region position of any object in the object list, is adapted to cause said search unit to search for information representing the region position of an object in the object list for which the distance is the shortest with respect to information representing the region position of the mark, and to decide that the information representing the region position of the object is to be associated, exclude the information representing the decided region positions from the respective lists and execute said search unit recursively.