CN-122023222-A - Pigment processing method based on facial image
Abstract
The application relates to the technical field of facial palm enhancement and discloses a pigment processing method based on facial images, which comprises the steps of obtaining cross polarization original pictures of the faces, and processing the cross polarization original pictures by utilizing a multi-scale enhancement algorithm to obtain cross polarization multi-scale enhancement pictures; the method comprises the steps of respectively carrying out the same processing on two images of a cross polarization original image and a cross polarization multi-scale enhancement image to obtain a first color spot rendering image and a second color spot rendering image, separating brown spot information of the images, calculating a color spot gray scale image, carrying out dynamic stretching processing on the color spot gray scale image by adopting a self-adaptive enhancement algorithm to obtain an image with enhanced light and dark contrast, rendering and mapping the image with enhanced light and dark contrast into a brown color spot image to form the color spot rendering image, and fusing the first color spot rendering image and the second color spot rendering image to obtain a final brown color spot rendering result image. Thus, the palm fiber detection effect can be improved.
Inventors
- DAI QIQIANG
- Zhu Xianggeng
- GUO JUNXING
- CHEN CHUNPENG
- DU XIANPENG
- LI NING
Assignees
- 青岛小优智能科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260415
Claims (10)
- 1. A pigment processing method based on a face image, characterized by comprising: s10, obtaining a cross polarization original image of a face, and processing the cross polarization original image by utilizing a multi-scale enhancement algorithm to obtain a cross polarization multi-scale enhancement image; The two images of the cross polarization original image and the cross polarization multi-scale enhancement image are respectively subjected to the following same processing to obtain a first color spot rendering image corresponding to the cross polarization original image and a second color spot rendering image corresponding to the cross polarization multi-scale enhancement image: S20, separating brown spot information of the image, and calculating a color spot gray scale map; S30, adopting a self-adaptive enhancement algorithm to dynamically stretch the color spot gray level image to obtain an image with enhanced light-dark contrast; s40, rendering the image with the raised light and shade contrast and mapping the image into a brown color spot image so as to form a color spot rendering image; and S50, fusing the first color spot rendering diagram and the second color spot rendering diagram to obtain a final brown spot rendering result diagram.
- 2. The method according to claim 1, wherein in S10, the processing the cross-polarization artwork using a multi-scale enhancement algorithm includes: performing convolution calculation on the cross polarization original image by using a multi-scale stretching algorithm and using three-scale guide filtering; Performing differential operation sequentially according to the size of the scale to obtain detail information with different degrees; Fusing the differential results under each scale through nonlinear operation, and calculating contrast enhancement information; and carrying out weighted fusion on the contrast enhancement information and the cross polarization original image to obtain the cross polarization multi-scale enhancement image.
- 3. The method for processing a facial image-based pigment according to claim 2, wherein the sequentially performing differential operations according to the scale sizes to obtain detail information of different degrees comprises: Introducing enhancement term coefficients into a multi-scale enhancement algorithm to obtain: , , Wherein, D 1 is the information containing the best detail, D 2 is the information containing the medium detail, and D 3 is the information containing the rough detail; Representing the cross-polarization artwork; Representing a guided filtering algorithm at different scale parameters, The scale is assumed to be Then The dimensions are respectively set as S 1 and s 2 are the enhancement term coefficients.
- 4. A method for processing a face-image-based pigment according to claim 3, wherein the fusing the differential results at each scale by nonlinear operation to calculate contrast enhancement information includes: , Wherein, the Is the contrast enhancement information, w 1 、w 2 and w 3 are constants.
- 5. The method of face image-based pigment processing according to claim 1, wherein S20 comprises: Converting the image from the RGB color space to the LAB color space; And calculating LAB space data and a color difference value taking the spot color as a standard color to obtain the spot gray scale map.
- 6. The method of face image-based pigment processing according to claim 1, wherein S30 comprises: Calculating the image pixel value distribution characteristics of the local area of the color spot gray scale map, and counting the number of pixels corresponding to each value of the gray scale values in a preset interval; setting an upper limit value lowLimit and a lower limit value upLimit of the gray distribution ratio, and dynamically positioning an upper limit value minGray and a lower limit value maxGray of the gray values; according to lowLimit, upLimit, minGray and maxGray, the gray values are normalized to a preset gray interval to decompose the high frequency information and the low frequency information.
- 7. The method of claim 6, wherein normalizing the gray scale values to the preset gray scale interval according to lowLimit, upLimit, minGray and maxGray comprises: , Wherein, the And (3) obtaining the color spot enhancement map from the cross polarization original map or the cross polarization multi-scale enhancement map after S30 processing.
- 8. The method of face image-based pigment processing according to claim 1, wherein S40 comprises: Calculating the gray values corresponding to the r, g and b channels of the target pseudo-color image by setting different color coefficients Controlling adjustment of hue using exponential coefficients Performing dynamic compression mapping on the color gray value domain, and improving the brightness contrast of the rendering graph; And fusing the mapping results of the r, g and b channels, and rendering the color spot gray level map by using a color lookup table algorithm to obtain a brown color spot map.
- 9. The face image-based pigment processing method according to any one of claims 1 to 8, wherein the S50 includes: Fusing the first color spot rendering map and the second color spot rendering map by using a positive film bottoming mode.
- 10. A pigment processing apparatus based on a face image, comprising: The image enhancement module is configured to acquire cross polarization original pictures of the face, and process the cross polarization original pictures by utilizing a multi-scale enhancement algorithm to obtain a cross polarization multi-scale enhancement picture; the dual-image processing module is configured to respectively perform the following same processing on the two images of the cross polarization original image and the cross polarization multi-scale enhancement image so as to obtain a first color patch rendering image corresponding to the cross polarization original image and a second color patch rendering image corresponding to the cross polarization multi-scale enhancement image: A gray scale map calculation unit configured to separate brown patch information of the image, calculate a color patch gray scale map; The self-adaptive enhancement unit is configured to dynamically stretch the color spot gray level image by adopting a self-adaptive enhancement algorithm to obtain an image with enhanced light-dark contrast; a color mapping unit configured to render and map the image with the raised light and dark contrast into a brown color stain map to form a stain rendering map; And the image fusion module is configured to fuse the first color spot rendering diagram and the second color spot rendering diagram to obtain a final brown spot rendering result diagram.
Description
Pigment processing method based on facial image Technical Field The application relates to the technical field of facial palm enhancement, in particular to a pigment processing method based on facial images. Background Brown spots (such as freckles, chloasma, senile plaques, etc.) are common pigmentation phenomena with facial skin problems, the formation of which is related to factors such as ultraviolet exposure, hormonal changes, skin aging, etc. The detection and degree judgment of brown spots mainly depend on doctor's diagnosis or skin microscopic examination, the detection mode is high in subjectivity, key states such as spot areas and color changes cannot be dynamically monitored, and curative effect evaluation is affected. In recent years, the popularization of skin detectors realizes quantitative acquisition of skin data of users, and the color spot characteristics are enhanced by a high-precision image processing technology, so that objective analysis basis is provided for doctors and professionals. In the imaging scheme, multispectral imaging is utilized for realizing quantitative alignment of the facial stains, and the cross polarized light patterns are more beneficial to analysis of the brown stains. The dermatome acquisition system acquires face images of three angles of left, middle and right, and performs three-dimensional reconstruction on the images by combining a 3D structured light projection technology to generate a face point cloud containing geometric topology and texture information. And a two-dimensional plane graph is obtained through a three-dimensional texture unfolding technology, and the image shows the characteristics of the side face and the front face. The effect of the unfolded view is shown in fig. 1. At present, some facial acquisition related instruments exist in the market, but the price of the product is generally higher, the data acquisition process is slower, and manual intervention is needed. In addition, the product of the three-dimensional point cloud model is constructed by automatically rotating collected data, and the problems that the contrast of the brown region image is insufficient, the color spot boundary transition is unnatural, large-area color spots cannot be truly displayed, large-area color deposition with low contrast is caused, and the like are solved. In addition to the products already on the market, there are some published patent documents related to facial feature collection processing. For example, patent application CN108537745A discloses a facial image problem skin enhancement method, which proposes to set parameters respectively through YCrCb color space and probability fusion algorithm to obtain a color patch or sensitive gray scale map. But this algorithm is not applicable to cross polarization diagrams. Patent application CN117173259a discloses a method, system and computer-readable storage medium for analyzing pigmentation of human facial skin, but it exhibits a less than ideal contrast of the palm-macula effect map. In summary, the existing processing manner for enhancing and rendering the color spots has the following problems: 1. the color spots are low in contrast and have local overexposure; 2. The brown spot boundary is excessively blurred, so that the position of the spot cannot be accurately positioned, and the judgment of the skin spot morphology and the diffusion trend by professionals can be influenced; 3. There are limitations to the enhancement of large area stains and low contrast color sink features, which cannot be distinguished from large area stains on the stain rendering map; 4. After the effective treatment, the improvement effect can not be objectively reflected by comparing the stain rendering data before and after the treatment, and the evaluation of the treatment scheme by professionals is influenced. It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the application and thus may include information that does not form the prior art that is already known to those of ordinary skill in the art. Disclosure of Invention The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview, and is intended to neither identify key/critical elements nor delineate the scope of such embodiments, but is intended as a prelude to the more detailed description that follows. The embodiment of the disclosure provides a pigment processing method based on a facial image, so as to improve the palm fiber detection effect. In some embodiments, the pigment processing method based on the facial image comprises the steps of S10, obtaining a cross polarization original image of the facial part, processing the cross polarization original image by utilizing a multi-scale enhancement algorithm to obtain a cross polarization multi-scale enhancement image