Image processing method and device

By deshading, brightness normalization and color temperature normalization of portrait images, the problem of low accuracy in skin tone recognition in portrait images is solved, and more accurate skin tone restoration and recognition effects are achieved.

CN119130829APending Publication Date: 2024-12-13VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411156864.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

When the prior art accurately recognizes the user's skin color in portrait images, it is affected by factors such as the shooting environment and image quality, resulting in low accuracy in skin color recognition, which affects the skin color restoration effect.

Method used

The pre-processing network is used to deshade, brightness normalize and color temperature normalize the character images, eliminate the impact of brightness and color temperature on skin color recognition, remove non-normal skin color areas, and improve the stability and accuracy of skin color recognition.

Benefits of technology

Through the processing of the pre-processing network, users' skin tone can be restored more accurately, improve the stability and accuracy of skin tone recognition, and reduce the impact of shadowed areas on recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119130829A_ABST
    Figure CN119130829A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing method and device, and belongs to the technical field of image processing, and the method comprises the steps: obtaining a figure image which comprises a skin region image of a figure; image processing is conducted on the skin area image through a preprocessing network, a figure skin color image is obtained, and the preprocessing network comprises at least one of a shadow removal processing sub-network, a brightness normalization processing sub-network and a color temperature normalization processing sub-network; wherein the outputs of the shadow removal processing sub-network, the brightness normalization processing sub-network and the color temperature normalization processing sub-network are images in the same color space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and specifically relates to an image processing method and device. Background Art

[0002] With the rapid development of electronic device technology, the shooting function of electronic devices is becoming more and more powerful. People can use electronic devices to shoot images of various scenes, such as night scenes, portraits, etc. Among them, accurately restoring the user's skin color in portrait scenes is very important for the color performance of the entire image.

[0003] In the related art, the skin color in the original character image can be identified through the color space. However, the skin color in the original character image is usually affected by factors such as the shooting environment and image quality, making the skin color identified by the above method not accurate, affecting the skin color restoration effect. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide an image processing method and device that can improve the accuracy of restoring skin color.

[0005] In a first aspect, an embodiment of the present application provides an image processing method, comprising:

[0006] Acquire a person image, wherein the person image includes a skin area image of the person;

[0007] The skin area image is processed by a preprocessing network to obtain a skin color image of the person, wherein the preprocessing network includes at least one of the following: a shadow removal processing subnetwork, a brightness normalization processing subnetwork, and a color temperature normalization processing subnetwork; wherein the outputs of the shadow removal processing subnetwork, the brightness normalization processing subnetwork, and the color temperature normalization processing subnetwork are all images in the same color space.

[0008] In a second aspect, an embodiment of the present application provides an image processing device, including:

[0009] An acquisition module, used for acquiring a person image, wherein the person image includes a skin area image of the person;

[0010] A processing module is used to perform image processing on a skin area image through a preprocessing network to obtain a skin color image of a person, wherein the preprocessing network includes at least one of the following: a shadow removal processing subnetwork, a brightness normalization processing subnetwork, and a color temperature normalization processing subnetwork; wherein the outputs of the shadow removal processing subnetwork, the brightness normalization processing subnetwork, and the color temperature normalization processing subnetwork are all images in the same color space.

[0011] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, and when the program or instruction is executed by the processor, the steps of the image processing method shown in the first aspect are implemented.

[0012] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the image processing method shown in the first aspect are implemented.

[0013] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a display interface, the display interface and the processor are coupled, and the processor is used to run programs or instructions to implement the steps of the image processing method shown in the first aspect.

[0014] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the image processing method shown in the first aspect.

[0015] In the embodiment of the present application, the skin area image of the person in the acquired person image can be subjected to at least one of the following: shadow removal, brightness normalization, and color temperature normalization through a preprocessing network to obtain a person skin color image. In this way, before the skin color of the person image is recognized or the person skin color information is provided to the user, the influence of brightness and color temperature on skin color recognition can be eliminated, and when there are different shadow areas on the face, the area of ​​the non-normal skin color of the face skin color can be removed, reducing the influence of the shadow area on skin color recognition, and more accurately restoring the user's skin color, so as to improve the stability and accuracy of skin color recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of an image processing method provided in an embodiment of the present application;

[0017] Figure 2 A schematic diagram of an application flow of an image processing method provided in an embodiment of the present application;

[0018] Figure 3 A schematic diagram of the structure of a shadow removal processing subnetwork of an image processing method provided in an embodiment of the present application;

[0019] Figure 4 A schematic diagram of the structure of a brightness normalization processing subnetwork of an image processing method provided in an embodiment of the present application;

[0020] Figure 5 A schematic diagram of the structure of a color temperature normalization processing subnetwork of an image processing method provided in an embodiment of the present application;

[0021] Figure 6 A schematic diagram of skin color categories of characters in an image processing method provided in an embodiment of the present application;

[0022] Figure 7 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application;

[0023] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0024] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0026] The terms "first", "second", etc. in the specification of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0027] In order to solve the problems in the related art, the embodiments of the present application provide an image processing method, device, equipment and storage medium, which can perform at least one of the following processing on the character image in advance based on the pre-trained pre-processing network: shadow removal processing, brightness normalization processing, color temperature normalization processing, and obtain the character skin color image. In this way, the influence of brightness and color temperature on skin color recognition can be eliminated, and when there are different shadow areas on the face, the area of ​​the face skin color that is not normal can be removed, reducing the influence of the shadow area on skin color recognition, and more accurately restoring the user's skin color, so as to improve the stability of skin color recognition and the accuracy of determining the user's skin color.

[0028] Based on this, the following Figures 1 to 6 , the image processing method provided in the embodiment of the present application is described in detail through specific embodiments and their application scenarios.

[0029] First, combine Figure 1 An image processing method provided in an embodiment of the present application is described in detail.

[0030] Figure 1 A flowchart of an image processing method provided in an embodiment of the present application.

[0031] like Figure 1 As shown, the image processing method provided in the embodiment of the present application can be applied to electronic devices. Based on this, the image processing method can include the following steps:

[0032] Step 110, obtaining a person image, wherein the person image includes a skin area image of the person;

[0033] Step 120, performing image processing on the skin area image through a preprocessing network to obtain a skin color image of the person, wherein the preprocessing network includes at least one of the following: a de-shadowing processing subnetwork, a brightness normalization processing subnetwork, and a color temperature normalization processing subnetwork; wherein the outputs of the de-shadowing processing subnetwork, the brightness normalization processing subnetwork, and the color temperature normalization processing subnetwork are all images in the same color space.

[0034] In this way, the influence of brightness and color temperature on skin color recognition can be eliminated. When there are different shadow areas on the face, the areas with abnormal skin color on the face can be removed, reducing the influence of the shadow area on skin color recognition, and more accurately restoring the user's skin color, thereby improving the stability and accuracy of skin color recognition.

[0035] The above steps are described in detail below, as shown below.

[0036] First, involving step 110, in some embodiments of the present application, in order to reduce the influence of facial features on the skin color of the person, it is necessary to obtain an image of only the skin area based on the person image, so as to improve the quality of the image input to the preprocessing network. Based on this, step 110 may specifically include step 1101 and step 1102.

[0037] Step 1101, capturing a face image including the person from a person image.

[0038] For example, Figure 2 As shown, the character image may be first subjected to image capture processing to obtain an image of the area where the face of the person is located in the character image.

[0039] Step 1102, performing a facial feature removal operation on the face image to obtain a skin area image.

[0040] For example, still referring to Figure 2, remove the facial features of the face image, and obtain a skin area image that only retains the skin area. In this way, the influence of the facial features on the skin color of the person can be avoided, and the quality of the image input to the preprocessing network can be improved.

[0041] It should be noted that in order to make every two sub-networks in the de-shadowing processing sub-network, the brightness normalization processing sub-network, and the color temperature normalization processing sub-network be used in combination, that is, the de-shadowing processing sub-network and the brightness normalization processing sub-network are used in combination, the brightness normalization processing sub-network and the color temperature normalization processing sub-network are used in combination, and the de-shadowing processing sub-network, the brightness normalization processing sub-network, and the color temperature normalization processing sub-network are used in combination, the output of each sub-network in the embodiment of the present application is an image of the same color, for example, the output is an image in the RGB color space, an image in the YUV color space, etc.

[0042] Next, step 120 is involved. The preprocessing network in the embodiment of the present application is a network integrated with three sub-networks, wherein the three sub-networks include at least one of the following: a de-shadowing processing sub-network, a brightness normalization processing sub-network, and a color temperature normalization processing sub-network. In this way, when the preprocessing network is used, the results output by each sub-network can be used at will, or the final result of the overall preprocessing network can be used, so that the obtained character skin color image can be used for skin color recognition, and then the recognized skin color information can be adjusted according to user preferences, so that the overall skin color is evenly darker or closer to a certain color temperature, so as to obtain a character image that meets user needs.

[0043] Based on this, the following describes the human skin color image output by each sub-network, the human skin color image obtained by any combination of at least two sub-networks, and the human skin color image output by the overall preprocessing network calculated by three sub-networks.

[0044] In some embodiments of the present application, the preprocessing network includes a de-shadowing sub-network, and the character skin color image includes a first skin color feature image after the skin area image is de-shadowed. Based on this, the step 120 can specifically include steps 1201 to 1203. The purpose of this step is to obtain a first skin color feature image. The first skin color feature image belongs to the RGB color space, and its image size is 100*100*3. Compared with the input skin area image, the first skin color feature image removes the influence of uneven facial skin color and skin color shadow on the skin color image. The specific steps are as follows.

[0045] Step 1201, downsampling the first skin feature image and the second skin feature image extracted from the skin area image respectively, to obtain a first mask image corresponding to the first skin feature image and a second mask image corresponding to the second skin feature image; wherein the first skin feature image is an image of a skin color area in the skin area image whose pixel value is greater than or equal to a preset pixel value, and the second skin feature image is an image of a skin color area in the skin area image whose pixel value is less than the preset pixel value.

[0046] The mask image in the embodiment of the present application, such as the first mask image to the sixth mask image, refers to a matrix or image of the same size as the original image in computer vision and image processing, which is used to indicate or represent the pixels of a specific area in the original image. Its mask image can be a binary image. Also, the image of the skin color area in the skin area image with a pixel value greater than or equal to a preset pixel value in the embodiment of the present application can refer to the image of the skin color area in the highlighted part of the skin area image, and the image of the skin color area in the skin area image with a pixel value less than the preset pixel value can refer to the image of the skin color area in the dark part of the skin area image.

[0047] For example, Figure 3 As shown in the figure, the skin region image input1 has a size of 256*256*3. The first skin feature image skin1 and the second skin feature image skin2 are extracted from the skin region image, and skin1 and skin2 are respectively sent to the convolution layer 1. The size of the convolution layer 1 is 1×1×3, with 12 convolution kernels. The output results are feature maps a1 and b1 with a size of 256*256*12. The obtained feature data a1 and b1 are respectively input to the ReLU activation function layer of the shadow removal processing subnetwork. The ReLU activation function layer processes the feature map output by the first convolution layer, that is, performs the ReLu function operation on the feature map to obtain feature maps a2 and b2. Here, the ReLu function is shown in the following formula (1):

[0048]

[0049] Among them, x is the feature map, such as feature maps a1, b1 or feature maps a2, b2; y is the output result after the ReLu activation function layer.

[0050] Next, the feature maps a2 and b2 obtained in the previous step are input into the second convolution + relu layer. The convolution kernel size of the second convolution + relu layer is 1*1*12, the step size is 1, and the number of convolution kernels is 1. In this way, feature maps of size 256*256*1 can be obtained respectively; then the feature maps are downsampled respectively to obtain the first mask image mask1 corresponding to the first skin feature image skin1 and the second mask image mask2 corresponding to the second skin feature image skin2 of size 100*100*1 respectively.

[0051] Step 1202: perform image stitching processing on the first mask image and the second mask image to obtain a third mask image, where the third mask image is an image representing the light and dark distribution of the skin area image.

[0052] Exemplarily, mask1 and mask2 are spliced ​​into a third mask image mask3, and the size of mask3 is 100*100*2.

[0053] It should be noted that mask3 is composed of mask1 and mask2. Mask1 and mask2 are respectively composed of original data with brightness greater than or equal to threshold Y and less than threshold Y. Mask1 is the result of processing the pixel values ​​of the skin color area in the highlight part, that is, mask1 is the image of the skin color area with pixel values ​​greater than or equal to Y in the skin area image. Mask2 is the result of processing the pixel values ​​of the skin color area in the dark part, that is, mask2 is the image of the skin color area with pixel values ​​less than Y in the skin area image. Based on this, since the shadow is composed of bright and dark parts, mask3 composed of mask1 and mask2 has the information and characteristics of light and dark distribution.

[0054] Step 1203: Based on the third mask image, perform shadow removal processing on the skin area image to obtain a first skin color feature image.

[0055] For example, mask3 and input1 can be concatenated to remove shadows from the skin area image. Figure 3As shown, mask3 is the distribution feature of the shadow part, input1 is the original skin color image, and the following convolutional network begins to perform the shadow removal operation. Here, the image after mask3 and input1 are concatenated can be downsampled to obtain a feature map of size 100*100*3, and the obtained feature map is passed through the convolution layer + relu layer (a total of 8 convolution layers + relu layers) where the convolution size is 100*100*1, and the number of convolution kernels is gradually reduced from 5 to 3; a feature map of size 100*100*5 is obtained, that is, the first skin color feature image mask4 as the output of the shadow removal processing subnetwork. Among them, mask4 is an RGB color space image, which is a skin color map with a more uniform skin color after removing the shadow effect of the original skin color in the skin area image.

[0056] Therefore, the mask4 output by the shadow removal subnetwork is an image in RGB color space, and mask4 can be called an RGB color space image of size 100*100*3. The purpose of the shadow removal subnetwork is to remove the shadow of the skin color, so that the skin color on the image is more uniform and convenient for subsequent processing. In this way, the skin area network can reduce the uneven skin color caused by some shadows on the skin color by including only the preprocessing network of the shadow removal subnetwork.

[0057] Here, before step 1201, the step of determining a first mask image corresponding to the first skin feature image and a second mask image corresponding to the second skin feature image may also be included, that is, before step 1201, the image processing method may also include steps 1401 to 1403.

[0058] Step 1401, converting the skin region image from the RGB color space to the YUV color space to obtain a first YUV skin region image.

[0059] Exemplarily, input1 is converted from RGB color space to YUV color space so as to be processed on the y channel.

[0060] Step 1402, extracting a first YUV image and a second YUV image from the first YUV skin area image according to a first average pixel value of the Y channel of the first YUV skin area image in the YUV color space; wherein the pixel value of the Y channel in the first YUV image is greater than the first average pixel value, and the pixel value of the Y channel in the second YUV image is less than the first average pixel value.

[0061] Exemplarily, the first average pixel value x of the first YUV skin area image in the Y channel is calculated first, and then the pixels greater than the first average pixel value x on the first YUV skin area image and their position information are extracted to form the first YUV image yuvskin1 (256×256×3), and the pixels less than the first average pixel value x and their corresponding position information are extracted to form the second YUV image yuvskin2 (256×256×3).

[0062] Step 1403: Convert the first YUV image and the second YUV image from the YUV color space to the RGB color space respectively, to obtain a first skin feature image corresponding to the first YUV image and a second skin feature image corresponding to the second YUV image.

[0063] Exemplarily, two feature maps yuvskin1 and yuvskin2 are converted from the YUV color space to the RGB color space to obtain skin1 (256×256×3) and skin2 (256×256×3), respectively.

[0064] In this way, the skin feature maps of different brightness areas on the skin area image can be extracted for better shadow removal operation later.

[0065] In other embodiments of the present application, the preprocessing network includes a brightness normalization processing subnetwork, and the character skin color image is a second skin color feature image after the skin area image is subjected to brightness normalization processing. Based on this, step 120 can specifically include steps 1204 to 1205, as shown below.

[0066] Step 1204, performing image enhancement processing on the skin area image using the first skin area feature image corresponding to the skin area image to obtain a skin feature fusion image, wherein the number of image features in the skin feature fusion image is greater than the number of image features in the skin area image.

[0067] Exemplarily, the skin area image input1 can be downsampled to obtain a feature map of 100*100*3 size as mask4, and image equalization processing can be performed on it to obtain the first skin area feature image expanded to 256*256*3 size, recorded as mask5, and then the initial skin color map (256*256*3) of input1 is fused with mask5 to obtain a skin feature fused image input2 of 256*256*6 size.

[0068] Step 1205, performing brightness averaging processing on the skin feature fusion image to obtain a second skin color feature image.

[0069] For example, input2 can be input into Figure 4In the convolution layer shown, the second skin color feature image after removing the brightness influence is obtained and is recorded as mask6. Specifically, the skin feature fusion image input2 of size 256*256*6 is input, followed by a convolution layer and a relu layer combination, a total of 10 groups of network structures, including 1 group of convolution layers (convolution kernel 1×1×6, number of kernels 12, output feature map 256×256×12), 2 groups of convolution layers (convolution kernel size 1×1×12, number of kernels 10, output feature map 256×256×10), 3 to 8 groups of convolution layers (convolution kernel size 2×2×10, number of kernels 8, output feature map 100×100×8), 9 to 10 groups of convolution layers (convolution kernel size 100×100×8, number of kernels 3, output feature map 100×100×3); the second skin color feature image after removing the brightness influence is output and is recorded as mask6, and mask6 is an image in RGB color space.

[0070] In some embodiments, the above step 1204 may specifically include steps 12041 to 12045.

[0071] Step 12041, convert the skin area image and the first skin area feature image from RGB color space to YUV color space respectively, to obtain a second YUV skin area image corresponding to the skin area image and a third YUV skin area image corresponding to the first skin area feature image.

[0072] Exemplarily, mask5 and input1 are converted from RGB color space to YUV color space, respectively.

[0073] Step 12042: average the pixel values ​​of the second YUV skin area image in the Y channel and the pixel values ​​of the third YUV skin area image in the Y channel to obtain a second average pixel value of the Y channel.

[0074] Exemplarily, pixel values ​​of the Y channel in the two YUV skin region images are averaged to obtain a second average pixel value of the Y channel, and the U channel and the V channel in the two YUV skin region images remain unchanged.

[0075] Here, it should be noted that Y is the pixel value of the Y channel in the last layer when input1 is converted from RGB color space (256*256*3) to YUV color space (256*256*3); averaging refers to taking the average of the pixel values ​​at corresponding positions of 256*256 in the two images.

[0076] Step 12043, based on the pixel values ​​of the second YUV skin area image in the U channel, the pixel values ​​of the V channel and the second average pixel value, generate a first skin feature fusion image.

[0077] Exemplarily, the pixel value of the U channel, the pixel value of the V channel and the second average pixel value of the Y channel of the second YUV skin area image are fused to generate a first skin feature fused image.

[0078] Step 12044, convert the first skin feature fusion image from the YUV color space to the RGB color space to obtain a second skin feature fusion image.

[0079] Step 12045, performing image stitching processing based on the second skin feature fusion image and the first skin area feature image to obtain a skin feature fusion image.

[0080] Exemplarily, the second skin feature fusion image obtained by converting the first skin feature fusion image from the YUV color space to the RGB color space is spliced ​​again with the first skin area feature image mask5 to obtain input2 with a size of 256*256*6, and input2 is input into its convolutional network.

[0081] In this way, the image obtained by splicing the two second skin feature fusion images and the first skin area feature image can increase the image feature information, which can better allow the subsequent network to recognize more feature information.

[0082] In addition, based on this embodiment, if the preprocessing network also includes a de-shadowing processing subnetwork in the embodiment shown in the above steps 1201 to 1203, that is, the preprocessing network includes both a de-shadowing processing subnetwork and a brightness normalization processing subnetwork, the first skin area feature image can be determined in the following manner. Based on this, before step 1204 (specifically step 12041), the image processing method can also include steps 1501 to 1503.

[0083] Step 1501, obtain a first skin color feature image output by the de-shadowing processing sub-network, where the first skin color feature image is an image of the skin area image after the de-shadowing processing.

[0084] Exemplarily, the first skin color feature image with a size of 100*100*5 output in the above step 1203 can be used as mask4.

[0085] Step 1502: up-sample the first skin color feature image to obtain a fourth mask image, wherein the image size of the fourth mask image is larger than the image size of the first skin color feature image.

[0086] Exemplarily, mask4 is upsampled, and the fourth mask image whose size is expanded from 100*100*3 to 256*256*3 is recorded as mask5.

[0087] Step 1503: determine the fourth mask image as the first skin area feature image.

[0088] Exemplarily, mask5 is determined as the first skin region feature image, so that input1 (256*256*3) is fused with mask5.

[0089] In some other embodiments of the present application, the preprocessing network may include a color temperature normalization processing subnetwork, and the character skin color image includes a third skin color feature image after the skin area image is subjected to color temperature normalization processing, that is, the fifth mask image is generated using the correlated color temperature information (Correlated Color Temperature, CCT) of the skin area image, so as to map its skin area image to a color temperature of 5k, so as to facilitate subsequent color temperature normalization processing. Based on this, step 120 may specifically include steps 1206 to 1208.

[0090] Step 1206: construct a fifth mask image according to the difference between the correlated color temperature information of the skin region image and the preset correlated color temperature information.

[0091] For example, Figure 5 As shown, the difference between the color temperature information and the preset correlated color temperature information such as 5K can be calculated by the following formula (2):

[0092] gain = (5000-cct1) / 5000 (2)

[0093] Wherein, cct1 is the correlated color temperature information of the skin area image, 5000 is the preset correlated color temperature information, and gain is the difference between the correlated color temperature information of the skin area image of the fifth mask image and the preset correlated color temperature information.

[0094] Based on this, a fifth mask image named gain mask can be generated based on the gain, and the size of the mask image is 100*100*1, that is, the mask image can represent a matrix composed of 10,000 gains.

[0095] Step 1207, performing image stitching processing on the fifth mask image, the second skin region characteristic image corresponding to the skin region image, and the sixth mask image corresponding to the second skin region characteristic image to obtain a stitched image.

[0096] For example, Figure 5As shown, the second skin area feature image can be obtained by downsampling the skin area image input1 to obtain a feature map of size 100*100*3 as mask6, and then, image stitching is performed based on mask6, awbmask6 with a size of 100*100*7 after mask6 processing, and the fifth mask image gain mask to obtain a stitched image mask7.

[0097] Step 1208: Perform color temperature mapping on the spliced ​​image according to preset related color temperature information to obtain a third skin color feature image.

[0098] For example, Figure 5 As shown in the figure, the spliced ​​image mask7 is input into the subsequent convolution layer, that is, the convolution layer + relu layer combination, a total of 10 groups of network structures, including 1 group of convolution layers (convolution kernel 1×1×7, number of kernels 12, output feature map 100×100×12), 2 groups of convolution layers (convolution kernel size 1×1×12, number of kernels 10, output feature map 100×100×10), 3 to 8 groups of convolution layers (convolution kernel size 1×1×10, number of kernels 8, output feature map 100×100×8), 9 to 10 groups of convolution layers (convolution kernel size 100×100×8, number of kernels 3, output feature map 100×100×3); finally, the third skin color feature image mask8 (100*100*3) is obtained, which is the image of the skin area image after color temperature normalization, and the image belongs to the RGB color space.

[0099] Here, before step 1207 , the image processing method in the embodiment of the present application may further include the step of generating a sixth mask image. Based on this, the image processing method may further include steps 1601 to 1603 .

[0100] Step 1601, obtaining pixel values ​​of a first R channel, a first G channel, and a first B channel of a second skin region characteristic image.

[0101] Step 1602, based on the pixel values ​​of the first R channel and the pixel values ​​of the first G channel, generate the pixel values ​​of the second R channel; based on the pixel values ​​of the first G channel and the pixel values ​​of the first B channel, generate the pixel values ​​of the second B channel; and, determine the pixel values ​​of the first G channel as the pixel values ​​of the second G channel.

[0102] Step 1603: Generate a sixth mask image according to the pixel values ​​of the second R channel, the pixel values ​​of the second G channel, and the pixel values ​​of the second B channel.

[0103] Exemplarily, the second skin region feature image mask6 is processed, and the 0th, 1st, and 2nd layers of mask6 can be represented as the first R channel, the first G channel, and the first B channel in sequence; then, the pixel value of the first R channel is divided by the pixel value of the first G channel as the pixel value of the 0th layer of the sixth mask image awbmask6, i.e., the second R channel; and, the pixel value of the first G channel is determined as the pixel value of the 1st layer of awbmask6, i.e., the second G channel; and, the ratio of the pixel value of the first B channel to the pixel value of the first G channel is used as the pixel value of the 2nd layer of awbmask6, i.e., the second B channel. In this way, based on the aforementioned pixel values ​​of the second R channel, the second G channel, and the second B channel, a sixth mask image awbmask6 having a size of 100*100*3 is generated.

[0104] In addition, based on this embodiment, if the preprocessing network also includes a brightness normalization processing subnetwork in the embodiment shown in the above steps 1206 to 1208, that is, the preprocessing network includes both a brightness normalization processing subnetwork and a color temperature normalization processing subnetwork, the second skin area feature image can be determined in the following manner. Based on this, before step 1207, the image processing method can also include step 160.

[0105] Step 160, determine the second skin color feature image output by the brightness normalization processing sub-network as the sixth mask image, where the second skin color feature image is an image of the skin area image after brightness normalization processing.

[0106] In other embodiments of the present application, the preprocessing network includes a de-shadowing processing subnetwork, a brightness normalization processing subnetwork and a color temperature normalization processing subnetwork; the character skin color image includes a fourth skin color feature image after the skin area image has been subjected to de-shadowing processing, brightness normalization processing and color temperature normalization processing. Based on this, step 120 can specifically include steps 1209 to 1216, as shown below.

[0107] Step 1209, downsampling the first skin feature image and the second skin feature image extracted from the skin region image respectively, to obtain a first mask image corresponding to the first skin feature image and a second mask image corresponding to the second skin feature image; wherein the first skin feature image is an image of a skin color region in the skin region image whose pixel value is greater than or equal to a preset pixel value, and the second skin feature image is an image of a skin color region in the skin region image whose pixel value is less than a preset pixel value. Here, the image of a skin color region in the skin region image with a pixel value greater than or equal to a preset pixel value involved in the embodiment of the present application may refer to an image of a skin color region in a highlighted portion of the skin region image, and the image of a skin color region in the skin region image with a pixel value less than the preset pixel value may refer to an image of a skin color region in a dark portion of the skin region image.

[0108] Step 1210: perform image stitching processing on the first mask image and the second mask image to obtain a third mask image, where the third mask image is an image representing the light and dark distribution of the skin area image.

[0109] Step 1211: Based on the third mask image, perform shadow removal processing on the skin area image to obtain a first skin color feature image.

[0110] Step 1212, performing image enhancement processing on the skin region image using the first skin color feature image to obtain a skin feature fusion image, wherein the number of image features in the skin feature fusion image is greater than the number of image features in the skin region image.

[0111] Step 1213, performing brightness averaging processing on the skin feature fusion image to obtain a second skin color feature image.

[0112] Step 1214: construct a fifth mask image according to the difference between the correlated color temperature information of the skin region image and the preset correlated color temperature information.

[0113] Step 1215 , performing image stitching processing on the fifth mask image, the second skin color feature image, and the sixth mask image corresponding to the second skin color feature image to obtain a stitched image.

[0114] Step 1216: Perform color temperature mapping on the spliced ​​image according to the preset related color temperature information to obtain a fourth skin color feature image.

[0115] In this way, a preprocessing network can be added in front of the skin color recognition network. The shadow removal subnetwork inputs the image of only the skin color area and outputs the mask4 after the shadow removal; the brightness normalization subnetwork inputs mask4 and the image of only the skin color area and outputs the mask6 after the brightness normalization; the color temperature normalization subnetwork inputs the current cct value, mask6, awbmask6, and outputs the mask7 after the color temperature normalization. In this way, the shadow removal, brightness, and color temperature normalization operations are performed on the skin color to be recognized, and the skin color block is output, which reduces the influence of uneven brightness, color temperature, and facial skin color on the judgment errors of the skin color recognition network.

[0116] Then, after step 120, in the embodiment of the present application, step 130 may be performed to perform skin color recognition on the skin color image of the person to obtain skin color information of the person. The skin color information of the embodiment of the present application may be a skin color label of the person and a skin color classification result map. In this case, a person image is input, a corresponding skin color label is set for each skin color, and a skin color classification result map is set. The final result of skin color classification is Figure 6The international 6 skin color classification results shown in the table shall prevail. According to the international standard (Fitzpatrick Scale), skin color is divided into 6 categories (Type I, the whitest skin color, but with freckles; Type II, light skin color, but darker than Type I; Type III, olive skin color; Type IV, brown skin color; Type V, dark brown skin color; Type VI, the darkest skin color), which generally covers 3 major categories, namely light skin color such as Figure 6 The first two shown, neutral skin tones such as Figure 6 The middle two colors shown, dark skin color Figure 6 The latter two colors are shown.

[0117] Therefore, in the embodiment of the present application, based on the fact that the current skin color recognition network is easily affected by brightness, uneven skin color, skin color shadow, and color temperature changes when recognizing skin color, the preprocessing network performs operations such as de-shading, brightness normalization, and color temperature normalization on the skin area image in the original character image, so that each sub-network in the preprocessing network can output the corresponding character skin color image with RGB color space, and perform skin color recognition on the character skin color image, which can reduce the impact of environmental factors on the classification network and improve the accuracy and stability of classification. At the same time, since each sub-network outputs a character skin color image with the same color space, the preprocessing network can be flexibly adjusted, and the overall preprocessing network can arbitrarily add sub-networks according to the final effect, or change the order of sub-networks, thereby increasing network flexibility, reducing training time, and improving the classification accuracy of the subsequent classification network.

[0118] In addition, the embodiment of the present application also provides a process for constructing a preprocessing network, which can be flexibly disassembled into three sub-networks, and the results of each sub-network can be arbitrarily taken for the user end, so the corresponding training process can also be trained separately and arbitrarily combined, removed or changed in order. And the skin color image of the person output by the preprocessing network is in the same color space, and other skin color recognition networks can be flexibly connected after the preprocessing network, which enhances flexibility and improves training efficiency.

[0119] Here, the input of the sample preprocessing network may only include the sample skin color area image. During training, in order to save training time, the three sub-networks may be trained separately, that is, the corresponding input is the sample skin color area image, and the outputs of the three sub-networks are the sample first skin color feature image, the sample second skin color feature image, and the sample third skin color feature image; and, in order to improve the accuracy of the sample person skin color image, and thus improve the accuracy of the person skin color information, the three sub-networks may be trained separately first, and then trained together, the corresponding input is the sample skin color area image, and the outputs of the three sub-networks are the sample first skin color feature image, the sample second skin color feature image, and the sample third skin color feature image, which are explained separately below.

[0120] Based on this, that is, before step 110 , the image processing method may further include steps 2101 to 2104 .

[0121] Step 2101, obtaining a training data set, where the training data set includes a first sample person image, a second sample person image, and first sample skin color information of a sample person in the second sample person image.

[0122] Exemplarily, the input of the training data set is prepared as different face images, namely, a first sample person image, and a second sample person image (100*100*3 size) in RGB color space as the verification network training result.

[0123] Here, before the first sample character image is sent to the sample shadow removal processing sub-network, it is necessary to remove the facial features of the first sample character image and only retain the skin color area. The purpose of this step is to reduce the influence of facial features on skin color classification. After obtaining the image with only skin color area, it is sent to the subsequent sample preprocessing network to remove the influence of facial shadows, brightness, and color temperature on skin color.

[0124] Step 2102, through the first sample character image, respectively train the sample de-shadowing processing subnetwork, the sample brightness normalization processing subnetwork and the sample color temperature normalization processing subnetwork in the sample preprocessing network, until each convolution network in the sample de-shadowing processing subnetwork, the sample brightness normalization processing subnetwork and the sample color temperature normalization processing subnetwork meets the preset training stop condition corresponding to each convolution network, and obtains the initial sample preprocessing network, which includes the initial de-shadowing processing subnetwork, the initial brightness normalization processing subnetwork and the initial color temperature normalization processing subnetwork.

[0125] Step 2103, input the second sample person image into the initial sample preprocessing network to obtain the second sample skin color information of the sample person.

[0126] Step 2104, when the second sample skin color information matches the first sample skin color information, a preprocessing network is constructed based on the target convolution network in the initial sample preprocessing network; wherein the target convolution network includes at least one of the following: an initial de-shadowing processing subnetwork, an initial brightness normalization processing subnetwork, and an initial color temperature normalization processing subnetwork. Specifically, in some embodiments, the preset training stop condition includes a first preset training stop condition and a second preset training stop condition, the initial sample preprocessing network includes a first initial sample preprocessing network and a second initial sample preprocessing network, and the training data set also includes a sample character skin color image. Based on this, the above step 2102 can specifically include steps 21021 to 21025, as shown below.

[0127] Step 21021, through the first sample character image, respectively train the sample de-shadowing processing subnetwork, the sample brightness normalization processing subnetwork and the sample color temperature normalization processing subnetwork in the sample preprocessing network, until each convolution network in the sample de-shadowing processing subnetwork, the sample brightness normalization processing subnetwork and the sample color temperature normalization processing subnetwork meets the first preset training stop condition corresponding to each convolution network, and obtains the first initial sample preprocessing network; wherein the first initial sample preprocessing network includes the first initial de-shadowing processing subnetwork, the first initial brightness normalization processing subnetwork and the first initial color temperature normalization processing subnetwork.

[0128] Exemplarily, first, a sample shadow removal subnetwork is constructed, and the sample shadow removal subnetwork is as follows: Figure 3 As shown, the purpose is to obtain the skin color feature map mask4, which is an RGB map with a size of 100*100*3. Compared with the input skin color map, this map removes the influence of uneven facial skin color and skin color shadow on the skin color map.

[0129] Specifically, input RGB image input1, the size is 256×256×3; convert input1 from RGB domain to YUV domain, process it in y space, first calculate the average value x of y image, then extract the pixels and their positions on y image that are greater than or equal to x to form yuvskin1 feature map (256×256×3), and extract the pixels and their corresponding positions that are less than x to form yuvskin2 feature map (256×256×3); then convert the two feature maps from YUV space to RGB space, and obtain skin1 feature map (256×256×3) and skin2 feature map (256×256×3) respectively; the purpose of this step is to extract the initial skin Skin color feature maps of different brightness areas on the color map; for better shadow removal later; then, the skin1 feature map and skin2 feature map are sent to the convolution layer 1 respectively, the convolution layer size is: 1×1×3, the convolution kernel is 12, and the output result is the feature map a1 and b1 of size 256×256×12; the obtained feature data a1 and b1 are sent to the ReLU activation function layer respectively. The ReLU activation function layer processes the feature map output by the first convolution layer, that is, the ReLu function is operated on the feature map to obtain the feature map a2 and b2. The ReLu function can refer to the above formula (1); the result obtained in the previous step is sent to the second convolution + relu layer (the convolution kernel size is 1* 1*12, step size 1, number of convolution kernels 1), and finally the feature map size is 256*256*1; then the feature map is downsampled to obtain feature maps mask1 and mask2 of size 100*100*1 respectively, and then mask1 and mask2 are concatenated into mask3 of size 100*100*2, and mask3 is concatenated with input1 downsampled to a feature map of 100*100*3; finally a feature map of 100*100*5 is obtained as the input of the next layer; mask3 is the distribution feature of the shadow part, and input1 is the original skin color map; the subsequent convolution network starts to perform the shadow removal operation; and, the previous step The feature map is taken as input and then passes through the convolution layer + relu layer (a total of 8 convolution layers + relu layers), where the convolution size is 100*100*1, and the number of convolution kernels gradually decreases from 5 to 3; the final output is mask4(100*100*3), where mask4 is a more uniform skin color map after removing the shadow influence of the original skin color in RGB space. The mask output by the first sub-network is an RGB map, here called mask4(100*100*3)3 corresponding to the RGB domain; the purpose of this network is to remove the shadow of the skin color and make the skin color on the image more uniform, which is convenient for subsequent processing; so after the original data passes through this sub-network, the problem of uneven skin color caused by some shadows on the skin color is reduced.

[0130] Next, build a sample brightness normalization network, which requires the de-shadowed mask4 obtained in the previous step. First, upsample mask4 to expand the size of 100*100*3 to 256*256*3 (mask5), and then fuse the initial skin color map of input1 (256*256*3) with mask. The specific fusion operation is: convert mask5 and input1 from RGB space to YUV space, and then fuse the two parts of the Y space on average, while the UV space remains unchanged. The new feature map obtained is the UV map of input1 and the fused Y map. Finally, convert the features from YUV space to RGB space and concatenate them with mask5 again to obtain input2 (256*256*6). Use input2 as the input of the brightness network.

[0131] Based on this, the training process of the brightness normalization subnetwork includes: input2, size: 256×256×6; then, it is followed by a convolution layer + relu layer combination, a total of 10 groups of network structures, including 1 group of convolution layers (convolution kernel 1×1×6, number of kernels 12, output feature map 256×256×12), 2 groups of convolution layers (convolution kernel size 1×1×12, number of kernels 10, output feature map 256×256×10), 3 to 8 groups of convolution layers (convolution kernel size 2×2×10, number of kernels 8, output feature map 100×100×8), 9 to 10 groups of convolution layers (convolution kernel size 100×100×8, number of kernels 3, output feature map 100×100×3); finally output mask6 (100*100*3), which is the image of the RGB skin color image after removing the brightness effect.

[0132] Then, the color temperature normalization subnetwork is constructed as follows Figure 5As shown, the network is trained with the data set and loss function, and the gain mask is generated using the cct information of the sample skin area image; the color temperature normalization model is equivalent to mapping all images to the color temperature of 5k; first calculate the difference between the current cct and 5k; use the formula: gain = (5000-cct) / 5000; get a value, and then expand the gain into gain mask, size is 100*100*1, that is, a matrix composed of 10000 gains; then, mask6 is processed, and the 0th, 1st, and 2nd layers of mask6 correspond to the r, g, and b images respectively. Then, to obtain r / g, b / g, the mask0 layer is divided by the 1st layer (the result is regarded as the 0th layer of awbmask6), and the mask2 layer is divided by the 1st layer (the result is regarded as the 2nd layer of awbmask6), and the 1st layer of awbmask6 is all 1st layer; finally, awbmask6 (100*100*3) is obtained; then, the mask7 input to the network is composed of mask6, gain The network structure is composed of mask and awbmask6 processed by mask6 (100*100*7); then, it is followed by a convolution layer + relu layer combination, a total of 10 groups of network structures, including 1 group of convolution layers (convolution kernel 1×1×7, number of cores 12, output feature map 100×100×12), 2 groups of convolution layers (convolution kernel size 1×1×12, number of cores 10, output feature map 100×100×10), 3 to 8 groups of convolution layers (convolution kernel size 1×1×10, number of cores 8, output feature map 100×100×8), 9 to 10 groups of convolution layers (convolution kernel size 100×100×8, number of cores 3, output feature map 100×100×3); finally, mask8 (100*100*3) is output, which is the RGB skin color image after removing the influence of color temperature.

[0133] Here, when the three sub-networks of the sample preprocessing network are trained, the three sub-networks can be trained separately first, and then the three networks can be trained together to reduce the training time; the input is the input1 initial network, and the output is the classified skin color corresponding to each skin color (such as Figure 6 , whiter people correspond to the RGB image of skin color block 1); here, the first preset training stop condition may include using the back propagation method to calculate the gradient of each parameter in the network, and using the stochastic gradient descent method to update the parameters of the network until the target loss function of the sub-network converges numerically, saving the network parameters, and ending the training process of the entire network.

[0134] The target loss function of the network is calculated as follows:

[0135]

[0136] Among them, L is the mean square error loss function, Xi represents the image of the network output result, and T represents the sample person skin color image.

[0137] Step 21022: input the first sample character image into the first initial de-shadowing processing sub-network to obtain a sample first skin color feature image.

[0138] Step 21023, input the first sample person image and the sample first skin color feature image into the first initial brightness normalization processing sub-network to obtain the sample second skin color feature image.

[0139] Step 21024, input the first sample character image and the sample second skin color feature image into the first initial color temperature normalization processing sub-network to obtain the sample third skin color feature image.

[0140] Step 21025, when the sample person skin color image matches the sample third skin color feature image, determine that the first initial sample preprocessing network meets the preset training stop condition, and obtain the initial sample preprocessing network.

[0141] Exemplarily, a face recognition image is obtained, and then the original skin color image is extracted from the face recognition image, and sent to the preprocessing training network to obtain the skin color RGB image without the influence of shadow, brightness, and color temperature. The skin color RGB image is then sent to the skin color classification network to finally obtain the skin color classification result; if the prediction probability of the classification result is less than 0.6, the preprocessing network can be recombined, such as adding two shadow removal sub-networks, or changing the connection order of the three sub-networks, to ensure the accuracy and stability of skin color classification.

[0142] It should be noted that the sample person skin color image in the embodiment of the present application is determined by a skin color image corresponding to a preset international skin color level, or by an average skin color image of a manually annotated skin color image after de-shading, brightness normalization and color temperature normalization.

[0143] For example, the sample person skin color image can be obtained by Figure 6The skin color image corresponding to the RGB color space can also be an average skin color image obtained by artificially removing the shadow, brightness, and color temperature of the face from the skin color image that has been manually annotated in the test data set. In summary, the result output by each sub-network in the embodiment of the present application is an image in the RGB color space, and the position order between the sub-networks can be arbitrarily replaced. During training, three sub-networks can be trained in parallel to save network training time and improve the training efficiency of the pre-processing network; and, the shadow removal network extracts the features of the skin color shadow part through judgment and operation on the Y channel to realize the operation of removing the shadow of the skin color part, and the brightness normalization network and the color temperature normalization network will perform corresponding normalization operations based on some current information or the information of the previous sub-network, so that the output skin color image is uniform, unified, and not affected by color temperature and brightness; and, this part of the network is used as a whole network, and users can also use the results output by each sub-network at will when using it, and do not have to use the final result of the whole network.

[0144] The image processing method provided in the embodiment of the present application can be executed by an image processing device. In the embodiment of the present application, an image processing device executing image processing is taken as an example to illustrate the device of the image processing method provided in the embodiment of the present application.

[0145] Based on the same inventive concept, the present application also provides an image processing device. Figure 7 Provide detailed explanation.

[0146] Figure 7 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application.

[0147] like Figure 7 As shown, the image processing device 70 can be applied to an electronic device, and the image processing device 70 can specifically include:

[0148] An acquisition module 701 is used to acquire a person image, wherein the person image includes a skin area image of the person;

[0149] The processing module 702 is used to perform image processing on the skin area image through a preprocessing network to obtain a skin color image of the person, wherein the pre-image network includes at least one of the following: a de-shadowing processing subnetwork, a brightness normalization processing subnetwork, and a color temperature normalization processing subnetwork; wherein the outputs of the de-shadowing processing subnetwork, the brightness normalization processing subnetwork, and the color temperature normalization processing subnetwork are all images in the same color space.

[0150] The image processing device 70 in the embodiment of the present application is described in detail below, as shown below.

[0151] In some embodiments of the present application, the processing module 702 in the embodiments of the present application can be specifically used to, when the preprocessing network includes a de-shadowing processing subnetwork and the character skin color image includes a first skin color feature image after the skin region image is de-shadowed, respectively downsample the first skin feature image and the second skin feature image extracted from the skin region image to obtain a first mask image corresponding to the first skin feature image and a second mask image corresponding to the second skin feature image; wherein the first skin feature image is an image of a skin color region in the skin region image whose pixel value is greater than or equal to a preset pixel value, and the second skin feature image is an image of a skin color region in the skin region image whose pixel value is less than the preset pixel value;

[0152] Performing image stitching processing on the first mask image and the second mask image to obtain a third mask image, where the third mask image is an image representing the light and dark distribution of the skin area image;

[0153] Based on the third mask image, the skin area image is de-shadowed to obtain a first skin color feature image.

[0154] In some embodiments of the present application, the image processing device 70 in the embodiment of the present application may further include a conversion module for converting the skin region image from the RGB color space to the YUV color space to obtain a first YUV skin region image;

[0155] The image processing device 70 in the embodiment of the present application may further include an extraction module, configured to extract a first YUV image and a second YUV image from the first YUV skin area image according to a first average pixel value of a Y channel in a YUV color space of the first YUV skin area image; wherein the pixel value of the Y channel in the first YUV image is greater than the first average pixel value, and the pixel value of the Y channel in the second YUV image is less than the first average pixel value;

[0156] The conversion module can also be used to convert the first YUV image and the second YUV image from the YUV color space to the RGB color space respectively, to obtain a first skin feature image corresponding to the first YUV image and a second skin feature image corresponding to the second YUV image.

[0157] In some embodiments of the present application, the processing module 702 in the embodiment of the present application can be specifically used for, when the preprocessing network includes a brightness normalization processing subnetwork, and the person skin color image includes a second skin color feature image after the skin region image is subjected to brightness normalization processing, performing image enhancement processing on the skin region image through the first skin region feature image corresponding to the skin region image to obtain a skin feature fusion image, wherein the number of image features in the skin feature fusion image is greater than the number of image features in the skin region image;

[0158] The skin feature fusion image is subjected to brightness averaging processing to obtain a second skin color feature image.

[0159] In some embodiments of the present application, the image processing device 70 in the embodiment of the present application may further include a conversion module for converting the skin region image and the first skin region feature image from the RGB color space to the YUV color space, respectively, to obtain a second YUV skin region image corresponding to the skin region image and a third YUV skin region image corresponding to the first skin region feature image;

[0160] The processing module 702 in the embodiment of the present application may be specifically used to average the pixel values ​​of the second YUV skin area image in the Y channel and the pixel values ​​of the third YUV skin area image in the Y channel to obtain a second average pixel value of the Y channel;

[0161] The image processing device 70 in the embodiment of the present application may further include a generating module, which is used to generate a first skin feature fused image based on the pixel value of the second YUV skin area image in the U channel, the pixel value of the V channel and the second average pixel value;

[0162] The conversion module may also be used to convert the first skin feature fusion image from the YUV color space to the RGB color space to obtain a second skin feature fusion image;

[0163] The processing module 702 may be specifically configured to perform image stitching processing based on the second skin feature fusion image and the first skin region feature image to obtain a skin feature fusion image.

[0164] In some embodiments of the present application, the acquisition module 701 may also be used to, when the preprocessing network further includes a de-shadowing processing subnetwork, acquire a first skin color feature image output by the de-shadowing processing subnetwork, where the first skin color feature image is an image of the skin region image after de-shadowing processing;

[0165] The image processing device 70 in the embodiment of the present application may further include a sampling module, which is used to upsample the first skin color feature image to obtain a fourth mask image, wherein the image size of the fourth mask image is larger than the image size of the first skin color feature image;

[0166] The image processing device 70 in the embodiment of the present application may further include a determination module, configured to determine the fourth mask image as the first skin area feature image.

[0167] In some embodiments of the present application, the image processing device 70 in the embodiment of the present application may further include a construction module, which is used to construct a fifth mask image according to the difference between the correlated color temperature information of the skin area image and the preset correlated color temperature information when the preprocessing network includes a color temperature normalization processing subnetwork and the person skin color image includes a third skin color feature image after the skin area image is subjected to color temperature normalization processing;

[0168] The processing module 702 in the embodiment of the present application may be specifically used to perform image stitching processing on the fifth mask image, the second skin region feature image corresponding to the skin region image, and the sixth mask image corresponding to the second skin region feature image to obtain a stitched image;

[0169] The image processing device 70 in the embodiment of the present application may further include a mapping module, which is used to perform color temperature mapping on the spliced ​​image according to preset related color temperature information to obtain a third skin color feature image.

[0170] In some embodiments of the present application, the acquisition module 701 may also be used to acquire the pixel value of the first R channel, the pixel value of the first G channel, and the pixel value of the first B channel of the second skin area characteristic image;

[0171] The image processing device 70 in the embodiment of the present application may further include a generating module, which is used to generate a pixel value of a second R channel based on the pixel value of the first R channel and the pixel value of the first G channel; generate a pixel value of a second B channel based on the pixel value of the first G channel and the pixel value of the first B channel; and determine the pixel value of the first G channel as the pixel value of the second G channel;

[0172] A sixth mask image is generated according to the pixel value of the second R channel, the pixel value of the second G channel, and the pixel value of the second B channel.

[0173] In some embodiments of the present application, the image processing device 70 in the embodiments of the present application may further include a determination module for determining the second skin color feature image output by the brightness normalization processing subnetwork as the sixth mask image when the preprocessing network also includes a brightness normalization processing subnetwork, and the second skin color feature image is an image of the skin area image after brightness normalization processing.

[0174] In some embodiments of the present application, the processing module 702 in the embodiment of the present application can also be used for, when the preprocessing network includes a de-shadowing processing subnetwork, a brightness normalization processing subnetwork and a color temperature normalization processing subnetwork; and the person's skin color image includes a fourth skin color feature image after the skin area image is subjected to de-shadowing processing, brightness normalization processing and color temperature normalization processing, respectively downsampling the first skin feature image and the second skin feature image extracted from the skin area image to obtain a first mask image corresponding to the first skin feature image and a second mask image corresponding to the second skin feature image; wherein the first skin feature image is an image of a skin color area in the skin area image whose pixel value is greater than or equal to a preset pixel value, and the second skin feature image is an image of a skin color area in the skin area image whose pixel value is less than a preset pixel value;

[0175] Performing image stitching processing on the first mask image and the second mask image to obtain a third mask image, where the third mask image is an image representing the light and dark distribution of the skin area image;

[0176] Based on the third mask image, performing shadow removal processing on the skin area image to obtain a first skin color feature image;

[0177] Performing image enhancement processing on the skin region image through the first skin color feature image to obtain a skin feature fusion image, wherein the number of image features in the skin feature fusion image is greater than the number of image features in the skin region image;

[0178] Performing brightness averaging processing on the skin feature fusion image to obtain a second skin color feature image;

[0179] constructing a fifth mask image according to the difference between the correlated color temperature information of the skin region image and the preset correlated color temperature information;

[0180] Performing image stitching processing on the fifth mask image, the second skin color feature image, and the sixth mask image corresponding to the second skin color feature image to obtain a stitched image;

[0181] According to the preset relevant color temperature information, color temperature mapping is performed on the spliced ​​image to obtain a fourth skin color feature image.

[0182] The image processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0183] The image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0184] The device coordination device provided in the embodiment of the present application can achieve Figures 1 to 6 The various processes implemented in the illustrated embodiment of the image processing method achieve the same technical effect, and will not be described again here to avoid repetition.

[0185] Based on this, the image processing device provided in the embodiment of the present application can be used to perform at least one of the following on the skin area image of the person in the acquired person image through a preprocessing network: shadow removal, brightness normalization, and color temperature normalization to obtain a person skin color image. In this way, before recognizing the skin color of the person image or providing the person skin color information to the user, the influence of brightness and color temperature on skin color recognition can be eliminated, and when there are different shadow areas on the face, the area of ​​the face skin color that is not normal can be removed, reducing the influence of the shadow area on skin color recognition, and more accurately restoring the user's skin color, thereby improving the stability of skin color recognition and the accuracy of determining the user's skin color.

[0186] Optional, such as Figure 8As shown, an embodiment of the present application further provides an electronic device 80, including a processor 801 and a memory 802, wherein the memory 802 stores programs or instructions that can be executed on the processor 801, and when the program or instructions are executed by the processor 801, the various steps of the above-mentioned image processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.

[0187] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0188] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

[0189] The electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, a processor 910 and other components.

[0190] Those skilled in the art will appreciate that the electronic device 900 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 910 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0191] In the embodiment of the present application, the processor 910 is used to obtain a person image, which includes a skin area image of the person. The processor 910 can also be used to perform image processing on the skin area image through a preprocessing network to obtain a skin color image of the person, wherein the pre-image network includes at least one of the following: a de-shadowing processing subnetwork, a brightness normalization processing subnetwork, and a color temperature normalization processing subnetwork; wherein the outputs of the de-shadowing processing subnetwork, the brightness normalization processing subnetwork, and the color temperature normalization processing subnetwork are all images in the same color space.

[0192] The electronic device 900 is described in detail below, as shown below.

[0193] In some embodiments of the present application, the processor 910 in the embodiment of the present application can be specifically used to, when the preprocessing network includes a de-shadowing processing subnetwork and the person's skin color image includes a first skin color feature image after the skin area image is de-shadowed, respectively downsample the first skin feature image and the second skin feature image extracted from the skin area image to obtain a first mask image corresponding to the first skin feature image and a second mask image corresponding to the second skin feature image; wherein the first skin feature image is an image of a skin color area in the skin area image whose pixel value is greater than or equal to a preset pixel value, and the second skin feature image is an image of a skin color area in the skin area image whose pixel value is less than the preset pixel value;

[0194] Performing image stitching processing on the first mask image and the second mask image to obtain a third mask image, where the third mask image is an image representing the light and dark distribution of the skin area image;

[0195] Based on the third mask image, the skin area image is de-shadowed to obtain a first skin color feature image.

[0196] In some embodiments of the present application, the processor 910 in the embodiment of the present application is used to convert the skin area image from the RGB color space to the YUV color space to obtain a first YUV skin area image;

[0197] Extracting a first YUV image and a second YUV image from the first YUV skin area image according to a first average pixel value of a Y channel in a YUV color space; wherein the pixel value of the Y channel in the first YUV image is greater than the first average pixel value, and the pixel value of the Y channel in the second YUV image is less than the first average pixel value;

[0198] The first YUV image and the second YUV image are respectively converted from the YUV color space to the RGB color space to obtain a first skin feature image corresponding to the first YUV image and a second skin feature image corresponding to the second YUV image.

[0199] In some embodiments of the present application, the processor 910 in the embodiment of the present application, when the preprocessing network includes a brightness normalization processing subnetwork and the person skin color image includes a second skin color feature image after the skin region image is subjected to brightness normalization processing, performs image enhancement processing on the skin region image through the first skin region feature image corresponding to the skin region image to obtain a skin feature fusion image, wherein the number of image features in the skin feature fusion image is greater than the number of image features in the skin region image;

[0200] The skin feature fusion image is subjected to brightness averaging processing to obtain a second skin color feature image.

[0201] In some embodiments of the present application, the processor 910 in the embodiment of the present application is used to convert the skin area image and the first skin area feature image from the RGB color space to the YUV color space respectively, to obtain a second YUV skin area image corresponding to the skin area image and a third YUV skin area image corresponding to the first skin area feature image;

[0202] Averaging the pixel values ​​of the second YUV skin area image in the Y channel and the pixel values ​​of the third YUV skin area image in the Y channel to obtain a second average pixel value of the Y channel;

[0203] Generate a first skin feature fusion image based on the pixel value of the second YUV skin area image in the U channel, the pixel value of the V channel and the second average pixel value;

[0204] Converting the first skin feature fusion image from the YUV color space to the RGB color space to obtain a second skin feature fusion image;

[0205] Image stitching processing is performed based on the second skin feature fusion image and the first skin area feature image to obtain a skin feature fusion image.

[0206] In some embodiments of the present application, the processor 910 in the embodiment of the present application is used to, when the preprocessing network further includes a de-shadowing processing subnetwork, obtain a first skin color feature image output by the de-shadowing processing subnetwork, where the first skin color feature image is an image of the skin region image after de-shadowing processing;

[0207] Upsampling the first skin color feature image to obtain a fourth mask image, wherein the image size of the fourth mask image is larger than the image size of the first skin color feature image;

[0208] The fourth mask image is determined as the first skin area feature image.

[0209] In some embodiments of the present application, the processor 910 in the embodiment of the present application is used to construct a fifth mask image according to the difference between the correlated color temperature information of the skin area image and the preset correlated color temperature information when the preprocessing network includes a color temperature normalization processing subnetwork and the character skin color image includes a third skin color feature image after the skin area image is subjected to color temperature normalization processing;

[0210] Performing image stitching processing on the fifth mask image, the second skin region characteristic image corresponding to the skin region image, and the sixth mask image corresponding to the second skin region characteristic image to obtain a stitched image;

[0211] According to the preset relevant color temperature information, color temperature mapping is performed on the spliced ​​image to obtain a third skin color feature image.

[0212] In some embodiments of the present application, the processor 910 in the embodiment of the present application may also be used to obtain the pixel value of the first R channel, the pixel value of the first G channel, and the pixel value of the first B channel of the second skin area feature image;

[0213] Generate a pixel value of a second R channel based on the pixel value of the first R channel and the pixel value of the first G channel; generate a pixel value of a second B channel based on the pixel value of the first G channel and the pixel value of the first B channel; and determine the pixel value of the first G channel as the pixel value of the second G channel;

[0214] A sixth mask image is generated according to the pixel value of the second R channel, the pixel value of the second G channel, and the pixel value of the second B channel.

[0215] In some embodiments of the present application, the processor 910 in the embodiments of the present application is used to determine the second skin color feature image output by the brightness normalization processing subnetwork as the sixth mask image when the preprocessing network also includes a brightness normalization processing subnetwork, and the second skin color feature image is an image of the skin area image after brightness normalization processing.

[0216] In some embodiments of the present application, the processor 910 in the embodiment of the present application can also be used for, when the preprocessing network includes a de-shadowing processing subnetwork, a brightness normalization processing subnetwork and a color temperature normalization processing subnetwork; and when the character skin color image is a fourth skin color feature image after the skin area image has been subjected to de-shadowing processing, brightness normalization processing and color temperature normalization processing, respectively downsampling processing is performed on the first skin feature image and the second skin feature image extracted from the skin area image to obtain a first mask image corresponding to the first skin feature image and a second mask image corresponding to the second skin feature image; wherein the first skin feature image is an image of a skin color area in the skin area image whose pixel value is greater than or equal to a preset pixel value, and the second skin feature image is an image of a skin color area in the skin area image whose pixel value is less than a preset pixel value;

[0217] Performing image stitching processing on the first mask image and the second mask image to obtain a third mask image, where the third mask image is an image representing the light and dark distribution of the skin area image;

[0218] Based on the third mask image, performing shadow removal processing on the skin area image to obtain a first skin color feature image;

[0219] Performing image enhancement processing on the skin region image through the first skin color feature image to obtain a skin feature fusion image, wherein the number of image features in the skin feature fusion image is greater than the number of image features in the skin region image;

[0220] Performing brightness averaging processing on the skin feature fusion image to obtain a second skin color feature image;

[0221] constructing a fifth mask image according to the difference between the correlated color temperature information of the skin region image and the preset correlated color temperature information;

[0222] Performing image stitching processing on the fifth mask image, the second skin color feature image, and the sixth mask image corresponding to the second skin color feature image to obtain a stitched image;

[0223] According to the preset relevant color temperature information, color temperature mapping is performed on the spliced ​​image to obtain a fourth skin color feature image.

[0224] It should be understood that the input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes the image data of a static image or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 906 may include a display panel, and the display panel may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 907 includes a touch panel 9071 and at least one of other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch display. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as a volume display button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0225] The memory 909 can be used to store software programs and various data. The memory 909 can mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area can store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 909 can include a volatile memory or a non-volatile memory, or the memory 909 can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 909 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0226] The processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless display signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 910.

[0227] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned image processing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0228] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0229] In addition, an embodiment of the present application further provides a chip, which includes a processor and a display interface, the display interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0230] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0231] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned image processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0232] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0233] In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.

[0234] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.

[0235] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An image processing method, characterized in that: include: Acquire a person image, wherein the person image includes a skin area image of the person; The skin area image is processed by a preprocessing network to obtain a skin color image of the person, wherein the preprocessing network includes at least one of the following: a shadow removal processing subnetwork, a brightness normalization processing subnetwork, and a color temperature normalization processing subnetwork; wherein the outputs of the shadow removal processing subnetwork, the brightness normalization processing subnetwork, and the color temperature normalization processing subnetwork are all images in the same color space.

2. The method according to claim 1, characterized in that The preprocessing network includes a shadow removal processing subnetwork, and the character skin color image includes a first skin color feature image after the skin area image is subjected to shadow removal processing; The step of performing image processing on the skin region image through a preprocessing network to obtain a skin color image of a person includes: Downsampling the first skin feature image and the second skin feature image extracted from the skin region image respectively to obtain a first mask image corresponding to the first skin feature image and a second mask image corresponding to the second skin feature image; wherein the first skin feature image is an image of a skin color region in the skin region image whose pixel value is greater than or equal to a preset pixel value, and the second skin feature image is an image of a skin color region in the skin region image whose pixel value is less than the preset pixel value; Performing image stitching processing on the first mask image and the second mask image to obtain a third mask image, wherein the third mask image is an image representing the light and dark distribution of the skin area image; Based on the third mask image, the skin area image is subjected to shadow removal processing to obtain the first skin color feature image.

3. The method according to claim 2, characterized in that Before downsampling the first skin feature image and the second skin feature image respectively extracted from the skin region image, the method further includes: Convert the skin region image from the RGB color space to the YUV color space to obtain a first YUV skin region image; Extracting a first YUV image and a second YUV image from the first YUV skin area image according to a first average pixel value of the Y channel of the first YUV skin area image in the YUV color space; wherein the pixel value of the Y channel in the first YUV image is greater than the first average pixel value, and the pixel value of the Y channel in the second YUV image is less than the first average pixel value; The first YUV image and the second YUV image are respectively converted from the YUV color space to the RGB color space to obtain a first skin feature image corresponding to the first YUV image and a second skin feature image corresponding to the second YUV image.

4. The method according to claim 1, characterized in that: The preprocessing network includes a brightness normalization processing subnetwork, and the character skin color image includes a second skin color feature image after the skin area image is subjected to brightness normalization processing; The step of performing image processing on the skin region image through a preprocessing network to obtain a skin color image of a person includes: Performing image enhancement processing on the skin region image by using a first skin region feature image corresponding to the skin region image to obtain a skin feature fusion image, wherein the number of image features in the skin feature fusion image is greater than the number of image features in the skin region image; Perform brightness averaging processing on the skin feature fusion image to obtain the second skin color feature image.

5. The method according to claim 4, characterized in that The step of performing image enhancement processing on the skin region image by using a first skin region feature image corresponding to the skin region image to obtain a skin feature fusion image comprises: Convert the skin region image and the first skin region characteristic image from RGB color space to YUV color space respectively, to obtain a second YUV skin region image corresponding to the skin region image and a third YUV skin region image corresponding to the first skin region characteristic image; Averaging the pixel values ​​of the second YUV skin area image in the Y channel and the pixel values ​​of the third YUV skin area image in the Y channel to obtain a second average pixel value of the Y channel; Generate a first skin feature fusion image based on the pixel value of the second YUV skin area image in the U channel, the pixel value of the V channel and the second average pixel value; Converting the first skin feature fusion image from the YUV color space to the RGB color space to obtain a second skin feature fusion image; Image stitching processing is performed based on the second skin feature fusion image and the first skin area feature image to obtain the skin feature fusion image.

6. The method according to claim 4, characterized in that The preprocessing network also includes a shadow removal processing subnetwork; before performing image enhancement processing on the skin area image using a first skin area feature image corresponding to the skin area image, the method also includes: Acquire a first skin color feature image output by the shadow removal processing subnetwork, wherein the first skin color feature image is an image of the skin region image after the shadow removal processing; Upsampling the first skin color feature image to obtain a fourth mask image, wherein the image size of the fourth mask image is larger than the image size of the first skin color feature image; The fourth mask image is determined as the first skin area feature image.

7. The method according to claim 1, characterized in that The preprocessing network includes a color temperature normalization processing subnetwork, and the character skin color image includes a third skin color feature image after the skin area image is subjected to color temperature normalization processing; The step of performing image processing on the skin region image through a preprocessing network to obtain a skin color image of a person includes: constructing a fifth mask image according to the difference between the correlated color temperature information of the skin region image and the preset correlated color temperature information; performing image stitching processing on the fifth mask image, the second skin region characteristic image corresponding to the skin region image, and the sixth mask image corresponding to the second skin region characteristic image to obtain a stitched image; According to the preset correlated color temperature information, color temperature mapping is performed on the spliced ​​image to obtain the third skin color feature image.

8. The method according to claim 7, characterized in that Before performing image stitching processing on the fifth mask image, the second skin region feature image corresponding to the skin region image, and the sixth mask image corresponding to the second skin region feature image, the method further includes: Acquire pixel values ​​of a first R channel, a first G channel, and a first B channel of the second skin region feature image; Generate a pixel value of a second R channel based on the pixel value of the first R channel and the pixel value of the first G channel; generate a pixel value of a second B channel based on the pixel value of the first G channel and the pixel value of the first B channel; and determine the pixel value of the first G channel as the pixel value of the second G channel; The sixth mask image is generated according to the pixel value of the second R channel, the pixel value of the second G channel, and the pixel value of the second B channel.

9. The method according to claim 7, characterized in that: The preprocessing network also includes a brightness normalization processing subnetwork; the method also includes: The second skin color feature image output by the brightness normalization processing sub-network is determined as the sixth mask image, wherein the second skin color feature image is an image of the skin area image after brightness normalization processing.

10. The method according to claim 1, characterized in that The preprocessing network includes a de-shadowing processing subnetwork, a brightness normalization processing subnetwork and a color temperature normalization processing subnetwork; the character skin color image includes a fourth skin color feature image after the skin area image has been subjected to de-shadowing processing, brightness normalization processing and color temperature normalization processing; The step of performing image processing on the skin region image through a preprocessing network to obtain a skin color image of a person includes: Downsampling the first skin feature image and the second skin feature image extracted from the skin region image respectively to obtain a first mask image corresponding to the first skin feature image and a second mask image corresponding to the second skin feature image; wherein the first skin feature image is an image of a skin color region in the skin region image whose pixel value is greater than or equal to a preset pixel value, and the second skin feature image is an image of a skin color region in the skin region image whose pixel value is less than the preset pixel value; Performing image stitching processing on the first mask image and the second mask image to obtain a third mask image, wherein the third mask image is an image representing the light and dark distribution of the skin area image; Based on the third mask image, performing a shadow removal process on the skin area image to obtain a first skin color feature image; Performing image enhancement processing on the skin region image through the first skin color feature image to obtain a skin feature fusion image, wherein the number of image features in the skin feature fusion image is greater than the number of image features in the skin region image; Performing brightness averaging processing on the skin feature fusion image to obtain a second skin color feature image; constructing a fifth mask image according to the difference between the correlated color temperature information of the skin region image and the preset correlated color temperature information; performing image stitching processing on the fifth mask image, the second skin color feature image, and a sixth mask image corresponding to the second skin color feature image to obtain a stitched image; According to the preset correlated color temperature information, color temperature mapping is performed on the spliced ​​image to obtain the fourth skin color feature image.

11. An image processing device, characterized in that: include: An acquisition module, used for acquiring a person image, wherein the person image includes a skin area image of the person; A processing module is used to perform image processing on the skin area image through a preprocessing network to obtain a human skin color image, wherein the preprocessing network includes at least one of the following: a de-shadowing processing subnetwork, a brightness normalization processing subnetwork, and a color temperature normalization processing subnetwork; wherein the outputs of the de-shadowing processing subnetwork, the brightness normalization processing subnetwork, and the color temperature normalization processing subnetwork are all images in the same color space.