1. An information processing apparatus for retrieving image data, which has a high degree of similarity to entered input image data, from image data that has been registered, comprising: area identification unit adapted to identify a text area and a non-text area in the input image data; direction identification unit adapted to recognize text in the identified text area and identifying orientation of the input image data based upon orientation of the text recognized; rotation unit adapted to rotate the identified input image data to a prescribed orientation based upon the orientation identified; and retrieval unit adapted to retrieve image data, which has a high degree of similarity to the input image data after the rotation thereof, from the registered image data.