Color balance correction value is calculated based on an average pixel
value of specific color pixels if an average hue of high luminance pixels
is not within a predetermined range in the vicinity of a specific
chromatic color (for example, skin color). This calculation may
additionally use a specific color pixel ratio as well as the average
pixel value of the specific color pixels. On the other hand, if the
average hue of high luminance pixels is within the predetermined range in
the vicinity of a specific chromatic color (for example, skin color), the
color balance correction value is calculated using the average pixel
value of the plurality of high luminance pixels, without using the
average pixel value of the specific color pixels.