The present application relates to an image processing device, an image processing method, a program, and an electronic device, and particularly to an image processing device, an image processing method, a program, and an electronic device that are suitable for use in extracting a skin region from a pickup image obtained by imaging a user, for example.
There is a skin recognition system that detects (recognizes) a skin region representing the skin of a human from a pickup image obtained by imaging a subject (see Yasuhiro Suzuki et al., IEEJ Transactions on Electronics, Information and Systems (proposition of a near-infrared multi-band skin detection method), Japan, 2007, Vol. 127, No. 4, for example).
In this skin recognition system, an LED (light emitting diode) for irradiating the subject with light of a wavelength λ1 (for example a near-infrared ray of 870 [nm]) and an LED for irradiating the subject with light of a wavelength λ2 (for example a near-infrared ray of 950 [nm]) different from the wavelength λ1 are made to emit light alternately.
Incidentally, the combination of the wavelengths λ1 and λ2 is for example a combination such that the reflectance when the skin of a human is irradiated with light of the wavelength λ1 is higher than the reflectance when the skin of the human is irradiated with light of the wavelength λ2 and such that the reflectance when a thing other than the skin of a human is irradiated with light of the wavelength λ1 is substantially the same as the reflectance when the thing is irradiated with light of the wavelength λ2.
In the skin recognition system, a first pickup image is picked up when the LED for applying light of the wavelength λ1 irradiates the subject with light of the wavelength λ1.
In addition, a second pickup image is picked up when the LED for applying light of the wavelength λ2 irradiates the subject with light of the wavelength λ2.
Then, on the basis of the first pickup image and the second pickup image, a skin region is detected from one of the first pickup image and the second pickup image.
That is, as described above, a combination such that the reflectance when the skin of a human is irradiated with light of the wavelength λ1 is higher than the reflectance when the skin of the human is irradiated with light of the wavelength λ2 is adopted as combination of the wavelengths λ1 and λ2.
Thus, the luminance values of pixels forming the skin region in the first pickup image are relatively high values, and the luminance values of pixels forming the skin region in the second pickup image are relatively low values. Therefore difference values between the luminance values of the pixels forming the skin region in the first pickup image and the second pickup image are relatively high values.
In addition, as described above, a combination such that the reflectance when a thing other than the skin of a human is irradiated with light of the wavelength λ1 is substantially the same as the reflectance when the thing other than the skin of a human is irradiated with light of the wavelength λ2 is adopted as combination of the wavelengths λ1 and λ2.
Thus, the luminance values of pixels forming a region other than the skin region in the first pickup image are substantially the same as the luminance values of pixels forming the region other than the skin region in the second pickup image. Therefore difference values between the luminance values of the pixels forming the region other than the skin region in the first pickup image and the second pickup image are relatively low values.
Hence, in the skin recognition system, for example, a region corresponding to relatively high difference values can be detected as skin region.