Patent ID: 8269898

Claim:
An image processing apparatus, comprising: a brightness detector configured to detect a brightness of each of pixels in an image; an average brightness calculator configured to divide the image into a plurality of domains and calculate an average brightness of each of the domains in accordance with the brightness of the pixels in each of the domains; an illumination component brightness calculator configured to calculate an illumination component brightness of each of pixels of the image, in accordance with the average brightness of the domain weighted by a distance from the domain including the pixel, and in accordance with the average brightness of the domain weighted by a distance from a domain in contact with the domain including the pixel; and a correcting module configured to correct a gain of each of the pixels in the image, in accordance with the illumination component brightness obtained by the illumination component brightness detector, wherein the average brightness calculator is configured to (i) divide the image into domains of a first size and calculate a first average brightness of each of the domains in accordance with the brightness of a pixel included in each of the domains, (ii) divide the image into a plurality of domains of a second size different in magnitude from the first size and calculate a second average brightness of each of the domains in accordance with the brightness of a pixel included in each of the domains, and (iii) synthesize the first average brightness and the second average brightness and output the synthesized average brightness as the average brightness.