Patent ID: 8891879

Claim:
An image processing apparatus, comprising at least a processor and memory, cooperating to function as: an obtaining unit configured to obtain an image including an object; an area setting unit configured to extract a plurality of boundary candidate points from the image, set a plurality of reference areas which include at least one of the plurality of boundary candidate points, divide each reference area into a plurality of small areas, and integrate, among the plurality of small areas within the same reference area, neighboring areas having similar feature amounts; a first reference area setting unit configured to set a first reference area from the plurality of reference areas; a first small area setting unit configured to set a first small area from a plurality of small areas included in the first reference area; a second reference area setting unit configured to set, from the plurality of reference areas, a second reference area which is similar to the first reference area with respect to shape; a second small area setting unit configured to set a second small area, from a plurality of small areas included in the second reference area; a determination unit configured to determine whether a feature amount of the first small area and a feature amount of the second small area are similar to each other; and a contour extraction unit configured to extract a contour of the object based on the determination result of the determination unit.