abstract |
A pigment detection method and an electronic device are provided, and relate to the field of terminal technologies. The method specifically includes: extracting a first image from a to-be-detected RGB skin image, where the first image is used to represent a body reflection component in the RGB skin image, and the RGB skin image is photographed by a device having an RGB image photographing function; extracting a pigment from an R channel, a B channel, and a G channel of the first image based on a correspondence between a first spectral response curve of the pigment and a second spectral response curve of the device having the RGB image photographing function; and generating a pseudo-color image based on the extracted pigment, and displaying the pseudo-color image. In this way, pigment detection performed based on the solution has good universality. |