1. An image processing apparatus comprising: an input unit for inputting image data; a detection unit that detects object images included in the input image data; a determination unit that determines an object attribute for each of the detected object images; a storage control unit that groups the detected object images based on the respective determined object attributes, and stores region information regarding the detected object images, corresponding to the groups, in association with the image data in a storage unit; a dividing determination unit that determines whether or not to divide the grouped object images; and a dividing unit that, if dividing is determined to be performed by the dividing determination unit, extracts an individual object image from the grouped object images.