Video down-conversion method based on scene global light measurement and face light measurement
By constructing global tone and skin tone adjustment fitting curves and combining scene and facial brightness analysis, the problem of inaccurate facial skin tone restoration in video down-conversion was solved, achieving efficient and accurate video signal conversion.
Patent Information
- Application Number
- CN202511383875.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-09-26
AI Technical Summary
Existing technologies struggle to accurately reproduce human skin tones when converting high dynamic range video signals to low dynamic range signals, resulting in skin tone deviations and a lack of natural texture.
A video down-transformation method based on scene-based global metering and face metering is adopted. A global tone mapping fitting curve and a skin tone adjustment fitting curve are constructed. By statistically analyzing the brightness ratio and average value of video frames, the brightness mapping is dynamically adjusted, and a color lookup table is constructed to perform down-transformation of video frames.
It significantly improved the accuracy of skin tone restoration, enhanced processing efficiency and result consistency, and ensured that the overall down-transformation effect met the expected goals.
Smart Images

Figure CN120881253B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of video processing technology, and more specifically, to a video down-transformation method based on scene global metering and facial metering. Background Technology
[0002] Video downconversion is a video conversion technology that converts high-resolution or high-dynamic-range video signals into low-resolution or low-dynamic-range signals to meet the needs of different display devices or broadcast standards. This technology has applications in various scenarios, such as in 4K ultra-high-definition and high-definition simultaneous broadcast systems, where downconverters convert 4K ultra-high-definition signals into high-definition signals for broadcast. This not only simplifies the system structure and improves security but also reduces personnel and equipment costs. The downconversion process requires resolution and frame rate conversion, such as downconverting from 3840×2160 to 1920×1080, and downconverting the frame rate from 50 fields progressive scan to 50 fields interlaced scan. Furthermore, it requires HDR to SDR conversion, including mapping of levels, gamma, and color gamut.
[0003] One of the biggest challenges in downconverting ultra-high-definition video is compressing the wide brightness range of HDR (up to 1000 nits or more) to the limited range of SDR (around 100 nits). Simple cropping or linear compression is ineffective, requiring more complex tone mapping algorithms to dynamically adjust the brightness mapping curve based on the scene content, intelligently compress the dynamic range, and strive to preserve details in highlights and shadows while maintaining reasonable contrast and color perception. However, this is usually a manual or semi-automatic adjustment process, which is very time-consuming, and the judgment criteria vary from person to person. In addition, when downconverting ultra-high-definition videos containing many people, although details and colors in areas such as backgrounds and clothing are usually well preserved, skin tones on faces are often difficult to reproduce accurately, easily resulting in skin tone deviations, abnormal saturation, or a lack of natural texture. Summary of the Invention
[0004] The present invention aims to solve at least one of the aforementioned technical problems existing in the prior art.
[0005] Therefore, this invention provides a video down-transformation method based on scene global metering and facial metering.
[0006] This invention provides a video down-transformation method based on scene global metering and face metering, comprising:
[0007] A global tone mapping fitting curve is constructed, which is configured with n global mapping adjustment parameters to obtain n global tone mapping fitting curves. Each global tone mapping fitting curve is used to perform global tone mapping on the input image to a different degree.
[0008] Construct a skin tone adjustment fitting curve, which is configured with m skin tone adjustment parameters to obtain m skin tone adjustment fitting curves. Each skin tone adjustment fitting curve is used to adjust the skin tone of the input image to a different degree.
[0009] The process involves acquiring input video frames, counting the total number of pixels in the input video frames whose brightness is less than a first set threshold, calculating the first proportion of these pixels to the total number of pixels, and determining the optimal global tone mapping fitting curve that best suits the current scene based on the first proportion. The range of the first proportion value has a unique correspondence with the global mapping adjustment parameter.
[0010] Based on the determined optimal global tone mapping fitting curve, the effective range of the source skin color before global tone mapping is obtained according to the effective range of the target skin color.
[0011] The system identifies the face region in the input video frame, counts the total number of pixels in the face region whose brightness is less than a second set threshold, calculates the second proportion value of the proportion value to the total number of pixels in the face region, and calculates the average brightness value of the entire face region. Based on the second proportion value and the average brightness value of the entire face region, the system determines the optimal skin color fitting curve to fit the current scene. The system determines the value of the skin color adjustment parameter based on the numerical relationship between the average brightness value of the entire face region and the effective range of the source skin color.
[0012] The video frames are down-transformed based on the determined optimal global tone mapping fitting curve and optimal skin tone fitting curve.
[0013] The video down-transformation method based on scene global metering and face metering according to the above-described technical solution of the present invention may also have the following additional technical features:
[0014] In the above technical solution, the global tone mapping fitting curve is represented as:
[0015]
[0016] in, This represents the global tone mapping fitting curve; This represents the brightness value of a pixel in the input video frame; This represents the global mapping adjustment parameter, which has n possible values; M represents the smoothing control parameter. This represents the threshold value for the first segment.
[0017] In the above technical solution, the calculation method of the smoothing control parameter is as follows:
[0018] .
[0019] In the above technical solution, the global mapping adjustment parameter has 7 possible values, i.e., n=7;
[0020] The set of values for the global mapping adjustment parameter is represented as [0.97, 0.94, 0.91, 0.86, 0.7, 0.4, 0].
[0021] In the above technical solution, determining the optimal global tone mapping fitting curve suitable for the current scene based on the first ratio value includes:
[0022] Based on the first ratio value, the global mapping adjustment parameters are determined, and then the corresponding optimal global tone mapping fitting curve is selected.
[0023] Specifically, when LightRate > 0.97, the global mapping adjustment parameter is set to 0.97;
[0024] When LightRate∈(0.94,0.97], the global mapping adjustment parameter takes the value of 0.94;
[0025] When LightRate∈(0.91,0.94], the global mapping adjustment parameter takes the value of 0.91;
[0026] When LightRate∈(0.86,0.91], the global mapping adjustment parameter takes the value of 0.86;
[0027] When LightRate∈(0.7,0.86], the global mapping adjustment parameter takes the value of 0.7;
[0028] When LightRate∈(0.4,0.7], the global mapping adjustment parameter takes the value of 0.4;
[0029] When LightRate∈(0,0.4], the global mapping adjustment parameter takes the value of 0;
[0030] LightRate represents the first ratio value.
[0031] In the above technical solution, the skin tone adjustment fitting curve is represented as:
[0032]
[0033] in, This represents the skin tone adjustment fitting curve. This represents the brightness value of a pixel in the input video frame. This indicates the threshold for determining dark areas. Indicates the highlight detection threshold. Indicates the threshold value for the second segment; This indicates the skin tone adjustment parameters; represents the first auxiliary adjustment parameter, ; represents the second auxiliary adjustment parameter, ; represents the third auxiliary adjustment parameter, .
[0034] In the above technical solution, determining the shadow determination threshold, the highlight determination threshold, and the second segmentation threshold based on the upper and lower limits of the effective source skin color range includes:
[0035]
[0036]
[0037]
[0038] where the effective source skin color range is [L, H].
[0039] In the above technical solution, the skin color adjustment parameter has 5 values, i.e., m = 5;
[0040] The value set of the skin color adjustment parameter is represented as [-0.04, -0.02, 0, 0.02, 0.04].
[0041] In the above technical solution, determining the optimal skin color fitting curve adapted to the current scene according to the second ratio value and the brightness average value of the entire face area includes:
[0042] Calculating the skin color adjustment determination value according to the upper and lower limits of the effective source skin color range includes:
[0043]
[0044]
[0045] where, represents the lower limit skin color adjustment determination value; represents the upper limit skin color adjustment determination value;
[0046] Determining the skin color adjustment parameter according to the second ratio value, the brightness average value of the entire face area, and the skin color adjustment determination value, and then selecting the corresponding optimal skin color fitting curve includes:
[0047] When the second ratio value is less than the reference value, the value of the skin color adjustment parameter is 0;
[0048] When the second ratio value is not less than the reference value, MaskedAvg < L and MaskedAvg < SkinL2Th, the value of the skin color adjustment parameter is 0.04;
[0049] When the second ratio value is not less than the reference value, MaskedAvg < L and MaskedAvg ≥ SkinL2Th, the value of the skin color adjustment parameter is 0.02;
[0050] When the second ratio value is not less than the reference value, MaskedAvg ≥ L and MaskedAvg > SkinH2Th, the value of the skin color adjustment parameter is -0.04;
[0051] When the second ratio value is not less than the reference value, MaskedAvg ≥ L and MaskedAvg ≤ SkinH2Th, the value of the skin color adjustment parameter is -0.02;
[0052] Among them, MaskedAvg represents the average brightness of the entire face area.
[0053] In the above technical solution, the down-conversion of the video frame based on the determined optimal global tone mapping fitting curve and the optimal skin color fitting curve includes:
[0054] Number the global tone mapping fitting curves corresponding to each global mapping adjustment parameter;
[0055] Number the skin color fitting curves corresponding to each skin color adjustment parameter;
[0056] Construct a color lookup table, and the color lookup table is configured with m*n LUT files, and each LUT file corresponds to a combined transformation curve formed by a random combination of a global tone mapping fitting curve and a skin color fitting curve;
[0057] When determining the optimal global tone mapping fitting curve and the optimal skin color fitting curve, output the number corresponding to the optimal global tone mapping fitting curve and the number corresponding to the optimal skin color fitting curve;
[0058] Based on the number corresponding to the optimal global tone mapping fitting curve and the number corresponding to the optimal skin color fitting curve, directly select the corresponding combined transformation curve in the color lookup table to perform down-conversion on the video frame.
[0059] In summary, due to the adoption of the above technical features, the beneficial effects of the present invention are:
[0060] This invention integrates global scene brightness analysis and facial region brightness analysis to collaboratively determine the optimal tone mapping strategy. While ensuring the overall down-conversion effect meets expectations, this method significantly improves skin tone restoration accuracy and offers greater scene adaptability compared to traditional single global metering schemes. Furthermore, this invention employs a lookup table (LUT) mechanism that pre-computes and stores 35 tone mapping results. This architecture significantly improves processing efficiency by replacing dynamic calculation with real-time lookups; simultaneously, the pre-computed LUT ensures high consistency and result stability in the color mapping process, effectively avoiding output inconsistencies caused by precision errors in intermediate variables (such as accumulated floating-point operation errors) in real-time formula calculations.
[0061] Additional aspects and advantages of the invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description
[0062] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0063] Figure 1 This is a flowchart of a video down-transformation method based on scene global metering and face metering according to an embodiment of the present invention;
[0064] Figure 2 This is a schematic diagram illustrating the correspondence between the effective range of the source skin color and the effective range of the target skin color in a video down-transformation method based on scene global metering and face metering according to an embodiment of the present invention.
[0065] Figure 3 This is a schematic diagram of the combined transformation curve in a video down-transformation method based on scene global metering and face metering according to an embodiment of the present invention. Detailed Implementation
[0066] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0067] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0068] The following reference Figures 1 to 3 This describes a video down-transformation method based on scene global metering and face metering, provided according to some embodiments of the present invention.
[0069] Some embodiments of this application provide a video down-transformation method based on scene global metering and facial metering.
[0070] like Figure 1 As shown, the first embodiment of the present invention proposes a video down-transformation method based on scene global metering and face metering, including the following steps S1 to S6.
[0071] S1. Construct a global tone mapping fitting curve. The global tone mapping fitting curve is configured with n global mapping adjustment parameters to obtain n global tone mapping fitting curves. Each global tone mapping fitting curve is used to perform global tone mapping on the input image to a different degree.
[0072] In some embodiments, the global tone mapping fitting curve is represented as:
[0073]
[0074] in, This represents the global tone mapping fitting curve; This represents the brightness value of a pixel in the input video frame; This represents the global mapping adjustment parameter, which has n possible values; M represents the smoothing control parameter. This represents the threshold value for the first segment.
[0075] In other words, brightness values below threshold T are linearly mapped, while brightness values above threshold T are non-linearly mapped. The shape of the mapping curve is adjusted by a smoothing control parameter to achieve a smoother transition in high-brightness regions. The calculation method for the smoothing control parameter is as follows:
[0076] .
[0077] The threshold for the first segment can be set as needed. In this disclosure, the threshold for the first segment is 0.7 as an example.
[0078] Based on the above configuration, different global mapping adjustment parameters correspond to different global tone mapping fitting curves. The number and specific values of the global mapping adjustment parameters can be configured based on statistical analysis of video brightness distribution and transformation accuracy requirements.
[0079] In one specific embodiment, the global mapping adjustment parameter has 7 possible values, i.e., n=7; the set of values for the global mapping adjustment parameter is represented as [0.97, 0.94, 0.91, 0.86, 0.7, 0.4, 0]. Therefore, in this embodiment, a total of 7 global tone mapping fitting curves are obtained, which can be selected according to the overall brightness distribution of the video frames.
[0080] S2. Construct skin tone adjustment fitting curves. The skin tone adjustment fitting curves are configured with m skin tone adjustment parameters to obtain m skin tone adjustment fitting curves. Each skin tone adjustment fitting curve is used to adjust the skin tone of the input image to a different degree.
[0081] In some embodiments, the skin tone adjustment fitting curve is represented as:
[0082]
[0083] in, This represents the skin tone adjustment fitting curve. This represents the brightness value of a pixel in the input video frame. This indicates the threshold for determining dark areas. Indicates the highlight detection threshold. Indicates the threshold value for the second segment; This indicates the skin tone adjustment parameters; This represents the first auxiliary adjustment parameter. ; This indicates the second auxiliary adjustment parameter. ; This represents the third auxiliary adjustment parameter. .
[0084] Similarly, skin tone adjustment is segmented based on the range of brightness values of pixels in the input video frame. Specifically, to preserve details in both highlights and shadows, no additional mapping is performed when the brightness value of a pixel in the input video frame is higher than the highlight threshold or lower than the shadow threshold; the original brightness value is retained.
[0085] The specific segment values (dark area judgment threshold, second segment threshold, highlight judgment threshold) should be configured according to the effective range of the source skin tone. Here, it's necessary to introduce the concepts of the effective range of the source skin tone and the effective range of the target skin tone. The effective range of the target skin tone refers to the range of skin brightness values specified in the final transformation result (skin brightness values are usually represented by level values; for example, in a specific embodiment, the effective range of the target skin tone is [0.5, 0.8]). Before skin tone adjustment, the original input video frame undergoes global mapping adjustment. Therefore, based on the effective range of the target skin tone, the effective range of the source skin tone can be obtained by fitting a curve using global tone mapping. That is, when the brightness value of the facial area in the original input video frame is within the effective range of the source skin tone, global tone mapping will bring the brightness value of the facial area into the effective range of the target skin tone. When the brightness value of the facial area in the original input video frame is outside the effective range of the source skin tone, further skin tone adjustment is needed to bring it to or near the effective range of the target skin tone.
[0086] In some embodiments, determining the dark area determination threshold, the highlight determination threshold, and the second segmentation threshold based on the upper and lower limits of the effective range of the source skin color includes:
[0087]
[0088]
[0089]
[0090] The effective range for the source skin color is [L, H].
[0091] Based on the above configuration, different skin tone adjustment parameters correspond to different skin tone adjustment fitting curves. The number and specific values of the skin tone adjustment parameters can be configured based on statistical analysis of the brightness distribution of the facial region in the video and the required transformation accuracy.
[0092] In one specific embodiment, the skin tone adjustment parameter has 5 possible values, i.e., m=5; the set of values for the skin tone adjustment parameter is represented as [-0.04, -0.02, 0, 0.02, 0.04]. Therefore, in this embodiment, a total of 5 skin tone adjustment fitting curves are obtained, which can be selected based on the brightness distribution of the facial region in the video frame.
[0093] S3. Acquire input video frames, count the total number of pixels in the input video frames whose brightness is less than a first set threshold, and calculate the first proportion value of the proportion value to the total number of pixels. Based on the first proportion value, determine the optimal global tone mapping fitting curve that is suitable for the current scene. The value range of the first proportion value has a unique correspondence with the global mapping adjustment parameter.
[0094] In one specific embodiment, the first set threshold is set to 300 nits.
[0095] In some implementations, step S3, which involves determining the optimal global tone mapping fitting curve for the current scene based on the first ratio value, includes:
[0096] Based on the first ratio value, the global mapping adjustment parameters are determined, and then the corresponding optimal global tone mapping fitting curve is selected.
[0097] When LightRate>0.97, the global mapping adjustment parameter is 0.97. Substituting this value into the global tone mapping fitting curve expression of the above embodiment, the selected global tone mapping fitting curve can be determined. Of course, in a preferred embodiment of this disclosure, global mapping adjustment is not performed directly at this time, but rather it is determined which global tone mapping fitting curve to select, and the same applies below.
[0098] Specifically, when LightRate > 0.97, the global mapping adjustment parameter is set to 0.97;
[0099] When LightRate∈(0.94,0.97], the global mapping adjustment parameter takes the value of 0.94;
[0100] When LightRate∈(0.91,0.94], the global mapping adjustment parameter takes the value of 0.91;
[0101] When LightRate∈(0.86,0.91], the global mapping adjustment parameter takes the value of 0.86;
[0102] When LightRate∈(0.7,0.86], the global mapping adjustment parameter takes the value of 0.7;
[0103] When LightRate∈(0.4,0.7], the global mapping adjustment parameter takes the value of 0.4;
[0104] When LightRate∈(0,0.4], the global mapping adjustment parameter takes the value of 0;
[0105] LightRate represents the first ratio value.
[0106] S4. Based on the determined optimal global tone mapping fitting curve, obtain the effective range of the source skin color before global tone mapping, according to the effective range of the target skin color.
[0107] As described above, the effective range of the target skin tone is obtained by inversely mapping the effective range of the target skin tone using the optimal global tone mapping fitting curve. It can be understood that this step does not necessarily require dynamic calculation; the effective range of the target skin tone can be pre-defined, thus each selectable global tone mapping fitting curve has a unique corresponding effective range of the source skin tone. After determining the optimal global tone mapping fitting curve, the effective range of the source skin tone can be directly determined.
[0108] S5. Identify the face region in the input video frame, count the total number of pixels in the face region whose brightness is less than a second set threshold, calculate the second proportion value of the proportion value to the total number of pixels in the face region, and calculate the average brightness value of the entire face region; determine the optimal skin color fitting curve to fit the current scene based on the second proportion value and the average brightness value of the entire face region; wherein, the value of the skin color adjustment parameter is determined based on the numerical relationship between the average brightness value of the entire face region and the effective range of the source skin color.
[0109] In one specific embodiment, the second set threshold is also set to 300 nits.
[0110] It can be understood that any existing face recognition and positioning method can be used for the recognition method of the face area in the input video frame to detect and locate the face area in the picture.
[0111] In addition, in the present disclosure, when statistically analyzing the brightness values of each pixel, statistical analysis can be performed based on the brightness histogram.
[0112] In some embodiments, in step S5, determining the optimal skin color fitting curve adapted to the current scene according to the second ratio value and the brightness average value of the entire face area includes:
[0113] Calculating the skin color adjustment determination value according to the upper and lower limits of the source skin color effective interval includes:
[0114]
[0115]
[0116] Among them, represents the lower limit skin color adjustment determination value; represents the upper limit skin color adjustment determination value;
[0117] Determining the skin color adjustment parameter according to the second ratio value, the brightness average value of the entire face area, and the skin color adjustment determination value, and then selecting the corresponding optimal skin color fitting curve includes:
[0118] When the second ratio value is less than the reference value, the value of the skin color adjustment parameter is 0; specifically, the reference value can be set to 1%, that is, when the total number of pixels with brightness less than the second set threshold in the face area accounts for less than 1% of the total number of pixels in the face area, no additional skin color adjustment is required, and the original brightness value can be retained.
[0119] When the second ratio value is not less than the reference value, MaskedAvg < L and MaskedAvg < SkinL2Th, the value of the skin color adjustment parameter is 0.04; substituting this value into the skin color fitting curve expression in the above embodiment, the selected optimal skin color fitting curve can be determined; of course, in a preferred embodiment of the present disclosure, at this time, skin color adjustment will not be directly performed, but only to determine which skin color fitting curve needs to be selected, the same below;
[0120] When the second ratio value is not less than the reference value, MaskedAvg < L and MaskedAvg ≥ SkinL2Th, the value of the skin color adjustment parameter is 0.02;
[0121] When the second ratio value is not less than the reference value, MaskedAvg ≥ L and MaskedAvg > SkinH2Th, the value of the skin color adjustment parameter is -0.04;
[0122] When the second ratio value is not less than the reference value, MaskedAvg≥L and MaskedAvg≤SkinH2Th, the skin color adjustment parameter is -0.02.
[0123] MaskedAvg represents the average brightness of the entire face area.
[0124] S6. Perform down-transformation on the video frames based on the determined optimal global tone mapping fitting curve and optimal skin tone fitting curve.
[0125] In some embodiments, step S6 includes:
[0126] Number the global tone mapping fitting curve corresponding to each global mapping adjustment parameter; to facilitate searching, the global mapping adjustment parameters can be sorted from largest to smallest and assigned numbers in sequence.
[0127] Number the skin tone fitting curve corresponding to each skin tone adjustment parameter; to facilitate searching, the skin tone adjustment parameters can be sorted from smallest to largest and assigned numbers in sequence.
[0128] A color lookup table is constructed, which is configured with m*n types of LUT files. Each LUT file corresponds to a combined transformation curve formed by randomly combining a global tone mapping fitting curve and a skin tone fitting curve; the combined transformation curve for the facial region... It can be represented as:
[0129]
[0130] When determining the optimal global tone mapping fitting curve in step S4 and the optimal skin color fitting curve in step S5, output the number corresponding to the optimal global tone mapping fitting curve and the number corresponding to the optimal skin color fitting curve.
[0131] Based on the numbers corresponding to the optimal global tone mapping fitting curve and the optimal skin tone fitting curve, the corresponding combined transformation curve is directly selected from the color lookup table to perform down-transformation on the video frame.
[0132] In a specific embodiment, the process of transforming an input video frame is as follows:
[0133] The percentage of pixels with an overall input video frame resolution below 300 nits was 0.9936, corresponding to the global tone mapping fitting curve with index 1, and the global mapping adjustment parameter was set to 0.97. For example... Figure 2 As shown, the effective range of the target skin color [0.5, 0.8] corresponds to the effective range of the source skin color [0.5134, 0.7178]. Figure 2 The diagram illustrates the effective range of the target skin tone and the effective range of the source skin tone, based on the fitted curves of global tone mapping. Figure 2 The relationship between the orange dashed line and the target skin tone brightness value is shown on the vertical axis, and the original skin tone brightness value of the input video frame is shown on the horizontal axis.
[0134] The average brightness of the facial region in the input video frame is calculated to be 0.4134, which is lower than the minimum value of the effective range of the source skin color. Therefore, the facial region needs to be appropriately brightened. The calculated corresponding skin color adjustment parameter number is 5. At this point, the skin color adjustment parameter value in the skin color fitting curve is 0.04, and its image is as follows. Figure 3 As shown by the solid purple line in the middle.
[0135] After considering skin tone adjustment, the final combined transformation curve is as follows: Figure 3 The black curve is the result of the superposition of the purple solid line and the orange dashed line. It can be understood that... Figure 2 As shown, Figure 3 The vertical axis represents the target skin tone brightness value, and the horizontal axis represents the original skin tone brightness value of the input video frame.
[0136] In this specification, the illustrative expressions of the terms used do not necessarily refer to the same embodiments or examples. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0137] Any modifications, equivalent substitutions, or improvements made within the spirit and principles of this invention shall be included within the scope of protection of this invention.
Claims
1. A video down-transformation method based on scene global metering and face metering, characterized in that, include: A global tone mapping fitting curve is constructed, which is configured with n global mapping adjustment parameters to obtain n global tone mapping fitting curves. Each global tone mapping fitting curve is used to perform global tone mapping on the input image to a different degree. Construct a skin tone adjustment fitting curve, which is configured with m skin tone adjustment parameters to obtain m skin tone adjustment fitting curves. Each skin tone adjustment fitting curve is used to adjust the skin tone of the input image to a different degree. The process involves acquiring input video frames, counting the total number of pixels in the input video frames whose brightness is less than a first set threshold, calculating the first proportion of these pixels to the total number of pixels, and determining the optimal global tone mapping fitting curve that best suits the current scene based on the first proportion. The range of the first proportion value has a unique correspondence with the global mapping adjustment parameter. Based on the determined optimal global tone mapping fitting curve, the effective range of the source skin color before global tone mapping is obtained according to the effective range of the target skin color. The system identifies the face region in the input video frame, counts the total number of pixels in the face region whose brightness is less than a second set threshold, calculates the second proportion value of the proportion value to the total number of pixels in the face region, and calculates the average brightness value of the entire face region. Based on the second proportion value and the average brightness value of the entire face region, the system determines the optimal skin color fitting curve to fit the current scene. The system determines the value of the skin color adjustment parameter based on the numerical relationship between the average brightness value of the entire face region and the effective range of the source skin color. The video frames are down-transformed based on the determined optimal global tone mapping fitting curve and optimal skin tone fitting curve.
2. The video down-transformation method based on scene global metering and face metering according to claim 1, characterized in that, The global tone mapping fitting curve is represented as follows: in, This represents the global tone mapping fitting curve; This represents the brightness value of a pixel in the input video frame; This represents the global mapping adjustment parameter, which has n possible values; M represents the smoothing control parameter. This represents the threshold value for the first segment.
3. The video down-transformation method based on scene global metering and face metering according to claim 2, characterized in that, The calculation method for the smoothing control parameters is as follows: 。 4. The video down-transformation method based on scene global metering and face metering according to claim 3, characterized in that, The global mapping adjustment parameter has 7 possible values, i.e., n=7; The set of values for the global mapping adjustment parameter is represented as [0.97, 0.94, 0.91, 0.86, 0.7, 0.4, 0].
5. The video down-transformation method based on scene global metering and face metering according to claim 4, characterized in that, The step of determining the optimal global tone mapping fitting curve for the current scene based on the first ratio value includes: Based on the first ratio value, the global mapping adjustment parameters are determined, and then the corresponding optimal global tone mapping fitting curve is selected. Specifically, when LightRate > 0.97, the global mapping adjustment parameter is set to 0.97; When LightRate∈(0.94,0.97], the global mapping adjustment parameter takes the value of 0.94; When LightRate∈(0.91,0.94], the global mapping adjustment parameter takes the value of 0.91; When LightRate∈(0.86,0.91], the global mapping adjustment parameter takes the value of 0.86; When LightRate∈(0.7,0.86], the global mapping adjustment parameter takes the value of 0.7; When LightRate∈(0.4,0.7], the global mapping adjustment parameter takes the value of 0.4; When LightRate∈(0,0.4], the global mapping adjustment parameter takes the value of 0; LightRate represents the first ratio value.
6. The video down-transformation method based on scene global metering and face metering according to claim 1, characterized in that, The skin color adjustment fitting curve is expressed as: in, This represents the skin tone adjustment fitting curve. This represents the brightness value of a pixel in the input video frame. This indicates the threshold for determining dark areas. Indicates the highlight detection threshold. Indicates the threshold value for the second segment; This indicates the skin tone adjustment parameters; This represents the first auxiliary adjustment parameter. ; This indicates the second auxiliary adjustment parameter. ; This represents the third auxiliary adjustment parameter. .
7. The video down-transformation method based on scene global metering and face metering according to claim 6, characterized in that, Determining the shadow determination threshold, the highlight determination threshold, and the second segmentation threshold based on the upper and lower limits of the source skin color effective range, including: Among them, the source skin color effective range is [L, H].
8. The video down-transformation method based on scene global metering and face metering according to claim 6, characterized in that, The skin color adjustment parameter has 5 values, that is, m = 5; The value set of the skin color adjustment parameter is expressed as [-0.04, -0.02, 0, 0.02, 0.04].
9. The video down-transformation method based on scene global metering and face metering according to claim 8, characterized in that, Determining the optimal skin color fitting curve adapted to the current scene according to the second ratio value and the brightness average value of the entire face area, including: Calculating the skin color adjustment determination value according to the upper and lower limits of the source skin color effective range, including: in, This indicates the lower limit of the skin tone adjustment judgment value; This indicates the upper limit of the skin tone adjustment judgment value; Determining the skin color adjustment parameter according to the second ratio value, the brightness average value of the entire face area, and the skin color adjustment determination value, and then selecting the corresponding optimal skin color fitting curve, including: When the second ratio value is less than the reference value, the value of the skin color adjustment parameter is 0; When the second ratio value is not less than the reference value, MaskedAvg < L and MaskedAvg < SkinL2Th, the value of the skin color adjustment parameter is 0.04; When the second ratio value is not less than the reference value, MaskedAvg < L and MaskedAvg ≥ SkinL2Th, the value of the skin color adjustment parameter is 0.02; When the second ratio value is not less than the reference value, MaskedAvg ≥ L and MaskedAvg > SkinH2Th, the value of the skin color adjustment parameter is -0.04; When the second ratio value is not less than the reference value, MaskedAvg ≥ L and MaskedAvg ≤ SkinH2Th, the value of the skin color adjustment parameter is -0.02; Among them, MaskedAvg represents the brightness average value of the entire face area.
10. The video down-transformation method based on scene global metering and face metering according to claim 1, characterized in that, Performing down-conversion on the video frame based on the determined optimal global tone mapping fitting curve and the optimal skin color fitting curve, including: Numbering the global tone mapping fitting curves corresponding to each global mapping adjustment parameter; Numbering the skin color fitting curves corresponding to each skin color adjustment parameter; Constructing a color lookup table, the color lookup table is configured with m * n LUT files, and each LUT file corresponds to a combined transformation curve formed by a random combination of a global tone mapping fitting curve and a skin color fitting curve; When determining the optimal global tone mapping fitting curve and the optimal skin color fitting curve, outputting the number corresponding to the optimal global tone mapping fitting curve and the number corresponding to the optimal skin color fitting curve; Based on the number corresponding to the optimal global tone mapping fitting curve and the number corresponding to the optimal skin color fitting curve, directly selecting the corresponding combined transformation curve in the color lookup table to perform down-conversion on the video frame.
Citation Information
Patent Citations
Method for down-converting HDR video to SDR video based on dynamic metering
CN109327734A
Image processing method and device, electronic equipment, storage medium and product
CN118015103A