A skin-tone image portion contained in an image is detected based upon the
shape of the image of a human face. An average value of each of RGB
values of pixels that constitute the skin-tone image portion detected is
calculated. If the distance between a skin-tone--blackbody locus and a
value that is the result of converting the RGB values obtained by
multiplying the average value by prescribed coefficients is less than a
prescribed value, these coefficients are adopted as coefficients for
multiplying the RGB values of each pixel constituting the image. By using
a value that is the result of converting, to a chromaticity value, the
RGB values obtained by multiplying the RGB values of each of the pixels
constituting the image by the prescribed coefficients, those pixels of
the image that have values belonging to a zone in the vicinity of a point
on a gray--blackbody locus that corresponds to a light-source color
temperature estimated based upon the skin-tone--blackbody locus are
treated as gray candidate pixels.