1. An image processing apparatus, including at least one of a Central Processing Unit (CPU) or a Micro Processing Unit (MPU), implementing a first classification unit, a second classification unit and a division unit, comprising: the first classification unit configured to classify image data into a plurality of first areas based on a signal value of each pixel of the image data; the second classification unit configured to classify the image data into a plurality of second areas based on distance information; and the division unit configured to divide at least one of the plurality of first areas into a plurality of areas based on the plurality of second areas, wherein the division unit determines, in a case where two or more second areas overlap with one of the plurality of first areas, whether or not to divide the one of the plurality of first areas into the plurality of areas based on ratio of a planar dimension of at least one of the two or more second areas to a planar dimension of the one of the plurality of first areas.