1. An image processing apparatus for obtaining a shape of a region of a processing target included in an image, comprising: an attribute obtaining unit configured to obtain a intensity distribution attribute of the region of the processing target; and a shape obtaining unit configured to obtain the shape of the region by a calculation method selected in accordance with the intensity distribution attribute.