In retrieval of a registered image that resembles an input image,
retrieval is performed accurately in a short period of time irrespective
of orientation of the input image. Specifically, there is disclosed an
information processing method for retrieving image data, which has a high
degree of similarity to input image data, from registered image data, the
method includes an area identification step (S402) of identifying a text
area and a non-text area in the input image data; a direction
identification step (S404) of recognizing text in the identified text
area and identifying orientation of the input image data based upon
orientation of the text recognized; a rotation step (S406) of rotating
the identified input image data to a prescribed orientation based upon
the orientation identified; and a retrieval step (S409) of retrieving
image data, which has a high degree of similarity to the input image data
after the rotation thereof, from the registered image data.