Image buffing processing method and device and storage medium
By extracting high-frequency information of the face area in the image skin grinding process and weighting it with skin tone confidence and skin grinding intensity, the problem of loss of facial texture details in the prior art is solved, improving the skin grinding effect and presenting a natural skin tone texture.
Patent Information
- Application Number
- CN202510401927.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-08
AI Technical Summary
The prior art tends to lose facial texture details in image skin grinding processing, resulting in poor skin grinding effect.
By extracting high-frequency information of the face area and superimposing it into the initial skin grinding image, weighting is performed in combination with skin color confidence and skin grinding intensity to optimize the skin grinding effect.
Reduces the loss of facial texture details, improves the skin-beating effect, and presents a natural skin tone texture.
Smart Images

Figure CN120278923A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and particularly relates to a method, device, and storage medium for image skin smoothing processing. Background Art
[0002] In the image skin smoothing processing technology, skin tone regions in an image are usually smoothed to make the faces in the skin tone regions of the image smooth.
[0003] In the related art, when smoothing an image, performing the same degree of smoothing processing on the face region may result in the loss of facial texture details and a poor skin smoothing effect. Summary of the Invention
[0004] Embodiments of this application provide a method, device, and storage medium for image skin smoothing processing. During skin smoothing processing, it is possible to reduce the loss of facial texture details, thereby improving the skin smoothing effect. The technical solutions adopted are as follows:
[0005] In a first aspect, this application provides a method for image skin smoothing processing, and the method includes:
[0006] In a face image, extract high-frequency information of the face region and obtain an initial skin-smoothed image of the face image;
[0007] Overlay the high-frequency information onto the initial skin-smoothed image to obtain sharpened texture information of the face region;
[0008] Determine the skin color confidence of each pixel point in the face region and determine the skin smoothing intensity of each pixel point in the face region;
[0009] Based on the skin color confidence and skin smoothing intensity of each pixel point, determine the composite weight of each pixel point;
[0010] According to the composite weight, perform weighted processing on the pixel values of the sharpened texture information and the face region in the initial skin-smoothed image to obtain an optimized skin-smoothed image.
[0011] In an optional manner, the overlaying the high-frequency information onto the initial skin-smoothed image to obtain the sharpened texture information of the face region includes:
[0012] For each pixel point in the face region, perform scaling processing on the high-frequency information of the pixel point to obtain a scaling processing result corresponding to the pixel point. Based on the scaling processing result corresponding to the pixel point and the pixel value of the pixel point in the initial skin-smoothed image, calculate an intermediate result corresponding to the pixel point. Based on the intermediate result corresponding to the pixel point, calculate the sharpened texture information of the pixel point.
[0013] In an alternative manner, calculating the intermediate result corresponding to the pixel point based on the scaling processing result corresponding to the pixel point and the pixel value of the pixel point in the initial skin-smoothed image includes:
[0014] For each pixel point in the face region, adding the scaling processing result corresponding to the pixel point and the pixel value of the pixel point in the initial skin-smoothed image to obtain the intermediate result corresponding to the pixel point.
[0015] In an alternative manner, determining the skin-smoothed intensity of each pixel point in the face region includes:
[0016] For each pixel point, adjusting the initial skin-smoothed intensity of the pixel point based on the scaling coefficient of the skin-smoothed intensity to obtain the skin-smoothed intensity of the pixel point.
[0017] In an alternative manner, determining the skin color confidence of each pixel point in the face region includes:
[0018] Performing a bright look-up table (LUT) mapping process on the face region to obtain first red channel texture information, and performing a blurring process on the face region to obtain second red channel texture information;
[0019] Based on the first red channel texture information and the second red channel texture information, determining the skin color confidence of each pixel point.
[0020] In this way, the skin color confidence can be accurately obtained.
[0021] In an alternative manner, extracting the high-frequency information of the face region in the face image includes:
[0022] Performing a Gaussian filtering process or a low-pass filtering process on the face region to obtain the low-frequency information of the face region;
[0023] Removing the low-frequency information from the face region to obtain the high-frequency information of the face region.
[0024] In an alternative manner, the method further includes:
[0025] Converting the face image from the RGB space to the YCbCr space to obtain the luminance value and chrominance value of the face image in the YCbCr space;
[0026] Based on the luminance value and the chrominance value, determining the face region in the face image.
[0027] In this way, the face image is converted from the RGB space to the YCbCr space to better distinguish the face region.
[0028] In a second aspect, the present application provides an apparatus for image skin smoothing processing, the apparatus includes:
[0029] An acquisition module is configured to extract high-frequency information of the face region in the face image and obtain an initial skin-smoothed image of the face image;
[0030] A synthesis module is configured to superimpose the high-frequency information onto the initial skin-smoothed image to obtain sharpened texture information of the face region;
[0031] A determination module is configured to determine the skin color confidence of each pixel point in the face region and determine the skin smoothing intensity of each pixel point in the face region;
[0032] The determination module is further configured to determine a synthesis weight of each pixel point based on the skin color confidence and the skin smoothing intensity of each pixel point;
[0033] The synthesis module is further configured to perform weighted processing on the pixel values of the sharpened texture information and the face region in the initial skin-smoothed image according to the synthesis weight to obtain an optimized skin-smoothed image.
[0034] In an optional manner, the synthesis module is configured to, for each pixel point in the face region, perform scaling processing on the high-frequency information of the pixel point to obtain a corresponding scaling processing result of the pixel point, calculate a corresponding intermediate result of the pixel point based on the corresponding scaling processing result of the pixel point and the pixel value of the pixel point in the initial skin-smoothed image, and calculate the sharpened texture information of the pixel point based on the corresponding intermediate result of the pixel point.
[0035] In an optional manner, the synthesis module is configured to, for each pixel point in the face region, add the corresponding scaling processing result of the pixel point and the pixel value of the pixel point in the initial skin-smoothed image to obtain a corresponding intermediate result of the pixel point.
[0036] In an optional manner, the determination module is configured to, for each pixel point, adjust the initial skin smoothing intensity of the pixel point based on a scaling coefficient of the skin smoothing intensity to obtain the skin smoothing intensity of the pixel point.
[0037] In an optional manner, the determination module is configured to perform bright look-up table (LUT) mapping processing on the face region to obtain first red channel texture information, and perform blurring processing on the face region to obtain second red channel texture information;
[0038] Determine the skin color confidence of each pixel point based on the first red channel texture information and the second red channel texture information.
[0039] In an alternative manner, the obtaining module is configured to perform Gaussian filtering or low-pass filtering on the face region to obtain the low-frequency information of the face region;
[0040] Remove the low-frequency information from the face region to obtain the high-frequency information of the face region.
[0041] In an alternative manner, the determining module is further configured to convert the face image from the red, green, blue (RGB) space to the luminance-chrominance (YCbCr) space to obtain the luminance value and chrominance value of the face image in the YCbCr space; and determine the face region in the face image based on the luminance value and the chrominance value.
[0042] In a third aspect, the present application provides an electronic device, which includes a processor and a memory. At least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the method described in the first aspect or any alternative manner of the first aspect above.
[0043] In a fourth aspect, the present application provides a computer-readable storage medium, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the method described in the first aspect or any alternative manner of the first aspect above.
[0044] In a fifth aspect, the present application provides a computer program product, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the method described in the first aspect or any alternative manner of the first aspect above.
[0045] The beneficial effects brought by the technical solution provided by the present application are:
[0046] Extract the high-frequency information of the face region from the original face image and superimpose it on the initial skin-smoothed image to obtain sharpened texture information, and calculate the skin color confidence. Based on the skin color confidence and the skin-smoothed intensity, synthesize the sharpened texture information with the initial skin-smoothed image to reduce the loss of facial texture details in the image skin-smoothed process, thereby improving the skin-smoothed effect. Description of the Drawings
[0047] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0048] Figure 1 is a schematic diagram of an interactive live video stream provided by an embodiment of the present application;
[0049] Figure 2 is a schematic diagram of another interactive live video stream provided by an embodiment of the present application;
[0050] Figure 3 is a schematic flowchart of a method for image skin smoothing processing provided by an embodiment of the present application;
[0051] Figure 4 is a flowchart block diagram of a method for image skin smoothing processing provided by an embodiment of the present application;
[0052] Figure 5 is a schematic structural diagram of a device for image skin smoothing processing provided by an embodiment of the present application;
[0053] Figure 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0054] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail in conjunction with the accompanying drawings.
[0055] In the field of image skin smoothing processing, in order to make the human face in the image smooth, the same skin smoothing intensity is usually used to perform skin smoothing processing on each position in the skin color area, which may result in the loss of facial texture details. In this way, the skin smoothing effect will be poor.
[0056] Based on this, the embodiments of the present application provide a method for image skin smoothing processing. In this method, the skin color confidence and skin smoothing intensity of each pixel point are used to adaptively superimpose the high-frequency information of the original human face area in the human face area of the initial skin-smoothed image, reducing the loss of facial texture details during skin smoothing processing, so as to enable the human face area to present a natural skin color texture.
[0057] In the embodiments of the present application, the execution subject of the method for image skin smoothing processing is an electronic device, which is a terminal or a server, and the terminal includes but is not limited to a mobile phone, a tablet computer, or a computer, etc.
[0058] The application scenarios of the embodiments of the present application include but are not limited to the following two scenarios.
[0059] Scenario 1: Process the captured original image. For example, after a user takes an image with a mobile phone, a beauty application is used to perform beauty processing on the image. During the beauty processing, the user can choose to perform skin smoothing processing on the image.
[0060] Scenario 2: The method of image skin smoothing processing can be applied to a live broadcast scenario to process the face image in the live broadcast screen. The execution entity can be a terminal or a server. For example, refer to Figure 1 , during the live broadcast, after the terminal used by the live broadcast host (i.e., the host terminal) captures the live video stream, the face image in it is processed to obtain an optimized skin-smoothed image, and the processed live video stream is sent to the server, so that the server sends the live video stream to the terminals of the viewers in the live broadcast room (i.e., the viewer terminals). Another example, refer to Figure 2 , during the live broadcast, after the terminal used by the live broadcast host captures the live video stream, the face image in it is subjected to image skin smoothing processing, and the originally captured live video stream is sent to the server. The server performs image skin smoothing processing on the face image in it, and the server sends the processed live video stream to the terminals of the viewers in the live broadcast room.
[0061] The following describes the method flow of image skin smoothing processing. Refer to Figure 3 Steps 101 to 104 in
[0062] Step 101: In the face image, extract the high-frequency information of the face area and obtain the initial skin-smoothed image of the face image.
[0063] Among them, the face image is an image that has not been subjected to skin smoothing processing and is the original image. The face image is an image containing a face, and the face image is an image in the RGB (Red Green Blue) space. The high-frequency information includes but is not limited to the face details (or called facial details) and contours of the face area, etc.
[0064] In this embodiment, after the electronic device obtains the face image, it obtains the initial skin-smoothed image of the face image. The initial skin-smoothed image is the skin-smoothed image output by the existing skin smoothing module for the face image, and the skin smoothing intensity at each position point in the face area may be the same. For example, the face image is input into the existing skin smoothing module to obtain the initial skin-smoothed image. The skin smoothing effect of the initial skin smoothing module is poor, and information such as facial texture details is lost, or the initial skin-smoothed image is directly obtained from other devices. And the electronic device determines the face area from the face image, and then extracts the high-frequency information in the face area. There are various ways to extract the high-frequency information. Two feasible ways are provided as follows:
[0065] Method 1: Perform low-pass filtering on each pixel in the face region to obtain the low-frequency information of each pixel. For each pixel, remove the low-frequency information of the pixel from the pixel in the face region to obtain the high-frequency information of each pixel.
[0066] Among them, for the pixel (u, v) in the face region, u represents the coordinate value in the width direction, v represents the coordinate value in the height direction, and the pixel value is expressed as including the R value, G value, and B value. The pixel (u, v) is processed by low-pass filtering using formula (1).
[0067]
[0068] In formula (1), represents the low-frequency information of the pixel (u, v), ow and oh are the offsets of the pixel (u, v) in the width and height directions respectively, which are empirical values, and a0 is the low-pass coefficient. When performing low-pass filtering using formula (1), the R channel, G channel, and B channel are calculated using formula (1) respectively. In this way, the R value, G value, and B value of the texture corresponding to the pixel (u, v) in the RGB space can be obtained.
[0069] Method 2: Perform Gaussian filtering on each pixel in the face region to obtain the low-frequency information of each pixel. For each pixel, remove the low-frequency information of the pixel from the pixel in the face region to obtain the high-frequency information of each pixel.
[0070] Among them, the face region is processed by Gaussian filtering using formula (2) and formula (3).
[0071]
[0072]
[0073] In formula (2) and formula (3), G(i, j) is the weight of the Gaussian filter, the value ranges of i and j are from -k to k, σ is the standard deviation, and the window size of this Gaussian filtering process (also known as the size of the Gaussian filter) is (2k + 1) × (2k + 1). represents the low-frequency information of the pixel (u, v).
[0074] After obtaining the low-frequency information of the face region through Method 1 and Method 2, the high-frequency information of the face region is extracted using formula (4) to formula (6).
[0075]
[0076] In Formulas (4) to (6), a1 and b1 are scaling factors, and c1 and d1 are threshold factors, both of which are determined based on simulation or empirical values.
[0077] In Formula (5) represents taking the maximum value of c1 and in represents taking the minimum value of d1 and in. The reason for adopting Formula (5) is: to constrain the value range of In is less than 0.5, the value is 0, and in is greater than or equal to 0.5, the value is 1.
[0078] Step 102: Superimpose the high-frequency information onto the initial skin-smoothing image to obtain the sharpened texture information of the face region.
[0079] In this embodiment, for each pixel point in the face region, the high-frequency information of the pixel point is superimposed onto the position of the pixel point in the initial skin-smoothing image to obtain the sharpened texture information of the pixel point, and the sharpened texture information is the texture information superimposed with high-frequency information. In this way, the sharpened texture information of each pixel point in the face region can be obtained.
[0080] In an alternative manner, for each pixel point in the face region, the high-frequency information of the pixel point is scaled to obtain the corresponding scaling result of the pixel point, and based on the corresponding scaling result of the pixel point and the pixel value of the pixel point in the initial skin-smoothing image, an intermediate result corresponding to the pixel point is calculated, and the sharpened texture information of the pixel point is calculated using the intermediate result.
[0081] Optionally, for each pixel point in the face region, the corresponding scaling result of the pixel point and the pixel value of the pixel point in the initial skin-smoothing image are added to obtain the intermediate result of the pixel point.
[0082] Optionally, Formula (7) is used to determine the sharpened texture information.
[0083]
[0084] wherein, in Formula (7), is the pixel value of the pixel point (u, v) in the initial skin-smoothing image, including the R value, G value, and B value. a2 and b2 are scaling factors, both of which are determined based on simulation or empirical values, is the intermediate result corresponding to the pixel point (u, v). The sharpened texture information of the pixel point (u, v) is or is based on Determined, and the determination method can be referred to formula (8).
[0085]
[0086] Among them, in formula (8), is the sharpened texture information of the pixel point (u, v), c2 and d2 are threshold coefficients, both of which are determined according to simulation or empirical values. represents taking the maximum value between c2 and ; represents taking the minimum value between d2 and . The definition of can be referred to formula (6), and the reason for adopting formula (8) is to constrain the value range of the sharpened texture information.
[0087] Step 103: Determine the skin color confidence of each pixel point in the face region, and determine the skin smoothing intensity of each pixel point in the face region.
[0088] In this embodiment, the electronic device determines the skin color confidence of each pixel point in the face region. For each pixel point, the skin color confidence of the pixel point is used to indicate the probability that the pixel point is skin color. And obtain the skin smoothing intensity of each pixel point.
[0089] Among them, step 103 can be executed before step 102 or after step 102, and the embodiments of the present application do not limit this.
[0090] In an optional manner, the method for determining the skin color confidence is as follows:
[0091] Perform a bright LUT (Look-Up Table) mapping process on the face region to obtain the first red channel texture information, and perform a blurring process on the face region to obtain the second red channel texture information. For example, the electronic device obtains the LUT, and the LUT includes the mapping relationship between the RGB channel texture and the red channel texture. Look up the red channel texture corresponding to the pixel value (R value, G value, and B value) of the pixel point (u, v) in the LUT to obtain the first red channel texture information of the pixel point (u, v). Or, the electronic device obtains the LUT, and the LUT includes the mapping relationship between the R channel texture and the red channel texture. Look up the red channel texture corresponding to the R value of the pixel point (u, v) in the LUT to obtain the first red channel texture information of the pixel point (u, v). In this way, for the pixel point (u, v), after performing the bright LUT mapping process, the first red channel texture information can be obtained. And input the face region into a blurring algorithm to obtain the blurred face region, and obtain the R value of each pixel in the blurred face region, that is, obtain the second red channel texture information of each pixel. For example, for the pixel (u, v), the second red channel texture information is
[0092] Here, the blurring algorithm is any image blurring algorithm, which is not limited in the embodiments of the present application. For example, Gaussian blurring algorithm or mean blurring algorithm, etc.
[0093] Then, based on the first red channel texture information and the second red channel texture information, determine the skin color confidence of each pixel. Exemplarily, the skin color confidence can be determined by using Formula (9) and Formula (10).
[0094]
[0095] Among them, in Formula (9) and Formula (10), is the intermediate quantity of the pixel (u, v), is the first red channel texture information of the pixel (u, v), is the second red channel texture information of the pixel (u, v), is the skin color confidence of the pixel (u, v), a3, b3, and c3 are scaling coefficients, and a4 and b4 are threshold coefficients, all of which are determined according to simulations or empirical values.
[0096] It should be noted here that since the red channel can better distinguish skin color, therefore, using the red channel texture to determine the skin color confidence will be more accurate.
[0097] In an optional manner, the method for obtaining the skin smoothing strength is as follows:
[0098] First, determine the face segmentation mask information of the face image, and then use the face segmentation mask information to determine the face region. Next, update the initial skin smoothing strength of each pixel in the face region to obtain the skin smoothing strength of each pixel. The following provides two feasible ways to determine the face segmentation mask information.
[0099] Method 1: Through Formulas (11) to (13), convert the face image from the RGB space to the luminance-chrominance YCbCr space to obtain the luminance value and chrominance value of the face image in the YCbCr space. The RGB space is also called the RGB color space, and the YCbCr space is also called the YCbCr color space.
[0100]
[0101] Among them, in Formulas (11) to (13), the spatial conversion is performed on the pixel (u, v), is the R value of the pixel point (u, v), is the G value of the pixel point (u, v), is the B value of the pixel point (u, v). is the brightness value of the pixel point (u, v), and are both the chromaticity values of the pixel point (u, v), is the blue chromaticity component of the pixel point (u, v), is the red chromaticity component of the pixel point (u, v).
[0102] Then, the face segmentation mask information is determined according to formula (14).
[0103]
[0104] Among them, formula (14) indicates that when is satisfied, it means that the pixel point (u, v) belongs to the face region, and the mask value is 1; otherwise, it is 0. The pixel points with a mask value of 0 do not belong to the face region. In this way, for each pixel point, processing is performed according to formulas (11) to (14), and the mask value of this pixel point can be obtained. The mask values of all pixel points constitute the face segmentation mask information. The face region in step 101 can also be determined in this way. For example, after obtaining the face segmentation mask information, the pixel points with a mask value of 1 are determined, and the face region includes the pixel points with a mask value of 1.
[0106] Method 2: Determine the face region in the face image through a matte software. The mask value of the pixel points in the face region is 1, and the mask value of the pixel points in other regions is 0.
[0107] The method for determining the face region here is the same as the method for determining the face region in the previous text.
[0108] Optionally, the process of obtaining the skin smoothing strength is as follows:
[0109] Obtain the initial skin smoothing strength of each pixel point in the face region. The initial skin smoothing strengths of all pixel points in the face region can be the same, which are all the skin smoothing strength set by the user or the skin smoothing strength of the original skin smoothing module. Or, there are pixel points with different initial skin smoothing strengths in the face region. For each pixel point, the initial skin smoothing strength is updated using the mask value of this pixel point to obtain the skin smoothing strength of this pixel point.
[0110] The method for updating the initial skin smoothing strength is as follows:
[0111] Method 1: Use formula (15) to determine the skin smoothing strength of the pixel point (u, v).
[0112]
[0113] Among them, in formula (15), is the skin smoothing intensity of pixel point (u, v), c4 is a scaling coefficient, which is determined according to simulation or empirical values, is the mask value of pixel point (u, v), and α u,v is the initial skin smoothing intensity of pixel point (u, v). Here, the mask value of pixel point (u, v) is 1, and formula (15) can be simplified to
[0114] Method 2: Use formulas (16) and (17) to determine the skin smoothing intensity of pixel point (u, v).
[0115]
[0116] Among them, in formulas (16) and (17), is an intermediate quantity, c5 is a scaling coefficient, which is determined according to simulation or empirical values, is the mask value of pixel point (u, v), and α u,v is the initial skin smoothing intensity of pixel point (u, v), is the skin smoothing intensity of pixel point (u, v), and a5, b5 are scaling coefficients, which are determined according to simulation or empirical values, Referring to the definition in formula (6), here the mask value of pixel point (u, v) is 1, and formula (16) can be simplified to c5 and c4 can be the same or different.
[0117] Adopting Method 2 can better constrain it within a range.
[0118] It should be noted that when the initial skin smoothing intensities of all pixel points in the face region are the same, since the mask values of all pixel points in the face region are the same, therefore, the skin smoothing intensity can be calculated only once, and this skin smoothing intensity is determined as the skin smoothing intensity of all pixel points in the face region.
[0119] Step 104: Based on the skin color confidence and skin smoothing intensity of each pixel point, determine the synthesis weight of each pixel point, and according to this synthesis weight, perform weighted processing on the sharpened texture information and the pixel values of the face region in the initial skin smoothing image to obtain an optimized skin smoothing image.
[0120] In this embodiment, for each pixel point in the face region, the electronic device determines the synthesis weight of the pixel point using the skin color confidence of the pixel point and the skin smoothing intensity of the pixel point. According to the synthesis weight, the sharpened texture information and the pixel values of the face region in the initial skin-smoothed image are weighted to obtain the optimized pixel value of the pixel point. In this way, by processing each pixel point in this manner, an optimized skin-smoothed image can be obtained.
[0121] In an alternative approach, the process of synthesizing the sharpened texture information into the face region of the initial skin-smoothed image using the skin color confidence and the skin smoothing intensity is shown in Formulas (18) and (19).
[0122]
[0123] Wherein, in Formulas (18) and (19), is the synthesis weight of the pixel point (u, v) in the initial skin-smoothed image, is the synthesis weight of the sharpened texture information of the pixel point (u, v). b6 is the threshold coefficient, and c6 is the scaling coefficient, both of which are determined according to empirical values or simulations. is the optimized texture of the pixel point (u, v), that is, the optimized pixel value. is the pixel value of the pixel point (u, v) in the initial skin-smoothed image. is the sharpened texture information of the pixel point (u, v). In the optimized image, the R value, G value, and B value of the pixel point (u, v) are calculated separately using Formula (19).
[0124] It should be noted that in the embodiments of the present application, Steps 101 and 102 are processed for the face region. In another implementation, Steps 101 and 102 can also be processed for the face image, but the content of the non-face region is not used subsequently. The content of the non-face region is the content of the non-face region in the initial skin-smoothed image. However, the sharpened texture information of the non-face region can be used for some other enhancement processes, so that there is no need to repeatedly determine the sharpened texture information.
[0125] To better understand the process of the embodiments of the present application, Figure 4 a flowchart of the image skin smoothing process is also provided. For the specific process content, please refer to Figure 3 which is described herein and will not be elaborated further.
[0126] In the embodiments of the present application, the skin color confidence of each pixel in the face region is used to adaptively synthesize the high-frequency information of the original face region in the face region of the initial skin-smoothed image. The high-frequency information is facial texture details and some contours, so as to reduce the loss of facial texture details in the skin-smoothed process and the portrait distortion caused by smooth transition, so as to be able to present a natural skin color texture, and further enhance the skin-smoothed texture of the initial skin-smoothed image. In addition, during the skin-smoothed process, there is no need to reconstruct the face image, so the complexity is low and the calculation amount is small, so that a face image with better skin-smoothed effect can be obtained quickly.
[0127] All the above optional technical solutions can be combined arbitrarily to form optional embodiments of the present application, which will not be elaborated here one by one.
[0128] Based on the same technical concept, the embodiments of the present application also provide an apparatus for image skin smoothing processing, as Figure 5 shown. The apparatus includes:
[0129] An acquisition module 510 is configured to extract high-frequency information of a face region in a face image and obtain an initial skin-smoothed image of the face image;
[0130] A synthesis module 520 is configured to superimpose the high-frequency information on the initial skin-smoothed image to obtain sharpened texture information of the face region;
[0131] A determination module 530 is configured to determine the skin color confidence of each pixel in the face region and determine the skin-smoothed intensity of each pixel in the face region;
[0132] The determination module 530 is further configured to determine a synthesis weight of each pixel based on the skin color confidence and skin-smoothed intensity of each pixel;
[0133] The synthesis module 520 is further configured to perform weighted processing on the sharpened texture information and the pixel values of the face region in the initial skin-smoothed image according to the synthesis weight to obtain an optimized skin-smoothed image.
[0134] In an optional manner, the synthesis module 520 is configured to, for each pixel in the face region, perform scaling processing on the high-frequency information of the pixel to obtain a scaling processing result corresponding to the pixel, calculate an intermediate result corresponding to the pixel based on the scaling processing result corresponding to the pixel and the pixel value of the pixel in the initial skin-smoothed image, and calculate the sharpened texture information of the pixel based on the intermediate result corresponding to the pixel.
[0135] In an alternative manner, the synthesis module 520 is configured to, for each pixel point in the face region, add the scaling processing result corresponding to the pixel point and the pixel value of the pixel point in the initial skin-smoothing image to obtain an intermediate result corresponding to the pixel point.
[0136] In an alternative manner, the determination module 530 is configured to, for each pixel point, adjust the initial skin-smoothing intensity of the pixel point based on the scaling coefficient of the skin-smoothing intensity to obtain the skin-smoothing intensity of the pixel point.
[0137] In an alternative manner, the determination module 530 is configured to perform a bright LUT mapping process on the face region to obtain first red-channel texture information, and perform a blurring process on the face region to obtain second red-channel texture information;
[0138] Based on the first red-channel texture information and the second red-channel texture information, determine the skin color confidence of each pixel point.
[0139] In an alternative manner, the acquisition module 510 is configured to perform a Gaussian filtering process or a low-pass filtering process on the face region to obtain low-frequency information of the face region;
[0140] Remove the low-frequency information from the face region to obtain high-frequency information of the face region.
[0141] In an alternative manner, the determination module 530 is further configured to convert the face image from the RGB space to the YCbCr space to obtain the luminance value and chrominance value of the face image in the YCbCr space; based on the luminance value and the chrominance value, determine the face region in the face image.
[0142] It should be noted that: when the image skin-smoothing processing device provided in the above embodiments performs image skin-smoothing processing, only the above-described division of each functional module is used as an example. In practical applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the image skin-smoothing processing device is divided into different functional modules to complete all or part of the functions described above. In addition, the image skin-smoothing processing device provided in the above embodiments and the method embodiments of image skin-smoothing processing belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0143] Figure 6It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device 600 may vary greatly due to different configurations or performances, and may include one or more central processing units (CPUs) 601 and one or more memories 602. Among them, at least one instruction is stored in the memory 602, and this instruction is a program instruction. The at least one instruction is loaded and executed by the processor 601 to implement the methods provided by the above various method embodiments. Of course, the electronic device may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input and output. The electronic device may also include other components for implementing the functions of the device, which will not be elaborated here.
[0144] In an exemplary embodiment, a computer-readable storage medium is also provided. For example, a memory including instructions, and the above instructions can be executed by a processor in an electronic device to complete the method of image skin smoothing processing in the above embodiment. The computer-readable storage medium may be non-transitory. For example, the computer-readable storage medium may be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0145] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a magnetic disk, or an optical disc, etc.
[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the protection scope of the technical solutions of the various embodiments of the present application.
Claims
1. A method for image skin smoothing processing, characterized in that The method includes: In a face image, extracting high-frequency information of the face region and obtaining an initial skin-smoothed image of the face image; Superimposing the high-frequency information onto the initial skin-smoothed image to obtain sharpened texture information of the face region; Determining the skin color confidence of each pixel point in the face region and determining the skin smoothing intensity of each pixel point in the face region; Based on the skin color confidence and skin smoothing intensity of each pixel point, determining the synthesis weight of each pixel point; According to the synthesis weight, performing weighted processing on the pixel values of the sharpened texture information and the face region in the initial skin-smoothed image to obtain an optimized skin-smoothed image.
2. The method according to claim 1, wherein The step of superimposing the high-frequency information onto the initial skin-smoothed image to obtain sharpened texture information of the face region includes: For each pixel point in the face region, performing scaling processing on the high-frequency information of the pixel point to obtain a scaling processing result corresponding to the pixel point, calculating an intermediate result corresponding to the pixel point based on the scaling processing result corresponding to the pixel point and the pixel value of the pixel point in the initial skin-smoothed image, and calculating sharpened texture information of the pixel point based on the intermediate result corresponding to the pixel point.
3. The method according to claim 2, wherein The step of calculating an intermediate result corresponding to the pixel point based on the scaling processing result corresponding to the pixel point and the pixel value of the pixel point in the initial skin-smoothed image includes: For each pixel point in the face region, adding the scaling processing result corresponding to the pixel point and the pixel value of the pixel point in the initial skin-smoothed image to obtain an intermediate result corresponding to the pixel point.
4. The method according to any one of claims 1 to 3, characterized in that The step of determining the skin smoothing intensity of each pixel point in the face region includes: For each pixel point, adjusting the initial skin smoothing intensity of the pixel point based on a scaling coefficient of the skin smoothing intensity to obtain the skin smoothing intensity of the pixel point.
5. The method according to any one of claims 1 to 3, characterized in that, The step of determining the skin color confidence of each pixel point in the face region includes: Performing bright look-up table (LUT) mapping processing on the face region to obtain first red channel texture information, and performing blurring processing on the face region to obtain second red channel texture information; Based on the first red channel texture information and the second red channel texture information, determining the skin color confidence of each pixel point.
6. The method according to any one of claims 1 to 3, characterized in that, The step of extracting high-frequency information of the face region in the face image includes: Performing Gaussian filtering processing or low-pass filtering processing on the face region to obtain low-frequency information of the face region; Removing the low-frequency information from the face region to obtain high-frequency information of the face region.
7. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Converting the face image from the red, green, blue (RGB) space to the luminance, chrominance (YCbCr) space to obtain the luminance value and chrominance value of the face image in the YCbCr space; Based on the luminance value and the chrominance value, determining the face region in the face image.
8. An electronic device, characterized in that, The electronic device includes a processor and a memory, and at least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, At least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to implement the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that, At least one instruction is stored in the computer program product, and the instruction is loaded and executed by a processor to implement the method according to any one of claims 1 to 7.
Citation Information
Cited By
Face fusion preprocessing method and system based on hair repairing and lightweight skin beautifying
CN121032822A