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 first determination unit that determines an object attribute for each of the detected object images; an addition unit that adds the determined object attribute to a corresponding object image; a second determination unit that determines, for an object image to which a “graph” or “image” attribute has been added, whether an object image to which a “caption” attribute has been added accompanies the object image to which a “graph” or “image” attribute has been added; and a storage control unit that for an object image having a “graph” or “image” attribute which is determined to be accompanied by an object image having a “caption” attribute, groups the object image having the “graph” or “image” attribute and the accompanying object image having the “caption” attribute, and stores region information regarding the grouped object images in association with the image data for the object images in a storage unit, and for an object image having a “graph” or “image” attribute which is determined not to be accompanied by an object image having the “caption” attribute, detects another object image included in the object image having the “graph” or “image” attribute by using the detection unit, and stores region information regarding the detected other object image in association with the image data for the detected object images in a storage unit.