Image processing method, device, equipment and storage medium
By obtaining the global brightness and skin color brightness parameters of the image and adaptively adjusting the brightness of the skin area, the problem of abnormal brightness and darkness of the face in the video image is solved, and the user experience and algorithm robustness are improved.
Patent Information
- Application Number
- CN202210152831.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-18
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-02-18
AI Technical Summary
Due to the uneven quality of acquisition hardware of different devices and different ambient lighting conditions, the brightness and darkness of faces in the video images appear abnormal, affecting the user experience.
By obtaining the global brightness parameter of the image in the first color space and the skin brightness parameter of the skin area, the overall brightness adjustment amplitude parameter is determined, the brightness of the character's skin area is adaptively adjusted, and the global tone mapping technology is used to improve the image quality.
It improves the problem of abnormal brightness and darkness of faces in video conferencing and video live broadcasts, improves the user interaction experience and enhances the robustness of the algorithm.
Smart Images

Figure CN114742716B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an image processing method, apparatus, device, and storage medium. Background Art
[0002] With the development of computer technology, more and more users can use devices such as mobile phones, cameras, computers connected to cameras, etc. to conduct video conferencing or live video broadcasting.
[0003] However, due to the uneven quality of acquisition hardware such as cameras and device sensors of different devices, as well as different ambient lighting conditions during video acquisition, video images may contain anomalies, such as faces appearing bright or dark, which affects the user experience. Summary of the Invention
[0004] The embodiments of the present application provide an image processing method, apparatus, device, and storage medium, which can effectively solve the problem of video screen anomalies, such as faces appearing bright or dark, affecting the user interaction experience during video conferencing or live video broadcasting.
[0005] According to a first aspect of an embodiment of the present application, there is provided an image processing method, comprising:
[0006] Obtaining a global brightness parameter of the image to be processed in the first color space and a skin color brightness parameter of a skin area of a person's face in the image to be processed;
[0007] Determine the overall brightness adjustment amplitude parameter of the skin area through the global brightness parameter and the skin color brightness parameter;
[0008] The image to be processed is adjusted according to the global brightness parameter, the skin color brightness parameter and the adjustment amplitude parameter to obtain a target image.
[0009] According to a second aspect of an embodiment of the present application, a live broadcast-based image processing method is provided, comprising:
[0010] Upon receiving a live broadcast request from a user terminal, obtaining a live video stream, where the live video stream includes at least one frame of image to be processed;
[0011] Obtaining a global brightness parameter of the image to be processed in the first color space and a skin color brightness parameter of a skin area of a person in the image to be processed;
[0012] Determine the overall brightness adjustment amplitude parameter of the skin area through the global brightness parameter and the skin color brightness parameter;
[0013] Adjusting the image to be processed according to the global brightness parameter, the skin color brightness parameter and the overall brightness adjustment amplitude parameter to obtain a target image;
[0014] Display the target image to the user end watching the live broadcast.
[0015] According to a third aspect of an embodiment of the present application, there is provided an image processing apparatus, including:
[0016] An acquisition module, configured to acquire a global brightness parameter of the image to be processed in the first color space and a skin color brightness parameter of a skin area of a person's face in the image to be processed;
[0017] A determination module, configured to determine an overall brightness adjustment amplitude parameter for adjusting the skin area based on a global brightness parameter and a skin color brightness parameter;
[0018] The adjustment module is used to adjust the image to be processed according to the global brightness parameter, the skin color brightness parameter and the adjustment amplitude parameter to obtain the target image.
[0019] According to a fourth aspect of an embodiment of the present application, a live broadcast-based image processing device includes:
[0020] An acquisition module, configured to acquire a live video stream upon receiving a live broadcast request sent by a user terminal, wherein the live video stream includes at least one frame of image to be processed;
[0021] The acquisition module is further used to acquire a global brightness parameter of the image to be processed in the first color space and a skin color brightness parameter of a skin area of a person in the image to be processed;
[0022] A determination module, configured to determine an overall brightness adjustment amplitude parameter for adjusting the skin area based on a global brightness parameter and a skin color brightness parameter;
[0023] An adjustment module is used to adjust the image to be processed according to the global brightness parameter, the skin color brightness parameter and the overall brightness adjustment amplitude parameter to obtain a target image;
[0024] The display module is used to display the target image to the user end watching the live broadcast.
[0025] According to a fifth aspect of an embodiment of the present application, there is provided a computer device, including: a memory and a processor;
[0026] a memory for storing a computer program;
[0027] A processor is used to execute a computer program stored in a memory, and when the computer program is running, the processor executes the steps of the image processing method shown in the first aspect, or executes the steps of the image processing method based on live broadcast shown in the second aspect.
[0028] According to the sixth aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a computer device, the computer device executes the steps of the image processing method shown in the first aspect, or executes the steps of the live broadcast-based image processing method shown in the second aspect.
[0029] According to the seventh aspect of the embodiments of the present application, a computer program product is provided, comprising a computer program. When the computer program is executed by a computer device, the computer device executes the steps of the image processing method as shown in the first aspect, or executes the steps of the live broadcast-based image processing method as shown in the second aspect.
[0030] According to the image processing method, apparatus, device and storage medium in the embodiments of the present application, the global brightness parameter of the image to be processed in the first color space and the skin color brightness parameter of the skin area of the person in the image to be processed, as well as the overall brightness adjustment amplitude parameter for adjusting the skin area based on the global brightness parameter and the skin color brightness parameter are determined, so that the brightness of the skin area of the person can be adaptively adjusted, and the current method of using a fixed overall brightness adjustment amplitude parameter is improved, so that the brightness of the person's skin is adaptively adjusted according to the scene in the image to be processed. Then, the image to be processed is adjusted according to the global brightness parameter, the skin color brightness parameter and the adjustment amplitude parameter to obtain the target image. As a result, the situation where the human face appears bright or dark during the live broadcast is improved, and the situation where the user's skin color is abnormal during video interaction such as video conferencing or video live broadcast is reduced, while improving the user interaction experience and improving the robustness of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The present application can be better understood from the following description of specific embodiments of the present application in conjunction with the accompanying drawings, wherein the same or similar figure numbers represent the same or similar features.
[0032] Figure 1 is a schematic diagram showing an image processing architecture according to an embodiment;
[0033] Figure 2 is a schematic diagram showing an image processing flow according to an embodiment;
[0034] Figure 3 is a flowchart illustrating an image processing method according to one embodiment;
[0035] Figure 4 is a flowchart illustrating an image processing process according to one embodiment;
[0036] Figure 5 is a flow chart illustrating an image processing method based on live broadcast according to one embodiment;
[0037] Figure 6 is a schematic structural diagram showing an image processing apparatus according to an embodiment;
[0038] Figure 7 is a schematic structural diagram illustrating an image processing device based on live broadcast according to an embodiment;
[0039] Figure 8 FIG. 1 is a schematic diagram showing the hardware structure of a computer device according to an embodiment. DETAILED DESCRIPTION
[0040] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only configured to explain the present application and are not configured to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.
[0041] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0042] High Dynamic Range Imaging (HDRI or HDR) is a set of techniques used in computer graphics and cinematography to achieve a greater dynamic range (i.e., greater differences between light and dark) than conventional digital imaging techniques. Tone mapping is a key component of HDR technology. Tone mapping is a computer graphics technique that approximates the display of high dynamic range images on media with limited dynamic range. Its purpose is to adapt the actual high dynamic range scene to the dynamic range of display devices. To achieve this, the chroma, brightness, and dynamic range of the HDR image must be mapped to the standard range of the light-sensitive detector (LDR) image.
[0043] Tone mapping can be categorized as global tone mapping (i.e., spatially invariant) and local tone mapping (i.e., spatially variable). Global tone mapping applies the same mapping function to all pixels in an image. Therefore, the same input pixel value is deterministically mapped to the same output pixel value. This means that based on the global information of the image, all pixels in the entire image are adjusted using the same transformation function, which can be a power function, logarithmic function, sigmoid function, etc. Local tone mapping applies different transformation functions to different spatial regions in the image. In this case, regions with the same color before mapping may have different colors after mapping, depending on their location and the values of the surrounding pixels. As a result, global tone mapping is faster than local tone mapping. Furthermore, global tone mapping can process images more quickly using lookup tables, making it more suitable for video processing.
[0044] Based on this, users can use devices such as mobile phones, cameras, and computers with connected cameras for video conferencing or live streaming. However, due to the varying quality of acquisition hardware, such as cameras and device sensors, and varying ambient lighting conditions during video capture, video quality anomalies can occur, such as faces appearing bright or dark. When the acquisition hardware, such as a laptop camera, a universal serial bus (USB) camera, a mobile phone sensor, or a camera's light sensor, has a large sensor dynamic range (i.e., the maximum and minimum range of a captured physical quantity, such as a variable signal (e.g., sound or light), or the maximum and minimum range of its output, which can be expressed as a base-10 logarithm (decibels) or a base-2 logarithm), or when the capture environment is dark, the user's skin, such as their face, in the video can easily appear too dark (too bright) due to the limitations of the sensor dynamic range and automatic exposure, impacting the user's interactive experience.
[0045] In the related art, videos can be processed through a logarithmic function mapping method, that is, an algorithm that selects different logarithmic bases for different brightness. Although this method can retain the details and contrast of the image, it has the following problems: first, the color saturation of the image will change significantly, resulting in abnormal display colorimetry of the processed image; second, the algorithm involved in this method contains fixed empirical parameters, and does not take into account the adaptive situation that the video contains a human face and the facial skin of the face is the region of interest (ROI), resulting in the processed skin area appearing darker or brighter when displayed, which not only affects the imaging quality but also reduces the user interaction experience.
[0046] Therefore, in response to the above-mentioned problem, when the user's facial skin contained in the image is the ROI, the image processing method of skin color adaptive global tone mapping provided in the embodiment of the present application can improve the perception of the face and effectively solve the problem of abnormalities in the video screen during video conferencing or live video broadcasting, such as the face appearing bright or dark, which affects the user's interactive experience.
[0047] Based on this, the following Figure 1 The image processing architecture shown in the embodiment of the present application provides a detailed description of the image processing method provided in the embodiment of the present application.
[0048] In one or more possible embodiments, Figure 1 As shown, the image processing architecture proposed in the embodiment of the present application may include a user terminal 10 and a server terminal 20. For example, the user terminal 10 may be a mobile phone, tablet computer, laptop computer, PDA, wearable device or other device, which may include image acquisition hardware such as a camera and device sensors to provide the function of shooting or recording video (or image); or, the device may be connected to external image acquisition hardware such as a USB camera to achieve the function of shooting or recording video (or image). The server terminal 20 may be a physical computer device with an image processing function, or it may be a cloud platform with an image processing function such as a public cloud platform, a private cloud platform, or a hybrid cloud platform. The server terminal 20 can receive the video (or image) transmitted by the user terminal 10, and provide the image processing service in the embodiment of the present application to the user terminal 10, so as to improve the abnormality of the video picture, such as the bright or dark appearance of the face, during the video conference or live video broadcast, and improve the user interaction experience.
[0049] Based on the above display architecture, combined with Figure 2 The image processing method provided in the embodiments of the present application is described in detail.
[0050] like Figure 2 As shown, the client 10 acquires a video through image acquisition hardware and sends the acquired video to the server 20 .
[0051] The server 20 receives the video and encodes the video through a color coding algorithm to obtain a multi-frame image whose data format is a first color space (i.e., YUV), and extracts the image to be processed including at least one frame of a person from the multi-frame image. Next, the global brightness parameter of the image to be processed in the first color space and the skin color brightness parameter of the skin area of the person in the image to be processed are obtained. Furthermore, the overall brightness adjustment amplitude parameter for adjusting the skin area is determined by the global brightness parameter and the skin color brightness parameter, and the image to be processed is adjusted according to the global brightness parameter, the skin color brightness parameter and the adjustment amplitude parameter to obtain a target image with enhanced brightness and color. It should be noted that the skin area in the embodiment of the present application may refer to the skin area of the user's face.
[0052] Based on this, the server 20 encodes the target image through a color coding algorithm to obtain a target video with a data format of the first color space, that is, converts the data format RGB into YUV to send the target video with an image format of YUV to the user terminal 10.
[0053] In this way, when the user terminal 10 receives the target video sent by the server terminal 20, the user terminal 10 displays an image in which the brightness and color of the skin area of the person's face have been improved.
[0054] It should be noted that different color encoding algorithms can be used to encode the video according to actual conditions, and the data format obtained is other color spaces such as CMY, HSV, HSI, etc. The embodiment of this application takes YUV as an example for illustration.
[0055] Therefore, the image processing method provided by the embodiment of the present application can determine the overall brightness adjustment amplitude parameter of the skin area through the global brightness parameter of the image to be processed in the first color space and the skin color brightness parameter of the skin area of the face of the person in the image to be processed, as well as based on the global brightness parameter and the skin color brightness parameter, so that the brightness of the face area of the person can be adaptively adjusted. Then, according to the global brightness parameter, the skin color brightness parameter and the adjustment amplitude parameter, the image to be processed is adjusted to obtain the target image. As a result, the situation where the human face appears bright or dark during the live broadcast is improved, and the situation where the user's skin color is abnormal during video interaction such as video conferencing or video live broadcast is reduced, thereby improving the user interaction experience while improving the robustness of the algorithm.
[0056] In another or more possible embodiments, still referring to Figure 1, the image processing architecture proposed in the embodiment of the present application may only include the user terminal 10. In this case, the user terminal 10 may include image acquisition hardware such as a camera and a device sensor to provide the function of shooting or recording video (or image); or the device may be connected to external image acquisition hardware such as a USB camera to achieve the function of shooting or recording video (or image); and, based on the video (or image) obtained by the user terminal 10, the image processing service in the embodiment of the present application is provided to improve the video image anomaly, such as the bright or dark appearance of the face, during the video conference or video live broadcast, and enhance the user interaction experience.
[0057] Of course, in one or more possible embodiments, still refer to Figure 1 The image processing architecture proposed in the embodiment of the present application may only include the server 20, and the server 10 may be used to provide an image processing method for the user terminal during a video conference or live video broadcast. That is, when the server 20 receives a live broadcast request sent by the user terminal, it obtains a live video stream, which includes at least one frame of an image to be processed; obtains the global brightness parameter of the image to be processed in the first color space and the skin color brightness parameter of the skin area of the person in the image to be processed; determines the overall brightness adjustment amplitude parameter for adjusting the skin area through the global brightness parameter and the skin color brightness parameter; adjusts the image to be processed according to the global brightness parameter, the skin color brightness parameter and the overall brightness adjustment amplitude parameter to obtain a target image; and displays the target image to the user terminal watching the live broadcast.
[0058] Therefore, the server 20 can provide the image processing method in the embodiment of the present application for the acquired video to support the user end corresponding to the server to improve video image abnormalities such as the appearance of bright or dark faces during video conferencing or live video broadcasting, thereby improving the user interaction experience.
[0059] It should be noted that the image processing architecture in the embodiment of the present application can be applied not only to the user interaction scenarios such as video conferencing or live video broadcasting shown above, to improve the situation where the user's facial skin in the video is easily displayed too dark due to the limitations of the dynamic range and automatic exposure of the user-side sensor, and to improve the user interaction experience. In actual applications, it can also be applied to any scenario that requires adjustment of the user's skin in the video (or image).
[0060] According to the above architecture and application scenarios, the following are combined Figure 3 The image processing method provided in the embodiments of the present application is described in detail.
[0061] Figure 3 is a flowchart illustrating an image processing method according to one embodiment.
[0062] like Figure 3 As shown, the image processing method can be applied to the above image processing architecture, and specifically may include:
[0063] In step 310, the global brightness parameter of the image to be processed in the first color space and the skin color brightness parameter of the skin area of the face of the person in the image to be processed are obtained; in step 320, the overall brightness adjustment amplitude parameter for adjusting the skin area is determined by the global brightness parameter and the skin color brightness parameter; in step 330, the image to be processed is adjusted according to the global brightness parameter, the skin color brightness parameter and the adjustment amplitude parameter to obtain the target image.
[0064] The above steps are described in detail below.
[0065] Regarding step 310 , in the embodiment of the present application, the global brightness parameter may include at least one of the following: a global average brightness value, a maximum brightness value.
[0066] The global average brightness value and the maximum brightness value can be calculated by the following steps.
[0067] First of all, it should be noted that Figure 4 As shown, the embodiments of the present application can be based on various types of color spaces such as YUV. CMY, HSV, and HSI are used to detect the skin color of people in the video. Here, the first color space YUV is used as an example to describe the color space by brightness-color difference. Among them, Y represents brightness (Luminance or Luma), that is, the grayscale value, and the channel corresponding to Y is the brightness channel; U and V represent chrominance (chrominance or chroma), which is used to describe the color and saturation of the image. The chroma channel is used to characterize the color saturation of the image to be processed and the color degree of each pixel in the image to be processed. U and V correspond to the chroma channel.
[0068] Based on this, step 310 may specifically include step 3101 and step 3102 to calculate the maximum brightness.
[0069] Step 3101: traverse each pixel in the image to be processed in the first color space and calculate the accumulated brightness value of each pixel in the brightness channel.
[0070] Step 3102: Filter a first target brightness accumulated value that is greater than or equal to a preset brightness accumulated value from a plurality of brightness accumulated values, and determine the first target brightness accumulated value as the maximum brightness value.
[0071] Then, step 310 may specifically include steps 3103 and 3104 to calculate the global average brightness value.
[0072] Step 3103: Acquire image attribute parameters of the image to be processed, where the image attribute parameters include a height value and a width value.
[0073] Step 3104 : Calculate a global average brightness value based on the accumulated brightness value of each pixel in the brightness channel and the image attribute parameters of the image to be processed.
[0074] For example, Figure 4 As shown, when YUV traverses each pixel in the image to be processed, the logarithm of the brightness luma of the brightness channel corresponding to the pixel is calculated, that is, log_luma=log(luma), and the accumulated value of the first target brightness of each pixel in the brightness channel is sum=sum+log_luma.
[0075] Based on this, a first target brightness accumulated value greater than or equal to a preset brightness accumulated value is screened from the plurality of brightness accumulated values, that is, the maximum brightness value is luma_max=max(luma_max, luma).
[0076] After the traversal is completed, the global average brightness value luma_ave is calculated by the following formula (1). Here, the global average brightness value can be represented by the global logarithmic average value.
[0077]
[0078] Where sum is the accumulated brightness value, width is the width of the image to be processed, and height is the height of the image to be processed.
[0079] In addition, in one example, step 310 may specifically include steps 3105 and 3106 to determine the skin area of the person's face.
[0080] Step 3105 , when the first color space includes a chroma channel, traverse each pixel in the image to be processed in the first color space to obtain the chroma value of each pixel in the chroma channel.
[0081] Step 3106 , screening a target chromaticity value that satisfies a preset chromaticity value from the plurality of chromaticity values, and determining that the area of pixels corresponding to the target chromaticity value is the skin area.
[0082] For example, Figure 4As shown, in the YUV space, each pixel of the image is traversed, and the skin area in the image to be processed is determined by judging the chromaticity value, wherein the chromaticity value includes the component value of U and the component value of V. Based on this, the target chromaticity value that satisfies the U component value greater than the first preset component value u_thresh_low and less than the second preset component value u_thresh_high, and the V component value greater than the third preset component value v_thresh_low and less than the fourth preset component value v_thresh_high in each pixel is screened, and the area where the pixel corresponding to the target chromaticity value is located is determined to be the skin area.
[0083] Based on this, the skin color brightness parameter in the embodiment of the present application includes the average skin color brightness of the skin area. When the average skin color brightness is used to characterize the average brightness of the skin, step 310 can specifically include steps 3107 and 3108 to calculate the average skin color brightness.
[0084] Step 3107: Calculate a second target brightness accumulated value of each target pixel in the brightness channel according to each target pixel in the skin area.
[0085] Step 3108: Calculate the average skin color brightness based on the global brightness parameter, the second target brightness accumulated value, and the count value of the target pixel.
[0086] For example, the second brightness accumulation value of the target pixel in the brightness channel is sum=sum+luma, and the count value of the target pixel is calculated as count=count+1. After the traversal is completed, the skin color brightness average value skin_ave is calculated using the following formula (2):
[0087] skin_ave=(sum / count) / luma_ave (2)
[0088] Among them, luma_ave is the global average brightness value.
[0089] Regarding step 320, in one or more possible embodiments, step 320 may specifically include:
[0090] Based on the association information between the preset image attribute parameters and the skin color brightness parameters, a target skin color brightness parameter corresponding to the image attribute parameters of the image to be processed is obtained, where the target skin color brightness parameter is a brightness value for adjusting the skin area;
[0091] The overall brightness adjustment amplitude parameter is calculated based on the global brightness parameter, the skin color brightness parameter and the target skin color brightness value through a logarithmic function mapping algorithm.
[0092] Exemplarily, image attribute parameters of the image to be processed are obtained. The image attribute parameters may also include an image bit depth, such as 8 bits. Based on the association information between the preset image attribute parameters and the skin color brightness parameter, a target skin color brightness parameter corresponding to 8 bits is obtained, such as skin_dst=165 (which can be set independently according to needs). Then, the value of the overall brightness adjustment amplitude parameter (bias) at this time is inversely solved using the following formula 3, thereby obtaining the overall adjustment amplitude of the image to be processed in this scenario:
[0093]
[0094] Wherein, L = skin_ave / luma_ave, skin_ave is the average brightness of skin color, luma_ave is the global average brightness value; L max =luma_max / luma_ave, L max is the global maximum value, and luma_max is the maximum brightness.
[0095] Here, after obtaining the overall brightness adjustment amplitude parameter, the initial overall brightness adjustment amplitude parameter in formula (3) can be adjusted to the overall brightness adjustment amplitude parameter obtained by the above formula (3) to calculate the skin color brightness parameter Y′.
[0096] Regarding step 330 , in one or more possible embodiments, based on the above-mentioned step 220 , step 320 may specifically include step 3301 and step 3302 .
[0097] Step 3301: Obtain color correction parameters for the skin area based on the global brightness parameter and the skin color brightness parameter by using a saturation preservation algorithm of the transformation gradient.
[0098] Furthermore, step 3301 may specifically include:
[0099] Calculating, based on the global brightness parameter, the skin color brightness parameter, and the overall brightness adjustment amplitude parameter, neighboring skin color brightness parameters of the skin color brightness parameter, wherein the neighboring skin color brightness parameters include values that are adjacent to the skin color brightness parameter and meet a preset condition;
[0100] The color correction parameters of the skin area are calculated based on the skin color brightness parameter, the neighborhood skin color brightness parameter and the overall brightness adjustment amplitude parameter.
[0101] For example, Figure 4 As shown, the embodiment of the present application is based on the saturation preservation formula given by the transformation gradient to solve the gradient near the skin color brightness parameter, thereby obtaining the color correction parameter color_correction. The specific process is as follows:
[0102] First, according to the logarithmic mapping function of the inverse mapping corresponding to formula (3), that is, formula (4), the neighborhood skin color brightness parameter luma_dst_pre = f(Y-delta) is calculated. At this time, L = (Y-delta) / luma_ave, where delta is the step size between the skin color brightness parameter and the neighborhood skin color brightness parameter. Here, delta is an optional value. Specifically, delta can be 0.01 as an example.
[0103]
[0104] Next, continue to calculate Y′=f(Y) according to formula (4). At this time, L=Y / luma_ave. Then, the logarithmic gradient value log_slope of the skin brightness used to characterize the neighborhood skin brightness parameter can be calculated by formula (5):
[0105]
[0106] Among them, luma_dst is Y′, luma is Y, and luma_dst_pre is the neighborhood skin brightness parameter.
[0107] Then, according to the color correction parameter color_correction = exp(log_slope, a), where a is a self-selected value, which in this embodiment can be 0.5 or other optional values. In this way, the color correction parameter is determined by transforming the logarithmic gradient value of the skin brightness calculated by the gradient to maintain the consistency of saturation before and after tone mapping.
[0108] Therefore, by detecting the skin area in the YUV space and calculating the average skin color brightness of the skin area, the color correction parameter is calculated by the image attribute parameters of the image to be processed, and thus, based on the inverse mapping from formula (3) to formula (4), the overall brightness adjustment amplitude parameter is obtained, which improves the current method of using a fixed overall brightness adjustment amplitude parameter, so that the facial brightness of the character is adaptively adjusted according to the scene in the image to be processed, solves the problem of drastic changes in skin color saturation due to brightening, improves the unstable brightness performance of the skin area on the face of the character, such as the face appearing bright or dark, reduces the abnormal skin color of the character during video interaction such as video conferencing or video live broadcast, improves the user interaction experience, and improves the robustness of the algorithm.
[0109] Step 3302: Adjust the image to be processed according to the color correction parameter, the global brightness parameter, the skin color brightness parameter, and the overall brightness adjustment amplitude parameter to obtain a target image.
[0110] Furthermore, step 3302 may specifically include step 33021 and step 33022.
[0111] Step 33021, based on the global brightness parameter, the skin color brightness parameter, the color correction parameter and the overall brightness adjustment amplitude parameter, construct a mapping of the image to be processed from the first color space to the second color space to search for associated information.
[0112] Step 33022: Look up the associated information based on the mapping, obtain the target adjustment value of the image to be processed in the second color space, and adjust the image to be processed according to the target adjustment value to obtain the target image.
[0113] For example, Figure 4 As shown, according to formula (1) to formula (5), L max , luma_ave, bias and color_correction, for an 8-bit image, calculate a 256*256 size mapping to find the associated information, where the calculation formula for the brightness mapping is y'=f(luma / luma_ave,L max , bias), which is formula (4), where L = luma / luma_ave, and the calculation formula for color adjustment is color_dst = g(color_src, y', y, color_correction), where the value of luma is [0, 1, 2...255], and the value of color_src is [0, 1, 2..255]. The traversal results in color_dst = H(luma, color_src), and the two-dimensional mapping can be used to find the associated information through formula (6):
[0114]
[0115] Here, color_src includes the component values of the first color channel, i.e., the r channel, the second color channel, i.e., the g channel, and the third color channel, i.e., the b channel, of the second color space. In this way, the mapped color_dst can be obtained.
[0116] Based on this, in one or more possible embodiments, the second color space includes a first color channel, a second color channel, and a third color channel, and the target adjustment value includes a first adjustment value, a second adjustment value, and a third adjustment value.
[0117] Based on this, step 33021 may specifically include:
[0118] Obtaining a first initial value of a first color channel, a second initial value of a second color channel, and a third initial value of a third color channel for each target pixel in the skin area;
[0119] Based on the brightness parameter, first initial value, second initial value and third initial value of each target pixel in the first color space, a first adjustment value corresponding to the first initial value, a second adjustment value corresponding to the second initial value and a third adjustment value corresponding to the third initial value are calculated by mapping and searching the associated information.
[0120] For example, the image mapping process is entered, and the Y value of the brightness channel in the YUV space and the r, g, and b values in the RGB space are used as indexes to map and search for associated information to obtain the r', g', and b' values after global tone mapping and color adjustment. The image traversal of the image to be processed is performed at the pixel point (x, y). At this time, the brightness value of the brightness channel in the YUV space is Y, and the second color space RGB includes a first color channel, namely the r channel, a second color channel, namely the g channel, and a third color channel, namely the b channel. Then, if the first initial value of the r channel is r, the second initial value of the g channel is g, and the third initial value of the b channel is b, then the three channel values of RGB after mapping are r'=H(luma,r), g'=H(luma,g), and b'=H(luma,b). After the traversal is completed, the entire enhanced image can be obtained.
[0121] Based on this, step 33022 may specifically include:
[0122] Adjusting the first initial value of each target pixel in the first color channel to a first adjusted value, adjusting the second initial value to a second adjusted value, and adjusting the third initial value to a third adjusted value to obtain an adjusted skin area;
[0123] The image to be processed is updated based on the adjusted skin area to obtain a target image.
[0124] In another or more possible embodiments, the target adjustment value further includes a global chromaticity parameter of the image to be processed. Based on this, step 33022 may specifically include:
[0125] Using a global tone mapping algorithm, the processed image is updated based on the adjusted skin area and global chromaticity parameters to obtain the target image. This mapping and searching for associated information allows for simultaneous brightness and color adjustments, improving computational efficiency.
[0126] In summary, according to the image processing method, device, equipment and storage medium in the embodiments of the present application, the global brightness parameter of the image to be processed in the first color space and the skin color brightness parameter of the skin area of the person in the image to be processed, as well as the overall brightness adjustment amplitude parameter for adjusting the skin area based on the global brightness parameter and the skin color brightness parameter, can be determined. The brightness of the skin area of the person can be adaptively adjusted, which improves the current method of using a fixed overall brightness adjustment amplitude parameter. The brightness of the person's face can be adaptively adjusted according to the scene in the image to be processed, and the unstable brightness performance of the skin area on the person's face, such as the face appearing bright or dark, is improved. The abnormal skin color of the person during video interaction such as video conferencing or live video broadcasting is reduced, and the user interaction experience is improved while improving the robustness of the algorithm.
[0127] Then, according to the global brightness parameter, skin color brightness parameter and adjustment amplitude parameter, mapping lookup association information of the image to be processed from the first color space to the second color space is constructed; based on the mapping lookup association information, the target adjustment value of the image to be processed in the second color space is obtained, and the image to be processed is adjusted according to the target adjustment value to obtain the target image. Thus, the brightness adjustment and color adjustment of the image to be processed can be simultaneously achieved through the mapping lookup table, thereby improving the computational efficiency.
[0128] Based on the same inventive concept, in order to better illustrate the image processing method provided by the embodiment of the present application, the embodiment of the present application provides an image processing method in the scene of video conferencing or video live broadcast, which can be specifically combined with Figure 5 Provide detailed explanation.
[0129] Figure 5 is a flowchart illustrating an image processing method based on live broadcast according to one embodiment.
[0130] like Figure 5 As shown, the image processing method can be applied to the above image processing architecture, and specifically may include:
[0131] Step 510, upon receiving a live broadcast request sent by the user terminal, obtain a live video stream, the live video stream including at least one frame of the image to be processed; Step 520, obtain the global brightness parameter of the image to be processed in the first color space and the skin color brightness parameter of the skin area of the character in the image to be processed; Step 530, determine the overall brightness adjustment amplitude parameter for adjusting the skin area through the global brightness parameter and the skin color brightness parameter; Step 540, adjust the image to be processed according to the global brightness parameter, the skin color brightness parameter and the overall brightness adjustment amplitude parameter to obtain the target image; Step 550, display the target image to the user terminal watching the live broadcast.
[0132] In this way, based on the above Figure 3The image processing method shown can improve the problem of the user's facial skin appearing too dark in the video due to the limitations of the dynamic range and automatic exposure of the user-side sensor in video interaction scenarios such as video conferencing or video live streaming. It reduces the situation of abnormal skin color of the user during video interaction such as video conferencing or video live streaming, improves the user interaction experience, and enhances the robustness of the algorithm.
[0133] It should be understood that the present application is not limited to the specific configurations and processes described in the above embodiments and illustrated in the figures. For the sake of convenience and brevity, detailed descriptions of known methods are omitted here. The specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0134] Based on the same inventive concept, the present application provides an image processing device corresponding to the above-mentioned image processing method. Figure 6 Provide detailed explanation.
[0135] Figure 6 FIG. 1 is a schematic structural diagram illustrating an image processing apparatus according to an embodiment.
[0136] like Figure 6 As shown, the image processing device 60 is applied to Figure 1 In the image processing architecture shown, the image processing device 60 may specifically include:
[0137] An acquisition module 601 is configured to acquire a global brightness parameter of the image to be processed in a first color space and a skin color brightness parameter of a skin region of a person in the image to be processed;
[0138] A determination module 602 is configured to determine an overall brightness adjustment amplitude parameter for adjusting the skin area based on a global brightness parameter and a skin color brightness parameter;
[0139] The construction module 603 is used to adjust the image to be processed according to the global brightness parameter, the skin color brightness parameter and the overall brightness adjustment amplitude parameter to obtain a target image.
[0140] Based on this, the image processing device 60 provided in an embodiment of the present application is described in detail below: In one or more possible embodiments, the acquisition module 601 may be specifically configured to, when the global brightness parameter includes a maximum brightness value and the first color space includes a brightness channel, traverse each pixel in the image to be processed in the first color space and calculate the accumulated brightness value of each pixel in the brightness channel;
[0141] A first target brightness accumulated value greater than or equal to a preset brightness accumulated value is screened from the plurality of brightness accumulated values, and the first target brightness accumulated value is determined as a brightness maximum value.
[0142] In another or more possible embodiments, the acquisition module 601 can be specifically used to calculate the global average brightness value based on the accumulated brightness value of each pixel in the brightness channel and the image attribute parameters of the image to be processed when the global brightness parameter includes a global average brightness value; wherein the image attribute parameters include a height value and a width value.
[0143] In another one or more possible embodiments, the acquisition module 601 can also be used to traverse each pixel in the image to be processed in the first color space, obtain the chromaticity value of each pixel in the chromaticity channel, when the first color space includes a chromaticity channel, and the chromaticity channel is used to characterize the color saturation of the image to be processed and the color degree of each pixel in the image to be processed; from multiple chromaticity values, filter out a target chromaticity value that satisfies a preset chromaticity value, and determine that the area of the pixel corresponding to the target chromaticity value is the skin area.
[0144] In yet one or more possible embodiments, the acquisition module 601 may be specifically configured to calculate, based on each target pixel in the skin area, a second target brightness accumulated value of the target pixel in the brightness channel, when the skin color brightness parameter includes an average skin color brightness value of the skin area, and the average skin color brightness value is used to represent the average skin color of the human face;
[0145] An average skin color brightness value is calculated based on the global brightness parameter, the second target brightness accumulated value, and the count value of the target pixel.
[0146] In yet another one or more possible embodiments, the determining module 602 may be specifically configured to obtain a target skin color brightness parameter corresponding to the image attribute parameter of the image to be processed based on association information between the preset image attribute parameter and the skin color brightness parameter, where the target skin color brightness parameter is a brightness value of the adjusted skin area.
[0147] The overall brightness adjustment amplitude parameter is calculated based on the global brightness parameter, the skin color brightness parameter and the target skin color brightness value through a logarithmic function mapping algorithm.
[0148] In yet another one or more possible embodiments, the construction module 603 may be specifically configured to obtain a color correction parameter for the skin region based on a global brightness parameter and a skin color brightness parameter by using a saturation preservation algorithm of a transformation gradient.
[0149] According to the color correction parameter, the global brightness parameter, the skin color brightness parameter and the overall brightness adjustment amplitude parameter, the image to be processed is adjusted to obtain the target image.
[0150] Furthermore, the construction module 603 may be specifically configured to calculate, based on the global brightness parameter, the skin color brightness parameter, and the overall brightness adjustment amplitude parameter, a neighboring skin color brightness parameter of the skin color brightness parameter, wherein the neighboring skin color brightness parameter includes values that are adjacent to the skin color brightness parameter and satisfy a preset condition.
[0151] The color correction parameters of the skin area are calculated based on the skin color brightness parameter, the neighborhood skin color brightness parameter and the overall brightness adjustment amplitude parameter.
[0152] In yet another one or more possible embodiments, the construction module 603 may be specifically configured to construct a mapping from the first color space to the second color space of the image to be processed based on the global brightness parameter, the skin color brightness parameter, the color correction parameter, and the overall brightness adjustment amplitude parameter, and search for associated information.
[0153] Based on the mapping, the associated information is searched, a target adjustment value of the image to be processed in the second color space is obtained, and the image to be processed is adjusted according to the target adjustment value to obtain a target image.
[0154] Therefore, by using the global brightness parameter of the image to be processed in the first color space and the skin color brightness parameter of the skin area of the person in the image to be processed, and based on the global brightness parameter and the skin color brightness parameter, the overall brightness adjustment amplitude parameter for adjusting the skin area is determined, so that the brightness of the skin area of the person can be adaptively adjusted, and the current method of using a fixed overall brightness adjustment amplitude parameter is improved, so that the brightness of the person's skin is adaptively adjusted according to the scene in the image to be processed. Then, according to the global brightness parameter, the skin color brightness parameter and the adjustment amplitude parameter, the image to be processed is adjusted to obtain the target image. As a result, the situation where the human face appears bright or dark during the live broadcast is improved, and the situation where the user's skin color is abnormal during video interaction such as video conferencing or video live broadcast is reduced, while improving the user interaction experience and improving the robustness of the algorithm.
[0155] Based on the same inventive concept, the present application provides a live-based image processing device corresponding to the above-mentioned live-based image processing method. Figure 7 Provide detailed explanation.
[0156] Figure 7 It is a structural diagram showing an image processing device based on live broadcast according to one embodiment.
[0157] like Figure 7 As shown, the live broadcast-based image processing device 70 is applied to Figure 1 In the image processing architecture shown, the live broadcast-based image processing device 70 may specifically include:
[0158] The acquisition module 701 is configured to acquire a live video stream upon receiving a live broadcast request from a user terminal, wherein the live video stream includes at least one frame of image to be processed;
[0159] The acquisition module 701 is further configured to acquire a global brightness parameter of the image to be processed in the first color space and a skin color brightness parameter of a skin region of a person in the image to be processed;
[0160] A determination module 702 is configured to determine an overall brightness adjustment amplitude parameter for adjusting the skin area based on a global brightness parameter and a skin color brightness parameter;
[0161] An adjustment module 703 is configured to adjust the image to be processed according to the global brightness parameter, the skin color brightness parameter, and the overall brightness adjustment amplitude parameter to obtain a target image;
[0162] The display module 704 is used to display the target image to the user terminal watching the live broadcast.
[0163] As a result, in video interaction scenarios such as video conferencing or live video streaming, the problem of the user's facial skin appearing too dark in the video due to the limitations of the dynamic range and automatic exposure of the user-side sensor can be improved, and the abnormal skin color of the characters in the video interaction process such as video conferencing or live video streaming can be reduced. While improving the user interaction experience, the robustness of the algorithm is improved.
[0164] Figure 8 FIG. 1 is a schematic diagram showing the hardware structure of a computer device according to an embodiment.
[0165] like Figure 8 As shown, the computer device 800 includes an input device 801 , an input interface 802 , a processor 803 , a memory 804 , an output interface 805 , and an output device 806 .
[0166] The input interface 802, processor 803, memory 804, and output interface 805 are interconnected via a bus 810. The input device 801 and output device 806 are connected to the bus 810 via the input interface 802 and output interface 805, respectively, and are further connected to other components of the computer device 800. Specifically, the input device 801 receives input information from the outside and transmits the input information to the processor 803 via the input interface 802. The processor 803 processes the input information based on computer-executable instructions stored in the memory 804 to generate output information, temporarily or permanently stores the output information in the memory 804, and then transmits the output information to the output device 806 via the output interface 805. The output device 806 outputs the output information to the outside of the computer device 800 for user use.
[0167] In one embodiment, Figure 8 The computer device 800 shown may be implemented as an image processing device, which may include: a memory configured to store a program; and a processor configured to run the program stored in the memory to execute the image processing method described in the above embodiment.
[0168] In one embodiment, the memory can also be used to store the association information of the preset image attribute parameters and the skin color brightness parameters and the combination of the above Figure 3 The calculation results of each step in the described image processing process include, for example, at least: global brightness parameters, skin color brightness parameters, mapping search association information, and target image.
[0169] According to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer-readable storage medium. For example, an embodiment of the present application includes a computer-readable storage medium, which includes a program or instruction stored on the computer-readable storage medium, and when the program or instruction is executed by a computer device, the computer device performs the steps of the above method.
[0170] According to an embodiment of the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present application includes a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network and / or installed from a removable storage medium.
[0171] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions, which, when running on a computer, causes the computer to execute the method described in each of the above embodiments. When loading and executing the computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, solid state drive), etc.
[0172] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0173] 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. An image processing method, comprising: Acquire a global brightness parameter of the image to be processed in a first color space and a skin color brightness parameter of a skin area of a person in the image to be processed; Determining an overall brightness adjustment amplitude parameter for adjusting the skin area according to the global brightness parameter and the skin color brightness parameter; Adjusting the image to be processed according to the global brightness parameter, the skin color brightness parameter, and the overall brightness adjustment amplitude parameter to obtain a target image; wherein determining the overall brightness adjustment amplitude parameter for adjusting the skin area according to the global brightness parameter and the skin color brightness parameter includes: Based on the association information of preset image attribute parameters and skin color brightness parameters, the target skin color brightness parameters corresponding to the image attribute parameters of the image to be processed are obtained, and the target skin color brightness parameters are used to adjust the brightness value of the skin area; through the logarithmic function mapping algorithm, the overall brightness adjustment amplitude parameter is calculated according to the global brightness parameter, the skin color brightness parameter and the target skin color brightness value.
2. The method according to claim 1, wherein The global brightness parameter includes a brightness maximum value, and the first color space includes a brightness channel; The obtaining of a global brightness parameter of the image to be processed in the first color space includes: Traversing each pixel in the image to be processed in the first color space, and calculating the accumulated brightness value of each pixel in the brightness channel; A first target brightness accumulated value greater than or equal to a preset brightness accumulated value is screened from the plurality of brightness accumulated values, and the first target brightness accumulated value is determined as the maximum brightness value.
3. The method according to claim 1 or 2, wherein: The global brightness parameter includes a global average brightness value; The obtaining of a global brightness parameter of the image to be processed in the first color space includes: The global average brightness value is calculated based on the accumulated brightness value of each pixel in the brightness channel and the image attribute parameters of the image to be processed; wherein the image attribute parameters include a height value and a width value.
4. The method according to claim 1, wherein The first color space includes a chromaticity channel, and the chromaticity channel is used to represent the color saturation of the image to be processed and the color degree of each pixel in the image to be processed; The method further comprises: Traversing each pixel in the image to be processed in the first color space, and obtaining the chromaticity value of each pixel in the chromaticity channel; A target chromaticity value that satisfies a preset chromaticity value is screened from a plurality of chromaticity values, and an area of pixels corresponding to the target chromaticity value is determined to be the skin area.
5. The method according to claim 4, wherein The skin color brightness parameter includes the skin color brightness average value of the skin area, and the skin color brightness average value is used to represent the average brightness of the human skin; The step of obtaining a global brightness parameter of the image to be processed in the first color space and a skin color brightness parameter of a skin area of a person in the image to be processed includes: Calculating, according to each target pixel in the skin area, a second target brightness accumulated value of the target pixel in a brightness channel; The skin color brightness average value is calculated based on the global brightness parameter, the second target brightness accumulated value, and the count value of the target pixel.
6. The method according to claim 1, wherein The step of adjusting the image to be processed according to the global brightness parameter, the skin color brightness parameter, and the overall brightness adjustment amplitude parameter to obtain a target image includes: Obtaining a color correction parameter for the skin area based on the global brightness parameter and the skin color brightness parameter by using a saturation preservation algorithm of a transformation gradient; The image to be processed is adjusted according to the color correction parameter, the global brightness parameter, the skin color brightness parameter and the overall brightness adjustment amplitude parameter to obtain a target image.
7. The method according to claim 6, wherein: The saturation preservation algorithm through the transformation gradient obtains the color correction parameter of the skin area based on the global brightness parameter and the skin color brightness parameter, including: Calculating, based on the global brightness parameter, the skin color brightness parameter, and the overall brightness adjustment amplitude parameter, a neighboring skin color brightness parameter of the skin color brightness parameter, wherein the neighboring skin color brightness parameter includes values that are adjacent to the skin color brightness parameter and satisfy a preset condition; The color correction parameter of the skin area is calculated based on the skin color brightness parameter, the neighborhood skin color brightness parameter and the overall brightness adjustment amplitude parameter.
8. The method according to claim 6, wherein: The step of adjusting the image to be processed according to the color correction parameter, the global brightness parameter, the skin color brightness parameter, and the overall brightness adjustment amplitude parameter to obtain a target image includes: Constructing mapping and searching association information of the image to be processed from the first color space to the second color space according to the global brightness parameter, the skin color brightness parameter, the color correction parameter, and the overall brightness adjustment amplitude parameter; Based on the mapping, the associated information is searched to obtain a target adjustment value of the image to be processed in the second color space, and the image to be processed is adjusted according to the target adjustment value to obtain a target image.
9. A live broadcast-based image processing method, comprising: Upon receiving a live broadcast request from a user terminal, obtaining a live video stream, wherein the live video stream includes at least one frame of image to be processed; Acquire a global brightness parameter of the image to be processed in a first color space and a skin color brightness parameter of a skin area of a person in the image to be processed; Determining an overall brightness adjustment amplitude parameter for adjusting the skin area according to the global brightness parameter and the skin color brightness parameter; Adjusting the image to be processed according to the global brightness parameter, the skin color brightness parameter, and the overall brightness adjustment amplitude parameter to obtain a target image; The target image is displayed to a user terminal watching the live broadcast; wherein, determining the overall brightness adjustment amplitude parameter of the skin area by adjusting the global brightness parameter and the skin color brightness parameter includes: Based on the association information of preset image attribute parameters and skin color brightness parameters, the target skin color brightness parameters corresponding to the image attribute parameters of the image to be processed are obtained, and the target skin color brightness parameters are used to adjust the brightness value of the skin area; through the logarithmic function mapping algorithm, the overall brightness adjustment amplitude parameter is calculated according to the global brightness parameter, the skin color brightness parameter and the target skin color brightness value.
10. An image processing device, comprising: an acquisition module, configured to acquire a global brightness parameter of the image to be processed in a first color space and a skin color brightness parameter of a skin region of a person in the image to be processed; a determination module, configured to determine an overall brightness adjustment amplitude parameter for adjusting the skin area based on the global brightness parameter and the skin color brightness parameter; A construction module, configured to adjust the image to be processed according to the global brightness parameter, the skin color brightness parameter, and the overall brightness adjustment amplitude parameter to obtain a target image; The determination module is specifically used to obtain the target skin color brightness parameter corresponding to the image attribute parameter of the image to be processed based on the association information of the preset image attribute parameter and the skin color brightness parameter, and the target skin color brightness parameter is the brightness value for adjusting the skin area; through the logarithmic function mapping algorithm, the overall brightness adjustment amplitude parameter is calculated according to the global brightness parameter, the skin color brightness parameter and the target skin color brightness value.
11. A live broadcast-based image processing device, comprising: An acquisition module, configured to acquire a live video stream upon receiving a live broadcast request sent by a user terminal, wherein the live video stream includes at least one frame of image to be processed; The acquisition module is further configured to acquire a global brightness parameter of the image to be processed in the first color space and a skin color brightness parameter of a skin region of a person in the image to be processed; a determination module, configured to determine an overall brightness adjustment amplitude parameter for adjusting the skin area based on the global brightness parameter and the skin color brightness parameter; an adjustment module, configured to adjust the image to be processed according to the global brightness parameter, the skin color brightness parameter, and the overall brightness adjustment amplitude parameter to obtain a target image; A display module, configured to display the target image to a user terminal watching the live broadcast; The determination module is specifically used to obtain the target skin color brightness parameter corresponding to the image attribute parameter of the image to be processed based on the association information of the preset image attribute parameter and the skin color brightness parameter, and the target skin color brightness parameter is the brightness value for adjusting the skin area; through the logarithmic function mapping algorithm, the overall brightness adjustment amplitude parameter is calculated according to the global brightness parameter, the skin color brightness parameter and the target skin color brightness value.
Citation Information
Patent Citations
Adaptive illumination beauty method and system
CN107038680A
Face image exposure brightness compensation method and device
CN110086997A