Patent ID: 8792016

Claim:
An image processing apparatus comprising: a sunlit-area-and-shaded-area separating unit that receives an input of image data and separates the image data into a sunlit area and a shaded area based on a feature value of the image data; an information obtaining unit that obtains sunlit information that is information about image processing appropriate for the sunlit area and shaded information that is information about image processing appropriate for the shaded area; and an image processing unit that performs at least one of image processing on the sunlit area according to the sunlit information and image processing on the shaded area according to the shaded information, wherein where a luminance value of a pixel in the image data is Y, a value of a red component of the pixel is R, a value of the blue component of the pixel is B, a first percent of slope set in advance is K, a first threshold value of luminance is Ythre, a second percent of slope used for identifying a sky area set in advance to be different from the first percent of slope is Ks, and a second threshold value of luminance used for identifying the sky area set to be different from the first threshold value is YthreS, the sunlit-area-and-shaded-area separating unit determines, as a pixel in the shaded area, a pixel that satisfies conditions of Y<K×B/R and Y<Ythre, and that does not satisfy conditions of Y<Ks×B/R and Y<YthreS, and the sunlit-area-and-shaded-area separating unit determines, as a pixel in the sunlit area, a pixel that is not determined to be a pixel in the shaded area.