Patent ID: 8244035

Claim:
An image processing apparatus comprising: a dividing unit configured to divide an image of a document into a plurality of areas, including a first area and a second area; a setting unit configured to set a direction based on input of a user for determining the second area, when associating the first and second areas as a continuous group, wherein the direction is a direction of character string included in the document or a direction orthogonal to the direction of character string; an area associating unit configured to specify, in a case where a plurality of areas neighbor the first area, an area in the direction set by the setting unit from among the plurality of areas neighboring the first area as the second area, and in a case where one area neighbors the first area, the one area as the second area regardless of the direction set by the setting unit, and associate the specified area with the first area as the continuous group; and a storage unit configured to store information of the associated areas.