1. An image processing apparatus that obtains an output image by performing image processing on an input image, comprising: a dividing unit configured to divide the input image into a plurality of predetermined object areas; a determination unit configured to compare feature values indicative of features of the respective object areas to thereby obtain a difference or a ratio between the feature values, and determine whether or not the difference or the ratio is within a predetermined range; and an image processing unit configured, when it is determined by said determination unit that the difference or the ratio is within the predetermined range, to perform gradation correction on each of the object areas to thereby form the output image.