Face enhancement debugging method and device, equipment and storage medium

By converting image frames into target color space, using the preset face library to identify the face area, and performing image enhancement processing in this area, the problem of not being able to clearly display faces in face enhancement debugging is solved, and the accurate recognition and clear display effect is achieved in different environments.

CN119991531APending Publication Date: 2025-05-13GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311442385.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-01
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

In face enhancement debugging scenarios, it is not easy to clearly display the face area, especially in the case of transmission bandwidth limitations, compression algorithm influences, and poor quality of the original image.

Method used

By acquiring the image frame, converting it into a color data set that conforms to the target color space, the target face area contained in the image frame is identified, and image enhancement debugging operations are performed on the area. The specific steps include converting the image frame into HSL or YUV color space, identifying the target face area using the reference face area of ​​the preset face library, and performing image enhancement processing in the identified area.

Benefits of technology

Ensure accurate recognition of face areas under various environments and conditions, and the effect of clearly displaying face areas through special image enhancement processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991531A_ABST
    Figure CN119991531A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a face enhancement debugging method and device, equipment and a storage medium, and the scheme comprises the steps: obtaining an image frame; converting the image frame into a color data set conforming to a target color space; recognizing a target face region included in the image frame according to the color data set and a preset reference face region of a preset face library; and executing an image enhancement debugging operation on the target face region. According to the invention, the image frame is converted to the specific color space, the consistency and standardization of the image data can be ensured, the color deviation or distortion caused by the inconsistency of the color space is further reduced, the face region is recognized through the color data set and the preset face library, and the recognition efficiency is improved. According to the invention, the accuracy of face region recognition under various environments and conditions is ensured, and special image enhancement processing is performed on the face region subsequently, so that the effect of clearly displaying the face region is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to a face enhancement debugging method, device, equipment and storage medium. Background Art

[0002] In the field of image processing and display, especially in HD and UHD video playback, streaming services and various modern media platforms, the clarity and recognition of human faces is one of the key factors in evaluating image quality. For advertising, news reporting, social media and a variety of real-world applications, the quality of face recognition and rendering is crucial to the audience's perception and user experience. However, due to various reasons, such as transmission bandwidth limitations, the impact of compression algorithms and the quality of the original image, the faces in the video may lose clarity.

[0003] Traditional image enhancement technology usually focuses on adjusting the contrast, brightness and sharpness of the overall image rather than specifically targeting the facial part of the image, which in turn causes other parts of the image (such as the background, clothing or other objects) to be oversaturated or lose details, making it difficult to ensure that the face is clearly displayed in any background. Summary of the invention

[0004] One purpose of the embodiments of the present application is to provide a face enhancement debugging method, device, equipment and storage medium to solve the technical problem that it is not easy to clearly display the face area in the face enhancement debugging scenario.

[0005] In a first aspect, a face enhancement debugging method is provided, comprising:

[0006] Get image frame

[0007] Converting the image frame into a color data set that conforms to a target color space;

[0008] Identifying a target face region included in the image frame according to the color data set and a preset reference face region in a preset face library;

[0009] Perform image enhancement debugging operations on the target face area. In combination with the first aspect, in a possible implementation, the color data set includes color data of all pixels in the image frame, the color data includes multiple categories of color channel data, the preset reference face area includes a reference channel area corresponding to each category of the color channel data, and the identifying the target face area contained in the image frame based on the color data and the preset reference face area of ​​the preset face library includes: determining multiple target color channel data falling in the target reference channel area based on the color data set to obtain a target channel data set, the target color channel data is one of the multiple categories of the color channel data, and the target reference channel area is a reference channel area corresponding to the target color channel data; identifying the target face area contained in the image frame based on the multiple categories of the target channel data sets.

[0010] In combination with the first aspect, in a possible implementation method, if the target color space is an HSL color space, the target color channel data is H channel color data, S channel color data, or L channel color data, and correspondingly, the preset reference face area is an H channel reference area, an S channel reference area, or an L channel reference area.

[0011] In combination with the first aspect, in a possible implementation, if the target color channel data is H channel color data, and the preset face library is the first preset face library, then: determining multiple target color channel data falling in the target reference channel area according to the color data set, and obtaining the target channel data set includes: traversing the first preset face library to obtain H channel variable data; generating an H channel reference area according to the H channel variable data; determining multiple H channel color data falling in the H channel reference area according to the color data set, and obtaining a target channel data set corresponding to the H channel color data.

[0012] In combination with the first aspect, in a possible implementation, if the target color channel data is S channel color data, then: determining multiple target color channel data falling in the target reference channel area according to the color data set, and obtaining the target channel data set includes: traversing the first preset face library to obtain S channel variable data; generating an S channel reference area according to the S channel variable data; determining multiple S channel color data falling in the S channel reference area according to the color data set, and obtaining a target channel data set corresponding to the S channel color data.

[0013] In combination with the first aspect, in a possible implementation, if the target color channel data is L channel color data, then: determining multiple target color channel data falling in the target reference channel area based on the color data set, and obtaining the target channel data set includes: traversing the first preset face library to obtain L channel variable data; generating an L channel reference area based on the L channel variable data; determining multiple L channel color data falling in the L channel reference area based on the color data set, and obtaining a target channel data set corresponding to the L channel color data.

[0014] In combination with the first aspect, in a possible implementation, before performing the image enhancement debugging operation on the target face area, the method also includes: converting the target channel data into a target YUV color space data set; then: performing the image enhancement debugging operation on the target face area includes: performing the image enhancement debugging operation according to the target face area corresponding to the target YUV color space data set.

[0015] In combination with the first aspect, in a possible implementation method, if the target color space is a YUV color space, the target color channel data is Y channel color data or U channel color data or V channel color data, and correspondingly, the preset reference face area is a Y channel reference area or a V channel reference area or a U channel reference area.

[0016] In combination with the first aspect, in a possible implementation, if the target color channel data is Y channel color data, and the preset face library is a second preset face library, then: determining multiple target color channel data falling in the target reference channel area based on the color data set, and obtaining the target channel data set includes: traversing the second preset face library to obtain Y channel variable data; generating a Y channel reference area based on the Y channel variable data; determining multiple Y channel color data falling in the Y channel reference area based on the color data set, and obtaining a target channel data set corresponding to the Y channel color data.

[0017] In combination with the first aspect, in a possible implementation, if the target color channel data is U channel color data, and the preset face library is a second preset face library, then: determining multiple target color channel data falling in the target reference channel area based on the color data set, and obtaining the target channel data set includes: traversing the second preset face library to obtain U channel variable data; generating a U channel reference area based on the U channel variable data; determining multiple U channel color data falling in the U channel reference area based on the color data set, and obtaining a target channel data set corresponding to the U channel color data.

[0018] In combination with the first aspect, in a possible implementation, if the target color channel data is V channel color data, and the preset face library is a second preset face library, then: determining multiple target color channel data falling in the target reference channel area based on the color data set, and obtaining the target channel data set includes: traversing the second preset face library to obtain V channel variable data; generating a V channel reference area based on the V channel variable data; determining multiple V channel color data falling in the V channel reference area based on the color data set, and obtaining a target channel data set corresponding to the V channel color data.

[0019] In combination with the first aspect, in a possible implementation method, identifying the target face area contained in the image frame based on the multiple categories of target channel data sets includes: obtaining a second target channel data intersection of a target channel data set corresponding to the Y channel color data, a target channel data set corresponding to the U channel color data, and a target channel data set corresponding to the V channel color data; and identifying the target face area corresponding to the second target channel data intersection in the image frame.

[0020] In a second aspect, a face enhancement debugging device is provided, comprising:

[0021] An acquisition unit, used for acquiring image frames;

[0022] A conversion unit, used for converting the image frame into a color data set conforming to a target color space;

[0023] an identification unit, configured to identify a target face region included in the image frame according to the color data set and a preset reference face region in a preset face library;

[0024] An execution unit is used to perform an image enhancement debugging operation on the target face area.

[0025] In a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method as described in the first aspect.

[0026] In a fourth aspect, an embodiment of the present invention provides a computer device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect.

[0027] In the scheme implemented by the above-mentioned face enhancement debugging method, device, equipment and storage medium, an image frame is first obtained, and then the image frame is converted into a color data set that conforms to the target color space. Then, based on the color data set and the preset reference face area of ​​the preset face library, the target face area contained in the image frame is identified, and finally, the image enhancement debugging operation is performed on the target face area. This method can ensure the consistency and standardization of image data by converting the image frame to a specific color space, further reduce the color deviation or distortion caused by the inconsistency of the color space, identify the face area through the color data set and the preset face library, ensure the accuracy of the face area recognition in various environments and conditions, and then perform special image enhancement processing on the face area to achieve the effect of clearly displaying the face area. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0029] Figure 1 This is a schematic diagram of a scenario in an embodiment of the present invention;

[0030] Figure 2 It is a flowchart of a face enhancement debugging method in one embodiment of the present invention;

[0031] Figure 3 is a structural schematic diagram of a face enhancement debugging device in one embodiment of the present invention;

[0032] Figure 4 It is a schematic diagram of the structure of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0034] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional module division is performed in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a sequence different from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in this application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0035] The present invention is described in detail below through specific embodiments.

[0036] The technical solution of this application can be applied to various teaching scenarios or meeting scenarios, etc.

[0037] See also Figure 1 , Figure 1 A scenario diagram is provided for an embodiment of the present application, in which there is an electronic device 10 involved in the present solution, wherein the electronic device 10 may be a computer device with multi-functional imaging such as display, broadcasting, and recording, and the electronic device 10 may be a mobile phone, tablet, watch, television, etc., which is not limited here.

[0038] The electronic device 10 includes a display panel 20, and the display panel 20 is used to display the images transmitted by the electronic device.

[0039] For example, an electronic device obtains a real-time image frame through the transmission of a signal source, converts the image frame into a color data set of an HSL color space, which includes three channels: hue (H), saturation (S) and brightness (L), obtains the H value, S value and L value of all pixels in the image frame, matches the H value, S value and L value of all pixels with the preset reference face area of ​​the preset face library, and identifies the target face area of ​​the image frame, wherein the preset face library stored in the electronic device contains variable data of different channels (H, S or L), and the electronic device traverses the library to determine the preset reference face area corresponding to each channel, thereby obtaining the target face area of ​​the image frame. Before enhancing and debugging the target face area, the electronic device converts the HSL data into YUV data, and finally, according to the converted YUV color space data set, the electronic device performs image enhancement and debugging operations in the target face area to improve the clarity and color accuracy of the face, etc. The electronic device can subsequently process the image after image enhancement and debugging, or directly display it on the display panel.

[0040] In view of this, the present application proposes a face enhancement debugging method to solve the above problems, which is described in detail below.

[0041] See also Figure 2 , Figure 2 A flowchart of a face enhancement debugging method provided by an embodiment of the present invention is provided, wherein the method comprises the following steps:

[0042] S10: Acquire an image frame.

[0043] Wherein, the image frame is each still image, and the image frame is usually composed of pixels. The image frame is image data obtained from different signal sources, usually including image data from multiple signal sources such as HDMI, ATV, AV, DTV, USB, Network, Ypbpr, etc. Different signal sources can provide different types of image data, such as video, static image or real-time stream. After acquiring the image frame from different signal sources, all pixel information of the frame is obtained, and the above pixel information includes the RGB value of each pixel. RGB represents red, green and blue. Different combinations of these three colors can produce various colors. Therefore, knowing the RGB value of each pixel means knowing the complete color distribution of the image frame.

[0044] It can be seen that the present invention can not only acquire an image frame transmitted by any signal source, but also perform subsequent image processing operations on a single image frame, making the processing more accurate.

[0045] S20: Convert the image frame into a color data set that conforms to a target color space.

[0046] The color space is used to describe the organization and representation of colors. Common color spaces include RGB (red, green, and blue), YUV (brightness and color difference), HSL (hue, saturation, brightness), and the like.

[0047] The color data set includes color data of all pixels in the image frame, and the color data includes multiple types of color channel data.

[0048] After acquiring the image frame from different signal sources, all pixel information of the frame is acquired, and the pixel information includes the RGB value of each pixel. The RGB value is converted into a color data set that conforms to the target color space, such as YUV or HSL.

[0049] In a specific example, when the color space is HSL, the color data is the three values ​​of H, S and L for each pixel, and the color data set is the HSL color data corresponding to all pixels in the image frame. In the HSL color space, there are three color channels: H channel, S channel and L channel. The data corresponding to the three color channels are H channel color data or S channel color data or L channel color data, and each channel stores data of a specific component of all pixels in the image. For example, the H channel stores the hue values ​​of all pixels, the S channel stores the saturation values ​​of all pixels, and the L channel stores the brightness values ​​of all pixels.

[0050] Among them, when RBG is converted to HSL, there is the following conversion formula:

[0051]

[0052]

[0053]

[0054] For example, suppose we have a pixel whose RGB value is (150, 75, 200). We normalize the value of each color channel to the range of [0, 1], that is, R = 150 / 255, G = 75 / 255, B = 200 / 255. The above formula can be used to obtain the HSL value corresponding to the RGB value as (150, 75, 200).

[0055] In a specific example, when the color space is YUV, the color data is the three values ​​of Y, U and V for each pixel, and the color data set is the YUV color data corresponding to all pixels in the image frame. In the YUV color space, there are three color channels: Y channel, U channel and V channel. The data corresponding to the three color channels are Y channel color data or U channel color data or V channel color data, and each channel stores data of a specific component of all pixels in the image. Among them, the Y channel usually contains grayscale information, while the U and V channels contain color information.

[0056] Among them, when RBG is converted to YUV, there is the following conversion formula:

[0057] Y=0.299*R+0.587*G+0.114*B

[0058] U=-0.169*R-0.331*G+0.5*B+128

[0059] V=0.5*R―0.419*G―0.081*B+128

[0060] It can be seen that by converting the image frame into a specific color space, the accuracy of identifying the target face area in the image frame can be improved, and in the subsequent processing of the target face area, image enhancement processing can be better performed according to the specific color space.

[0061] S30, identifying a target face region included in the image frame according to the color data set and a preset reference face region in a preset face library.

[0062] The color data set includes color data of all pixels in the image frame, and the color data includes multiple types of color channel data.

[0063] Among them, the preset face library represents a preset face library under different color spaces, which can be an HSL face library or a YUV face library. There is no unique limitation here. There are a large number of face images in the preset face library. Data preprocessing, feature extraction, labeling and classification are performed on each face image, and the preprocessed image and related feature data are stored in the database, which constitutes the preset face library.

[0064] As described above, the preset face library also has a preset reference face area in the preset face library. The preset reference face area is a component or output of the preset face library, and is a unified standard or reference derived from all the face data stored in the library. When face detection or recognition is required, this reference face area provides a quick reference for the system, reducing the time and amount of calculation for searching in a large number of face samples. That is, the preset reference face area is a standard or reference model established by the preset face library in order to optimize and improve efficiency. When the color data corresponding to the image frame falls into the preset reference face area, the target face area of ​​the image frame is identified.

[0065] Specifically, if the preset face library is an HSL face library, the pixels of each face image are converted into the HSL color space, and then the hue, saturation and lightness values ​​are stored. In addition to the HSL value, features related to each face are also stored, such as the position of facial features and facial contours. If the preset face library is a YUV face library, the pixels of each face image are converted into the YUV color space, and then the luminance and chrominance values ​​are stored. The Y channel provides the brightness information of the image, while the U and V channels provide color information. In addition to the YUV value, features related to each face are also stored, such as the position of facial features and facial contours.

[0066] It can be seen that the present invention adds more color data or other features to the preset face library to adapt to ever-changing application requirements or environmental conditions. Through precise analysis of the color data set, the position of the face can be determined more accurately, thereby reducing the situation where non-face objects are mistaken for faces.

[0067] S40: performing an image enhancement debugging operation on the target face area.

[0068] Among them, the above-mentioned image enhancement debugging operation can perform rendering operations on image features such as contrast, clarity, color, etc., and there is no sole limitation here.

[0069] The contrast describes the difference between the light and dark parts of an image. The present invention may use dynamic contrast to emphasize the local contrast of the image to improve the overall perception effect of the image.

[0070] Specifically, the intensity of dynamic contrast is graded from 0 to FF. Here, 0 means no dynamic contrast effect, and FF means the strongest dynamic contrast effect. When processing the face region (Region1), the signal passes through a dynamic contrast module. This module applies the corresponding contrast enhancement effect to Region1 according to the set intensity level. For example, selecting an intermediate value such as 8A will provide a medium contrast effect for the image.

[0071] Among them, the FF in the intensity of the above dynamic contrast ratio from 0 to FF can be set to 100, and there is no unique limitation here.

[0072] For example, determine the specific location of the target face in the current frame and mark it as Region 1. For the contrast intensity selected for Region 1, adjust the Y value (brightness component in the YUV color space) of the region according to the selected contrast intensity to increase or decrease the contrast. And check the contrast rendered Region 1 to ensure that its visual effect meets the requirements. If necessary, further fine-tuning can be performed through manual settings.

[0073] Among them, clarity or sharpening describes the enhancement of image details, which can make the edges and textures in the image clearer.

[0074] Specifically, the total clarity intensity is also divided into a range of 0 to FF Level, 0 means no effect, FF means the strongest effect, and the face area is still Region 1. When the signal flows through the clarity module, the clarity of the YUV data in Region 1 is adjusted according to the set clarity intensity. This can be achieved by enhancing the high-frequency details in the YUV channel. After rendering, the face area in Region 1 will have a new clarity effect, making the face look sharper and clearer.

[0075] Among them, FF in the above-mentioned total clarity intensity from 0 to FF can be set to 100, and there is no unique limitation here.

[0076] It can be seen that by performing image enhancement debugging operations on the target face area, the dynamic contrast and clarity of the target face area are enhanced, thereby making the visual effect of the face more eye-catching and clear.

[0077] This method can ensure the consistency and standardization of image data by converting image frames into a specific color space, further reduce color deviation or distortion caused by inconsistent color space, identify face areas through color data sets and preset face libraries, ensure the accuracy of face area recognition in various environments and conditions, and subsequently perform special image enhancement processing on the face area to achieve the effect of clearly displaying the face area.

[0078] In one possible example, the color data set includes color data of all pixels in the image frame, the color data includes multiple categories of color channel data, the preset reference face area includes a reference channel area corresponding to each category of the color channel data, and identifying the target face area contained in the image frame based on the color data and the preset reference face area of ​​a preset face library includes: determining multiple target color channel data falling in the target reference channel area based on the color data set to obtain a target channel data set, the target color channel data being one category of the multiple categories of the color channel data, and the target reference channel area being a reference channel area corresponding to the target color channel data; and identifying the target face area contained in the image frame based on the multiple categories of the target channel data sets.

[0079] The color data set includes color data of all pixels in the image frame, including multiple color channels (eg, RGB, HSL, YUV, etc.).

[0080] Among them, the preset benchmark face area includes a benchmark channel area corresponding to each type of color channel data, which can be an H channel benchmark area, an S channel benchmark area, an L channel benchmark area, etc., indicating that when the preset benchmark face area is in different color spaces, each color space has different constraints. For example, in the HSL color space, H, S and L are common constraints, that is, the preset benchmark face area is an area composed of H, S and L.

[0081] The target color channel data is one of the multiple types of color channel data, and may be H channel color data, S channel color data, L channel color data, or the like.

[0082] The target reference channel region is a reference channel region corresponding to the target color channel data, that is, the preset reference face region includes one of the reference channel regions corresponding to each type of the color channel data.

[0083] Each color channel has a corresponding "reference channel area". This is based on preset data and represents the color distribution of a face in the channel in a certain color space. For example, in the YUV color space, the reference area of ​​the U channel represents the typical color distribution of a face. By comparing the color data of each pixel in the image with the corresponding reference channel area, we can find out which pixels' color data fall within the reference area, and determine whether the colors of these pixels are similar to the colors of the face in a certain channel. If a region shows a color distribution similar to that of a face in multiple color channels, then this region is a face region.

[0084] It can be seen that the face recognition process of the present invention is not only based on the information of a single color channel, but also integrates the data of multiple channels to improve the accuracy of face recognition under various lighting and backgrounds.

[0085] In one possible example, if the target color space is the HSL color space, the target color channel data is H channel color data or S channel color data or L channel color data, and correspondingly, the preset reference face area is the H channel reference area or the S channel reference area or the L channel reference area.

[0086] Among them, the above-mentioned HSL color space includes the following: H (Hue): Hue, describing the type of color (such as red, green, blue, etc.), its range is usually 0° to 360°, representing different positions on the color circle; S (Saturation): Saturation, describing the purity or vividness of the color; its value range is usually 0% (gray, no color) to 100% (fully saturated color); L (Lightness): Brightness, describing the lightness and darkness of the color, its value range is from 0% (black) to 100% (white).

[0087] Specifically, in the preset HSL face library, a large number of face images are stored, and each face image has multiple H channel color data, S channel color data and L channel color data. Four range thresholds can be set for each channel according to experience, namely MinValue (minimum value): this is the lower limit value of the determined area, and any value less than or equal to MinValue is considered to be within the area; MaxValue (maximum value): this is the upper limit value of the determined area, and any value greater than or equal to MaxValue is considered to be within the area; MinSlope (minimum slope): this refers to the minimum slope between two adjacent data points in a certain continuous data point sequence, which is usually used to determine the changing trend of the area. If the slope between the data points is less than or equal to MinSlope, they are considered to be in the same area; MaxSlope (maximum slope): this refers to the maximum slope between two adjacent data points in a certain continuous data point sequence. If the slope between the data points is greater than or equal to MaxSlope, it indicates the boundary of the area. According to the four range thresholds of each channel mentioned above, the area of ​​H channel color data, the area of ​​S channel color data, and the area of ​​L channel color data that conform to the face can be obtained respectively, that is, the H channel reference area, S channel reference area or L channel reference area proposed in the present invention.

[0088] Therefore, when the area composed of the above-mentioned H channel reference area, S channel reference area or L channel reference area is the final face area, when the image frame is converted to HSL, the corresponding H channel data, S channel data, and L channel data fall into the preset reference face area in the above-mentioned preset face database, and the face area in the image frame can be identified.

[0089] It can be seen that according to the present invention, the HSL face library designed specifically for human faces is used. Compared with the general color space, the color characteristics of the human face can be captured more accurately, thereby improving the accuracy of face recognition. Moreover, by using the preset reference face area, the possible positions of the human face in the image can be quickly determined without searching in the entire image, thereby improving the recognition speed.

[0090] In one possible example, if the target color channel data is H channel color data, and the preset face library is the first preset face library, then: determining multiple target color channel data falling in the target reference channel area based on the color data set, and obtaining the target channel data set includes: traversing the first preset face library to obtain H channel variable data; generating an H channel reference area based on the H channel variable data; determining multiple H channel color data falling in the H channel reference area based on the color data set, and obtaining a target channel data set corresponding to the H channel color data.

[0091] Among them, the H channel variable data is MinValue (minimum value); MaxValue (maximum value); MinSlope (minimum slope); MaxSlope (maximum slope).

[0092] Among them, when the target color space is the HSL color space, the first preset face library is the HSL face library.

[0093] Among them, the above-mentioned traversal of the first preset face library to obtain H channel variable data is to traverse the HSL face library to obtain H channel variable data. The library contains a large number of face images. Before starting the traversal, four parameters are initialized. For example: MinValue = infinity (or a very large number); MaxValue = infinitesimal (or a very small number); MinSlope = infinity; MaxSlope = infinitesimal; traverse each sample data, extract H channel data, calculate the statistical information of the H channel, including average hue, hue change rate or other related statistics, hue change rate (slope) can be the rate of change of hue value in a specific area of ​​the face (for example, from cheek to nose); compare the statistical data of the current sample with the previous parameters and update them. For example: if the minimum hue value of the current sample is less than MinValue, then update MinValue. If the maximum hue value of the current sample is greater than MaxValue, then update MaxValue; if the minimum slope of the current sample is less than MinSlope, then update MinSlope; if the maximum slope of the current sample is greater than MaxSlope, then update MaxSlope; when all samples are traversed, the range of the H channel variable data of the entire preset face library is obtained, that is, the H channel reference area.

[0094] Specifically, the color data set includes all H channel color data in the image frame, and all H channel color data in the image frame are matched with the H channel reference area, and the H channel color data in the image frame that conforms to the H channel reference area is determined to be the target channel data set, indicating that the target channel data set conforms to the H channel reference area, that is, the first color face area identified by the H channel of the current image frame.

[0095] In a specific implementation, generating an H channel reference area according to the H channel variable data includes: obtaining a preset H channel minimum value, a preset H channel maximum value, a preset H channel minimum slope, and a preset H channel phase maximum slope; and drawing an H channel reference area according to the preset H channel minimum value, the preset H channel maximum value, the preset H channel minimum slope, and the preset H channel phase maximum slope.

[0096] The variables of the above-mentioned preset H channel may be empirical values, which are not limited here.

[0097] It can be seen that the present invention screens out parts that may belong to the face by comparing the H channel data of the input image with the reference area parameters obtained based on the preset face library, thereby forming a target channel data set, which provides a basis for subsequent face recognition and analysis.

[0098] In one possible example, if the target color channel data is S channel color data, then: determining multiple target color channel data falling in the target reference channel area based on the color data set to obtain the target channel data set includes: traversing the first preset face library to obtain S channel variable data; generating an S channel reference area based on the S channel variable data; determining multiple S channel color data falling in the S channel reference area based on the color data set, and obtaining a target channel data set corresponding to the S channel color data.

[0099] Among them, the S channel variable data is MinValue (minimum value); MaxValue (maximum value); MinSlope (minimum slope); MaxSlope (maximum slope).

[0100] Among them, when the target color space is the HSL color space, the first preset face library is the HSL face library.

[0101] Among them, the above-mentioned traversal of the first preset face library to obtain the S channel variable data is to traverse the HSL face library to obtain the S channel variable data. The library contains a large number of face images. Before starting the traversal, four parameters are initialized. For example: MinValue = infinity (or a very large number); MaxValue = infinitesimal (or a very small number); MinSlope = infinity; MaxSlope = infinitesimal; traverse each sample data, extract the S channel data, calculate the statistical information of the S channel, and obtain the minimum and maximum values ​​of the S channel of the current image. Then, compare with MinValue and MaxValue, and update them as needed; calculate the slope of the S channel. The slope can be obtained by calculating the difference between each pixel of the S channel and its neighboring pixels, find the maximum and minimum slopes in the image, and compare with MinSlope and MaxSlope, and update them as needed; when all samples are traversed, the updated MinValue, MaxValue, MinSlope and MaxSlope are the statistical range of the S channel in the entire library, that is, the S channel reference area.

[0102] Specifically, the color data set includes all S channel color data in the image frame, and all S channel color data in the image frame are matched with the S channel reference area, and the S channel color data in the image frame that conforms to the S channel reference area is determined to be the target channel data set, indicating that the target channel data set conforms to the S channel reference area, that is, the second color face area identified by the S channel of the current image frame.

[0103] In a specific implementation, generating the S channel reference area according to the S channel variable data includes: obtaining a preset S channel minimum value, a preset S channel maximum value, a preset S channel minimum slope, and a preset S channel phase maximum slope; and drawing the S channel reference area according to the preset S channel minimum value, the preset S channel maximum value, the preset S channel minimum slope, and the preset S channel phase maximum slope.

[0104] The variables of the above-mentioned preset S channels may be empirical values, which are not limited here.

[0105] It can be seen that the present invention screens out parts that may belong to the face by comparing the S channel data of the input image with the reference area parameters obtained based on the preset face library, thereby forming a target channel data set, which provides a basis for subsequent face recognition and analysis.

[0106] In one possible example, if the target color channel data is L channel color data, then: determining multiple target color channel data falling in the target reference channel area based on the color data set to obtain the target channel data set includes: traversing the first preset face library to obtain L channel variable data; generating an L channel reference area based on the L channel variable data; determining multiple L channel color data falling in the L channel reference area based on the color data set, and obtaining a target channel data set corresponding to the L channel color data.

[0107] Among them, the L channel variable data is MinValue (minimum value); MaxValue (maximum value); MinSlope (minimum slope); MaxSlope (maximum slope).

[0108] Among them, when the target color space is the HSL color space, the first preset face library is the HSL face library.

[0109] Among them, the above-mentioned traversal of the first preset face library to obtain L channel variable data is to traverse the HSL face library to obtain L channel variable data. The library contains a large number of face images. Before starting the traversal, four parameters are initialized. For example: MinValue = infinity (or a very large number); MaxValue = infinitesimal (or a very small number); MinSlope = infinity; MaxSlope = infinitesimal; traverse each sample data, extract L channel data, calculate the statistical information of the L channel, and obtain the minimum and maximum values ​​of the L channel of the current image. Then, compare with MinValue and MaxValue, and update them as needed; calculate the slope of the L channel. The slope can be obtained by calculating the difference between each pixel of the L channel and its neighboring pixels, find the maximum and minimum slopes in the image, and compare with MinSlope and MaxSlope, and update them as needed; when all samples are traversed, the updated MinValue, MaxValue, MinSlope and MaxSlope are the statistical range of the L channel in the entire library, that is, the L channel reference area.

[0110] Specifically, the color data set includes all L channel color data in the image frame, and all L channel color data in the image frame are matched with the L channel reference area, and the L channel color data in the image frame that conforms to the L channel reference area is determined to be the target channel data set, indicating that the target channel data set conforms to the L channel reference area, that is, the third color face area identified by the L channel of the current image frame.

[0111] In a specific implementation, generating an L channel reference area according to the L channel variable data includes: obtaining a preset L channel minimum value, a preset L channel maximum value, a preset L channel minimum slope, and a preset L channel phase maximum slope; and drawing an L channel reference area according to the preset L channel minimum value, the preset L channel maximum value, the preset L channel minimum slope, and the preset L channel phase maximum slope.

[0112] The variables of the above-mentioned preset L channel may be empirical values, which are not limited here.

[0113] It can be seen that the present invention screens out parts that may belong to the face by comparing the L channel data of the input image with the reference area parameters obtained based on the preset face library, thereby forming a target channel data set, which provides a basis for subsequent face recognition and analysis.

[0114] In one possible example, before performing the image enhancement debugging operation on the target face area, the method also includes: converting the target channel data into a target YUV color space data set; then: performing the image enhancement debugging operation on the target face area includes: performing the image enhancement debugging operation according to the target face area corresponding to the target YUV color space data set.

[0115] Among them, since the subsequent image enhancement debugging operation needs to be performed in the YUV color space, the HSL color space needs to be converted into the YUV color space.

[0116] Specifically, converting from HSL to YUV color space requires two steps: first converting from HSL to RGB, and then converting from RGB to YUV. The conversion formula is shown in S20 above.

[0117] It can be seen that converting HSL to YUV provides a more suitable and efficient working space for subsequent image enhancement and processing, thereby achieving better image quality and processing efficiency.

[0118] In one possible example, if the target color space is a YUV color space, the target color channel data is Y channel color data or U channel color data or V channel color data, and correspondingly, the preset reference face area is a Y channel reference area or a V channel reference area or a U channel reference area.

[0119] Among them, the YUV color space is a color representation method often used in image and video processing. Among them, "Y" stands for luminance, while "U" and "V" stand for chrominance. The Y channel provides the brightness information of the image, while the U and V channels provide color information.

[0120] Furthermore, in the preset YUV face library, a large number of face images are stored. Each face image has multiple Y channel color data, U channel color data and V channel color data. By scanning a large number of face images in the YUV face library, we can calculate the average value (Average Value) of the three components of Y, U, and V. This average value represents the center position of most faces in the YUV color space, which means that most face colors will be distributed around this center value; with the Average Value of these three components as the dot, we can define a radius, such as: 0-9 Range. In practical applications, Range can be a specific value, such as a color difference of 10 units. Therefore, 0 Range means only the average point, and 9 Ranges represent an area that is 90 units different from the average value; in this way, for the three components of Y, U, and V, we can get a circular area. Among these three circular areas, the overlapping or intersecting parts are most likely to be the areas of human faces; that is, the areas of Y channel color data, U channel color data, and V channel color data that conform to human faces can be obtained respectively, namely, the Y channel reference area, U channel reference area, and V channel reference area proposed in the present invention.

[0121] Therefore, when the area composed of the above-mentioned Y channel reference area, U channel reference area or V channel reference area is the final face area, when the image frame is obtained and converted into the YUV color space, check whether the YUV value of each pixel falls within the overlapping area defined above. If most of the pixels fall within this overlapping area, then this area is the target face area.

[0122] It can be seen that the present invention can effectively recognize faces in images by using the YUV color space and the preset reference face area, while ensuring high efficiency and accuracy.

[0123] In one possible example, if the target color channel data is Y channel color data, and the preset face library is the second preset face library, then: determining multiple target color channel data falling in the target reference channel area based on the color data set to obtain the target channel data set includes: traversing the second preset face library to obtain Y channel variable data; generating a Y channel reference area based on the Y channel variable data; determining multiple Y channel color data falling in the Y channel reference area based on the color data set, and obtaining a target channel data set corresponding to the Y channel color data.

[0124] Among them, when the target color space is the YUV color space, the second preset face library is the YUV face library.

[0125] In a specific implementation, the Y channel variable data is the total value of all Y channels in the YUV face library. The traversing of the second preset face library to obtain the Y channel variable data can be: setting an accumulator variable to 0 for accumulating the Y values ​​of all samples; starting to traverse each face sample in the library, and for each sample, extracting its Y channel data; adding the Y value of each sample to the accumulator, and after traversing all samples, obtaining the total value of the Y channel according to the accumulator.

[0126] In a specific implementation, generating a Y channel reference area according to the Y channel variable data includes: obtaining a Y channel average value of the Y channel variable data; setting the Y channel average value as an origin, and drawing a Y channel reference area according to a preset first radius.

[0127] Among them, a counter variable is set to record the number of traversed samples; after traversing all samples, the total value in the accumulator is divided by the value of the counter to obtain the average value of the Y channel.

[0128] The first radius may be an empirical value or a manually set value, and is not limited here.

[0129] Specifically, the color data set includes all Y channel color data in the image frame, and all Y channel color data in the image frame are matched with the Y channel reference area, and the Y channel color data in the image frame that conforms to the Y channel reference area is determined to be the target channel data set, indicating that the target channel data set conforms to the Y channel reference area, that is, the color face area recognized by the Y channel of the current image frame.

[0130] It can be seen that the present invention screens out parts that may belong to the face by comparing the Y channel data of the input image with the reference area parameters obtained based on the preset face library, thereby forming a target channel data set, which provides a basis for subsequent face recognition and analysis.

[0131] In one possible example, if the target color channel data is U channel color data, and the preset face library is the second preset face library, then: determining multiple target color channel data falling in the target reference channel area based on the color data set to obtain the target channel data set includes: traversing the second preset face library to obtain U channel variable data; generating a U channel reference area based on the U channel variable data; determining multiple U channel color data falling in the U channel reference area based on the color data set, and obtaining a target channel data set corresponding to the U channel color data.

[0132] Among them, when the target color space is the YUV color space, the second preset face library is the YUV face library.

[0133] In a specific implementation, the U channel variable data is the total value of all Y channels in the YUV face library. The traversal of the second preset face library to obtain the U channel variable data can be: setting an accumulator variable to 0 for accumulating the U values ​​of all samples; starting to traverse each face sample in the library, and for each sample, extracting its U channel data; adding the U value of each sample to the accumulator, and after traversing all samples, obtaining the total value of the U channel according to the accumulator.

[0134] In a specific implementation, generating a U-channel reference area according to the U-channel variable data includes: obtaining a U-channel average value of the U-channel variable data; setting the U-channel average value as the origin, and drawing a U-channel reference area according to a preset first radius.

[0135] Among them, a counter variable is set to record the number of traversed samples; after traversing all samples, the total value in the accumulator is divided by the value of the counter to obtain the average value of the U channel.

[0136] The preset first radius may be an empirical value or a manually set value, and is not limited here.

[0137] Specifically, the color data set includes all U channel color data in the image frame, and all U channel color data in the image frame are matched with the U channel reference area, and the U channel color data in the image frame that conforms to the U channel reference area is determined to be the target channel data set, indicating that the target channel data set conforms to the U channel reference area, that is, the color face area recognized by the U channel of the current image frame.

[0138] It can be seen that the present invention screens out parts that may belong to the face by comparing the U channel data of the input image with the reference area parameters obtained based on the preset face library, thereby forming a target channel data set, which provides a basis for subsequent face recognition and analysis.

[0139] In one possible example, if the target color channel data is V channel color data, and the preset face library is the second preset face library, then: determining multiple target color channel data falling in the target reference channel area based on the color data set to obtain the target channel data set includes: traversing the second preset face library to obtain V channel variable data; generating a V channel reference area based on the V channel variable data; determining multiple V channel color data falling in the V channel reference area based on the color data set, and obtaining a target channel data set corresponding to the V channel color data.

[0140] Among them, when the target color space is the YUV color space, the second preset face library is the YUV face library.

[0141] In a specific implementation, the V channel variable data is the total value of all Y channels in the YUV face library. The traversal of the second preset face library to obtain the V channel variable data can be: setting an accumulator variable to 0 for accumulating the V values ​​of all samples; starting to traverse each face sample in the library, and for each sample, extracting its V channel data; adding the V value of each sample to the accumulator, and after traversing all samples, obtaining the total value of the V channel according to the accumulator.

[0142] In a specific implementation, generating a V channel reference area according to the V channel variable data includes: obtaining a V channel average value of the V channel variable data; setting the V channel average value as the origin, and drawing the V channel reference area according to a preset first radius. A counter variable is set to record the number of samples traversed; after traversing all samples, the total value in the accumulator is divided by the value of the counter to obtain the average value of the Y channel.

[0143] The preset first radius may be an empirical value or a manually set value, and is not limited here.

[0144] Specifically, the color data set includes all V channel color data in the image frame, and all V channel color data in the image frame are matched with the V channel reference area, and the V channel color data in the image frame that conforms to the V channel reference area is determined to be the target channel data set, indicating that the target channel data set conforms to the V channel reference area, that is, the color face area recognized by the V channel of the current image frame.

[0145] It can be seen that the present invention screens out parts that may belong to the face by comparing the V channel data of the input image with the reference area parameters obtained based on the preset face library, thereby forming a target channel data set, which provides a basis for subsequent face recognition and analysis.

[0146] In one possible example, identifying the target face area contained in the image frame based on the multiple categories of target channel data sets includes: obtaining a second target channel data intersection of a target channel data set corresponding to the Y channel color data, a target channel data set corresponding to the U channel color data, and a target channel data set corresponding to the V channel color data; and identifying the target face area corresponding to the image frame at the intersection of the second target channel data.

[0147] Among them, all color data matching the preset face brightness are obtained from the Y channel to form a target channel data set; color data matching the preset face color are also obtained from the U and V channels to form a corresponding target channel data set for each channel. After obtaining the target data sets of the above three channels, the intersection of the three sets is determined, that is, the color data that the Y, U, and V channels all consider to match the face, and the area matching these data is determined in the image frame. This area is the position of the face, because only the color data of the real face area will simultaneously meet the preset conditions of the Y, U, and V channels.

[0148] It can be seen that the present invention does not rely solely on the information of one channel, but integrates the information of brightness and chromaticity to more accurately determine the position of the face. In addition, by finding the intersection of the three channels, it can effectively reduce misidentification and enhance recognition accuracy.

[0149] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present application, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.

[0150] As another aspect of the embodiment of the present application, the embodiment of the present application provides a face enhancement debugging device. The face enhancement debugging device can be a software module, which includes a number of instructions stored in a memory, and the processor can access the memory and call the instructions for execution to complete the face enhancement debugging method described in the above embodiments.

[0151] See also Figure 3 , Figure 3 Schematic diagram of the structure of a face enhancement debugging device provided in an embodiment of the present application. Figure 3 As shown, the face enhancement debugging device includes:

[0152] An acquisition unit 301 is used to acquire an image frame;

[0153] A conversion unit 302, configured to convert the image frame into a color data set conforming to a target color space;

[0154] The recognition unit 303 is used to recognize the target face area included in the image frame according to the color data set and the preset reference face area of ​​the preset face library;

[0155] The execution unit 304 is used to perform an image enhancement debugging operation on the target face area.

[0156] This method can ensure the consistency and standardization of image data by converting image frames into a specific color space, further reduce color deviation or distortion caused by inconsistent color space, identify face areas through color data sets and preset face libraries, ensure the accuracy of face area recognition in various environments and conditions, and subsequently perform special image enhancement processing on the face area to achieve the effect of clearly displaying the face area.

[0157] In one embodiment, the color data set includes color data of all pixels in the image frame, the color data includes multiple categories of color channel data, the preset reference face area includes a reference channel area corresponding to each category of the color channel data, and in the preset reference face area based on the color data and a preset face library, a target face area included in the image frame is identified, and the recognition unit 303 is further used to: determine multiple target color channel data falling in a target reference channel area based on the color data set to obtain a target channel data set, the target color channel data is one of the multiple categories of the color channel data, and the target reference channel area is a reference channel area corresponding to the target color channel data; and identify the target face area included in the image frame based on the multiple categories of the target channel data sets.

[0158] In one embodiment, if the target color space is the HSL color space, the target color channel data is H channel color data or S channel color data or L channel color data, and correspondingly, the preset reference face area is the H channel reference area or the S channel reference area or the L channel reference area.

[0159] In one embodiment, if the target color channel data is H channel color data and the preset face library is the first preset face library, then: the multiple target color channel data falling in the target reference channel area are determined according to the color data set to obtain the target channel data set, and the identification unit 303 is also used to: traverse the first preset face library to obtain H channel variable data; generate an H channel reference area according to the H channel variable data; determine multiple H channel color data falling in the H channel reference area according to the color data set to obtain a target channel data set corresponding to the H channel color data.

[0160] In one embodiment, if the target color channel data is S channel color data, then: the multiple target color channel data falling in the target reference channel area are determined according to the color data set to obtain the target channel data set, and the recognition unit 303 is also used to: traverse the first preset face library to obtain S channel variable data; generate an S channel reference area according to the S channel variable data; determine multiple S channel color data falling in the S channel reference area according to the color data set to obtain a target channel data set corresponding to the S channel color data.

[0161] In one embodiment, if the target color channel data is L channel color data, then: the multiple target color channel data falling in the target reference channel area are determined according to the color data set to obtain the target channel data set, and the recognition unit 303 is also used to: traverse the first preset face library to obtain L channel variable data; generate an L channel reference area according to the L channel variable data; determine multiple L channel color data falling in the L channel reference area according to the color data set to obtain a target channel data set corresponding to the L channel color data.

[0162] In one embodiment, before performing the image enhancement debugging operation on the target face area, the conversion unit 302 is also used to: convert the target channel data into a target YUV color space data set; then: in performing the image enhancement debugging operation on the target face area, the execution unit 304 is also used to: perform the image enhancement debugging operation according to the target face area corresponding to the target YUV color space data set.

[0163] In one embodiment, if the target color space is a YUV color space, the target color channel data is Y channel color data, U channel color data, or V channel color data, and correspondingly, the preset reference face area is a Y channel reference area, a V channel reference area, or a U channel reference area.

[0164] In one embodiment, if the target color channel data is Y channel color data and the preset face library is the second preset face library, then: the multiple target color channel data falling in the target reference channel area are determined according to the color data set to obtain the target channel data set, and the identification unit 303 is also used to: traverse the second preset face library to obtain Y channel variable data; generate a Y channel reference area according to the Y channel variable data; determine multiple Y channel color data falling in the Y channel reference area according to the color data set to obtain a target channel data set corresponding to the Y channel color data.

[0165] In one embodiment, if the target color channel data is U channel color data and the preset face library is the second preset face library, then: the multiple target color channel data falling in the target reference channel area are determined according to the color data set to obtain the target channel data set, and the identification unit 303 is also used to: traverse the second preset face library to obtain U channel variable data; generate a U channel reference area according to the U channel variable data; determine multiple U channel color data falling in the U channel reference area according to the color data set to obtain a target channel data set corresponding to the U channel color data.

[0166] In one embodiment, if the target color channel data is V channel color data and the preset face library is the second preset face library, then: the multiple target color channel data falling in the target reference channel area are determined according to the color data set to obtain the target channel data set, and the identification unit 303 is also used to: traverse the second preset face library to obtain V channel variable data; generate a V channel reference area according to the V channel variable data; determine multiple V channel color data falling in the V channel reference area according to the color data set to obtain a target channel data set corresponding to the V channel color data.

[0167] In one embodiment, the target face area contained in the image frame is identified based on the multiple types of target channel data sets, and the identification unit 303 is also used to: obtain a second target channel data intersection of a target channel data set corresponding to the Y channel color data, a target channel data set corresponding to the U channel color data, and a target channel data set corresponding to the V channel color data; and identify the target face area corresponding to the second target channel data intersection in the image frame.

[0168] In some embodiments, the face enhancement debugging device can also be constructed by hardware devices. For example, the face enhancement debugging device can be constructed by one or more chips, and each chip can work in coordination with each other to complete the face enhancement debugging method described in each of the above embodiments. For another example, the face enhancement debugging device can also be constructed by various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components.

[0169] It should be noted that the above-mentioned face enhancement debugging device can execute the face enhancement debugging method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in the embodiment of the face enhancement debugging device, please refer to the face enhancement debugging method provided in the embodiment of the present application.

[0170] See also Figure 4 , Figure 4 1 is a schematic diagram of a computer device provided in an embodiment of the present application. The computer device includes one or more processors and a memory. The memory is connected to the one or more processors, for example, connected to the processor via a bus.

[0171] The processor is configured to support the computer device to perform the corresponding functions in the method in the above method embodiment. The processor can be a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof. The above hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0172] The memory is used to store program codes, etc. The memory may include volatile memory (VM), such as random access memory (RAM); the memory may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory may also include a combination of the above types of memory.

[0173] The memory can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the face enhancement debugging method in the embodiment of the present application. The processor executes various functional applications and data processing of the face enhancement debugging method and the face enhancement debugging device by running the non-volatile software programs, instructions and modules stored in the memory, that is, realizes the functions of each module or unit of the face enhancement debugging method and the face enhancement debugging device provided in the above method embodiment.

[0174] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function. The data storage area may store data created according to the use of the face enhancement debugging device, etc. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the face enhancement debugging device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0175] The one or more modules are stored in the memory, and when executed by the one or more processors, the face enhancement debugging method in any of the above method embodiments is executed, for example, the method steps described in the above method embodiments are executed to realize the functions of the modules described in the above device embodiments.

[0176] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method described in the above embodiment.

[0177] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0178] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A face enhancement debugging method, characterized in that: include: Get image frame; Converting the image frame into a color data set that conforms to a target color space; Identifying a target face region included in the image frame according to the color data set and a preset reference face region in a preset face library; An image enhancement debugging operation is performed on the target face area.

2. The method according to claim 1, characterized in that The color data set includes color data of all pixels in the image frame, the color data includes multiple types of color channel data, the preset reference face area includes a reference channel area corresponding to each type of the color channel data, and the identifying of the target face area included in the image frame according to the color data and the preset reference face area of ​​the preset face library includes: Determine a plurality of target color channel data falling in a target reference channel region according to the color data set, and obtain a target channel data set, wherein the target color channel data is one of the plurality of types of color channel data, and the target reference channel region is a reference channel region corresponding to the target color channel data; According to the plurality of target channel data sets, a target face region contained in the image frame is identified.

3. The method according to claim 2, characterized in that If the target color space is the HSL color space, the target color channel data is the H channel color data, the S channel color data, or the L channel color data, and correspondingly, the preset reference face area is the H channel reference area, the S channel reference area, or the L channel reference area.

4. The method according to claim 3, characterized in that If the target color channel data is H channel color data, and the preset face library is the first preset face library, then: determining a plurality of target color channel data falling in the target reference channel area according to the color data set to obtain the target channel data set includes: Traversing the first preset face library to obtain H channel variable data; Generate an H channel reference area according to the H channel variable data; A plurality of H channel color data falling within the H channel reference area is determined according to the color data set, and a target channel data set corresponding to the H channel color data is obtained.

5. The method according to claim 3, characterized in that: If the target color channel data is S channel color data, then: determining a plurality of target color channel data falling in the target reference channel area according to the color data set to obtain a target channel data set includes: Traversing the first preset face library to obtain S channel variable data; Generate an S channel reference area according to the S channel variable data; A plurality of S channel color data falling within the S channel reference area is determined according to the color data set, and a target channel data set corresponding to the S channel color data is obtained.

6. The method according to claim 3, characterized in that: If the target color channel data is L channel color data, then: determining a plurality of target color channel data falling in the target reference channel area according to the color data set to obtain a target channel data set includes: Traversing the first preset face library to obtain L channel variable data; Generate an L channel reference area according to the L channel variable data; A plurality of L channel color data falling within the L channel reference area is determined according to the color data set, and a target channel data set corresponding to the L channel color data is obtained.

7. The method according to claim 3, characterized in that Before performing the image enhancement debugging operation on the target face area, the method further includes: Convert the target channel data into a target YUV color space data set; Then: the performing of the image enhancement debugging operation on the target face area includes: An image enhancement debugging operation is performed according to a target face area corresponding to the target YUV color space data set.

8. The method according to claim 2, characterized in that: If the target color space is a YUV color space, the target color channel data is Y channel color data, U channel color data, or V channel color data, and correspondingly, the preset reference face area is a Y channel reference area, a V channel reference area, or a U channel reference area.

9. The method according to claim 8, characterized in that If the target color channel data is Y channel color data, and the preset face library is the second preset face library, then: determining a plurality of target color channel data falling in the target reference channel area according to the color data set to obtain the target channel data set includes: Traversing the second preset face library to obtain Y channel variable data; Generate a Y channel reference area according to the Y channel variable data; A plurality of Y channel color data falling within the Y channel reference area is determined according to the color data set, and a target channel data set corresponding to the Y channel color data is obtained.

10. The method according to claim 8, characterized in that If the target color channel data is U channel color data, and the preset face library is the second preset face library, then: determining a plurality of target color channel data falling in the target reference channel area according to the color data set to obtain a target channel data set includes: Traversing the second preset face library to obtain U channel variable data; Generate a U channel reference area according to the U channel variable data; A plurality of U channel color data falling within the U channel reference area is determined according to the color data set, and a target channel data set corresponding to the U channel color data is obtained.

11. The method according to claim 8, characterized in that If the target color channel data is V channel color data, and the preset face library is the second preset face library, then: determining a plurality of target color channel data falling in the target reference channel area according to the color data set to obtain a target channel data set includes: Traversing the second preset face library to obtain V channel variable data; Generate a V channel reference area according to the V channel variable data; A plurality of V channel color data falling within the V channel reference area is determined according to the color data set, and a target channel data set corresponding to the V channel color data is obtained.

12. The method according to claim 8, characterized in that The identifying the target face region contained in the image frame according to the plurality of target channel data sets comprises: Obtain a second target channel data intersection of a target channel data set corresponding to the Y channel color data, a target channel data set corresponding to the U channel color data, and a target channel data set corresponding to the V channel color data; A target face region corresponding to the image frame at which the second target channel data intersects is identified.

13. A face enhancement debugging device, characterized in that: include: An acquisition unit, used for acquiring an image frame; A conversion unit, used for converting the image frame into a color data set conforming to a target color space; an identification unit, configured to identify a target face region included in the image frame according to the color data set and a preset reference face region in a preset face library; An execution unit is used to perform an image enhancement debugging operation on the target face area.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the face enhancement debugging method according to any one of claims 1 to 12.

15. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is connected to the processor, and the processor is used to execute one or more computer programs stored in the memory, and when the processor executes the one or more computer programs, the electronic device implements the method according to any one of claims 1 to 12.