Tone mapping method, apparatus and related device

By acquiring the color encoding signal and brightness feature parameters of the target frame, and calculating and correcting the tone mapping curve, the problem of smoothing out dark details is solved, thus improving the image information quality and visual effect.

CN115761015BActive Publication Date: 2026-06-19BEIJING QIYI CENTURY SCI & TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING QIYI CENTURY SCI & TECH CO LTD
Filing Date
2022-11-16
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing technologies, there is a problem that dark details are smoothed out during tone mapping, resulting in loss of image information and affecting visual effects.

Method used

By acquiring the color-coded signal and luminance feature parameters of the target frame, a tone mapping curve is calculated, and the mapping curve is corrected based on the detail loss quantization value to reduce the loss of details in dark areas.

Benefits of technology

It improves the quality of image information and visual effects, and enhances the adaptability of the mapped image to the peak brightness of the display terminal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115761015B_ABST
    Figure CN115761015B_ABST
Patent Text Reader

Abstract

This invention relates to a tone mapping method, apparatus, and related equipment, belonging to the field of tone mapping technology. The method, apparatus, and related equipment acquire the color encoding signal, luminance feature parameters, and display terminal feature parameters of each target frame. Considering the luminance feature parameters of the target frame and the display feature parameters of the display terminal, a tone mapping curve is calculated. Based on the color encoding signals before and after tone mapping, the detail loss quantization value of the current target frame is calculated. Therefore, the tone mapping curve of the target frame is corrected according to the detail loss quantization value and the luminance feature parameters. Using the technical solution provided by this invention, the corrected tone mapping curve can reduce the detail loss before and after mapping under different luminance feature parameters, thereby solving the technical problem in the prior art where dark details are smoothed to a certain extent, improving image information quality and visual effects, and enhancing the adaptability of the final mapped image to the luminance peak of the display terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of tone mapping technology, and specifically to a tone mapping method, apparatus, and related equipment. Background Technology

[0002] Technological advancements have driven the development of information display materials technology. Taking terminal products as an example, LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode) technologies are now widely used. Currently, the peak brightness of mainstream LCD and OLED devices typically reaches 500 nits, which is significantly different from some industry standards. For instance, the HDR (High-Dynamic Range) standard, developed from the SDR (Standard Dynamic Range) standard, specifies a maximum brightness of 10,000 nits. HDR content generally has a maximum brightness exceeding 1,000 nits, significantly higher than the peak brightness of mainstream LCD and OLED devices.

[0003] To perfectly reproduce HDR effects on display devices and solve the matching problem between high and low dynamic range, tone mapping technology has been developed. Tone mapping is a computer graphics technique that approximates the display of high dynamic range images on media with limited dynamic range. It includes static tone mapping and dynamic tone mapping. Static tone mapping refers to a fixed shape of the mapping curve for a given video sequence, while dynamic tone mapping dynamically generates the mapping curve based on the video scene and the display performance of the terminal. Therefore, generally speaking, the effect of dynamic tone mapping is significantly better than that of static tone mapping.

[0004] Currently, the mainstream international dynamic tone mapping standards include ST2094-20, ST2094-40, and T / UWA 005.1-2022. However, the mapping curves corresponding to these standards still have problems in large-scale applications. For example, in situations where there are significant overall differences in brightness and shadow detail, these tone mapping curves can smooth out shadow detail to some extent, leading to a loss of image information and resulting in poor visual effects. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a tone mapping method, apparatus and related equipment to overcome the problem that current dynamic tone mapping technology has the risk of smoothing out details in dark areas, resulting in loss of image information.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] On one hand, a tone mapping method is applied to a display terminal, the method comprising:

[0008] The color encoding signal and brightness feature parameters of the target frame are obtained; and the display feature parameters of the display terminal are obtained.

[0009] Calculate the tone mapping curve of the current target frame based on the brightness feature parameters and the display feature parameters;

[0010] The color encoding signal of the target frame is mapped according to the tone mapping curve to obtain the mapped color encoding signal;

[0011] Based on the color-coded signals before and after mapping, calculate the detail loss quantization value of the current target frame;

[0012] The tone mapping curve is corrected based on the quantized value of the loss of detail and the brightness feature parameters;

[0013] The current target frame is tone-mapped according to the modified preset tone mapping curve.

[0014] In another aspect, a tone mapping device is applied to a display terminal, the device comprising:

[0015] The acquisition module is used to acquire the color encoding signal and brightness feature parameters of the target frame; and to acquire the display feature parameters of the display terminal.

[0016] The first calculation module is used to calculate the tone mapping curve of the current target frame based on the brightness feature parameters and the display feature parameters;

[0017] The first mapping module is used to map the color encoding signal of the target frame according to the tone mapping curve to obtain the mapped color encoding signal;

[0018] The second calculation module is used to calculate the detail loss quantization value of the current target frame based on the color encoding signals before and after mapping;

[0019] The correction module is used to correct the tone mapping curve based on the detail loss quantization value and the brightness feature parameter;

[0020] The second mapping module is used to perform tone mapping on the current target frame according to the modified preset tone mapping curve.

[0021] On the other hand, an electronic device includes:

[0022] At least one processor; and

[0023] A memory communicatively connected to the at least one processor; wherein,

[0024] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform any of the tone mapping methods described above.

[0025] In another aspect, a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform any of the tone mapping methods described above.

[0026] In another aspect, a computer program product includes a computer program that, when executed by a processor, implements the tone mapping method according to any of the preceding claims.

[0027] The technical solution provided by this invention has at least the following beneficial effects:

[0028] After acquiring the color encoding signal, luminance feature parameters, and display terminal feature parameters of each target frame, a tone mapping curve is calculated considering the luminance feature parameters of the target frame and the display feature parameters of the display terminal. Based on the color encoding signals before and after the tone mapping curve, the detail loss quantization value of the current target frame is calculated, and the tone mapping curve of the target frame is corrected according to the detail loss quantization value and the luminance feature parameters. Using the technical solution provided by this invention, because the difference between the color encoding signals of the target frame before and after mapping is considered when calculating the detail loss quantization value, and the tone mapping curve is corrected synchronously according to the luminance feature parameters and the detail loss quantization value, the corrected tone mapping curve can reduce the detail loss before and after mapping under different luminance feature parameters. This solves the technical problem in the prior art where dark details are smoothed to a certain extent, improves the image information quality and visual effect, and enhances the adaptability of the final mapped image to the luminance peak of the display terminal. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 This is a flowchart illustrating a tone mapping method according to an embodiment of the present invention;

[0031] Figure 2 This is a schematic diagram of a standard S-shaped mapping curve provided in an embodiment of the present invention;

[0032] Figure 3 A schematic diagram of a tone mapping curve provided in an embodiment of the present invention;

[0033] Figure 4 This is a schematic diagram of the structure of a tone mapping device according to an embodiment of the present invention;

[0034] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail below. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0036] Currently, the peak brightness of mainstream LCD and OLED devices generally reaches 500 nits, which is significantly different from some industry standards. For example, the SDR (Standard Dynamic Range) standard specifies a maximum brightness of 100 nits, which is significantly lower than the peak brightness of mainstream LCD and OLED devices; while the HDR (High-Dynamic Range) standard specifies a maximum brightness of 10,000 nits, and the maximum brightness of HDR content is generally above 1,000 nits, which is significantly higher than the peak brightness of mainstream LCD and OLED devices.

[0037] To improve the display effect of terminal devices and solve the matching problem between high dynamic range (HDR) and low dynamic range (LVR), tone mapping technology is typically used to achieve this matching. Tone mapping is a computer graphics technique that approximates the display of high dynamic range (HDR) images on media with a limited dynamic range. It includes static tone mapping and dynamic tone mapping. Static tone mapping refers to a fixed shape of the mapping curve for a given video sequence, while dynamic tone mapping dynamically generates the mapping curve based on the video scene and the terminal's display performance. Therefore, generally speaking, dynamic tone mapping produces significantly better results than static tone mapping.

[0038] However, in related technologies, dynamic tone mapping technology usually performs linear compression on the dark areas of the video, making it difficult to determine the intensity of the dark area compression. This poses a risk of smoothing out dark details, resulting in a loss of image information.

[0039] In this embodiment of the invention, the tone mapping curve is described as follows: Currently, the mainstream international dynamic tone mapping standards include ST2094-20, ST2094-40, and T / UWA 005.1-2022. All three standards include tone mapping curves composed of linear lines and curves.

[0040] However, when there is a large difference between the overall brightness and darkness, and the details in the shadows are relatively rich, these tone mapping curves will smooth out the details in the shadows to some extent, resulting in a loss of image information and a poor visual effect.

[0041] Based on this, embodiments of the present invention provide a tone mapping method, apparatus, and related equipment.

[0042] Figure 1 This is a flowchart illustrating a tone mapping method according to an embodiment of the present invention. The tone mapping method can be applied to various display terminals, including but not limited to: laptops, mobile phones, televisions, tablets, calculators, and smartwatches.

[0043] It is understandable that SDR / HDR video playback technology currently relies on tone mapping curves. The technical solution provided in this embodiment can adaptively correct tone mapping curves to avoid the loss of detail information during the mapping process, thereby ensuring the playback effect of SDR / HDR videos.

[0044] See Figure 1 The technical solution provided by this invention may include the following steps:

[0045] Step S1: Obtain the color encoding signal and brightness characteristic parameters of the target frame; and obtain the display characteristic parameters of the display terminal.

[0046] Step S2: Calculate the tone mapping curve of the current target frame based on the brightness feature parameters and display feature parameters.

[0047] Step S3: Map the color encoding signal of the target frame according to the tone mapping curve to obtain the mapped color encoding signal.

[0048] Step S4: Calculate the detail loss quantization value of the current target frame based on the color-coded signals before and after mapping.

[0049] Step S5: Correct the tone mapping curve based on the detail loss quantization value and brightness feature parameters.

[0050] Step S6: Perform tone mapping on the current target frame according to the corrected preset tone mapping curve.

[0051] In a specific tone mapping process, each frame is sequentially identified as a target frame according to the order of the frames in the video stream, and tone mapping is then performed on each frame to ultimately achieve tone mapping of the video stream. Each target frame consists of multiple pixels. The video stream can be either HDR or SDR video.

[0052] Regarding step S1, in one embodiment of the present invention, the specific processing procedure for "acquiring the color encoding signal of the target frame" in step S1 may include the following steps:

[0053] Step S11: Receive the video stream and decode the video stream to obtain the YUV electrical signal of the target frame;

[0054] Step S12: Based on the color gamut conversion standard, convert the YUV electrical signal to an RGB electrical signal;

[0055] Step S13: Use YUV and RGB electrical signals as color encoding signals.

[0056] The received video stream is determined and decoded, directly yielding the YUV electrical signals of the target frame. YUV is a color encoding method; "Y" represents luminance (or luminance), used to identify brightness; "U" and "V" represent chrominance (or chroma), used to describe image color and saturation, specifying the color of a pixel. After decoding, the target frame's YUV electrical signals are obtained, representing the Y, U, and V information of each pixel in the target frame. These YUV electrical signals are then converted to RGB electrical signals according to a color gamut conversion standard. In this invention, both YUV and RGB electrical signals are used as color encoding signals.

[0057] It is worth noting that the color gamut conversion standard can be the industry standard BT709 or BT2020. Specifically, the YUV electrical signal can be converted into an RGB electrical signal according to formula (1):

[0058] (1)

[0059] In formula (1), a, b, c, d, and e are all coefficients. After determining the Y, U, and V values ​​of each pixel, the Y, U, and V values ​​of each pixel are input into formula (1) to obtain the RGB electrical signal of each pixel. Under different standards, a, b, c, d, and e have different values. For example, under the BT709 standard, a = 0.2126, b = 0.7152, c = 0.0722, d = 1.8556, and e = 1.5748; under the BT2020 standard, a = 0.2627, b = 0.6780, c = 0.0593, d = 1.8814, and e = 1.4746.

[0060] It is understood that the method for determining the pixel information of the target frame provided in the embodiments of the present invention achieves rapid information processing by converting the YUV electrical signal of the target frame into an RGB electrical signal, which is convenient and quick, so as to facilitate the subsequent calculation of the quantization value of detail loss.

[0061] Brightness characteristics may include brightness intensity (StrengthL), average brightness (Midluma), median brightness (MeanLuma), segmentation points for bright and dark areas (RegionD), maximum brightness, and minimum brightness. Display characteristics may include maximum screen brightness (MaxDisplay), minimum screen brightness (MinDisplay), and screen resolution (RES).

[0062] It is worth noting that the brightness features can be obtained through calculation. The specific processing steps for "obtaining brightness feature parameters" in step S1 may include the following steps:

[0063] Step 1: Calculate the luminance intensity of the target frame, specifically including:

[0064] The pixel distribution of the luminance component Y in the YUV electrical signal is statistically analyzed to determine the histogram distribution HistY of the YUV luminance component Y, and the mid-gray value MildGray of the histogram distribution HistY is determined, including:

[0065] Set the mid-gray value of the histogram distribution HistY to a fixed value, for example, MildGray = 118;

[0066] The square root of the product of the maximum and minimum brightness values ​​in the HistY histogram distribution is determined as the mid-gray value of HistY. For example, take... ;

[0067] Where maxY is the maximum brightness value in the histogram distribution HistY (i.e., the maximum value of the coordinate on the horizontal axis), and minY is the minimum brightness value in the histogram distribution HistY (i.e., the minimum value of the coordinate on the horizontal axis).

[0068] In the histogram distribution HistY, the expected value of pixels with a luminance value i greater than the mid-gray value MildGray is denoted as luminance intensity StrengthL, specifically:

[0069] .

[0070] Step 2: Calculate the average brightness of the target frame, specifically including:

[0071] According to the preset electro-optic conversion function, the electrical signal of the target frame is converted into an optical signal;

[0072] Luma[i] = EOTF709(i / 255); i / 255 represents the pixel value of the normalized electrical signal, and Luma[i] represents the pixel value after conversion to an optical signal; the function EOTF709() represents the electro-optical conversion function specified in the REC.709 standard, specifically:

[0073] L represents the input variable, and L = i / 255.

[0074] Iterate through all the brightness values ​​of the light signal and calculate the sum of the products of each brightness value Luma[i] and the number of pixels HistY[i] in the histogram distribution HistY;

[0075] The ratio of the sum of the products to the screen resolution RES of the terminal device is determined as the average brightness Midluma, specifically:

[0076] .

[0077] Step 3: Calculate the median luminance of the target frame, specifically including:

[0078] The MeanLuma of the target frame is the median brightness value of each pixel in the target frame, arranged from smallest to largest. For example, it can be the median brightness value of the histogram HistY (i.e., the horizontal and vertical median values).

[0079] Step 4: Calculate the segmentation points of the bright and dark areas of the target frame, specifically including:

[0080] Calculate the expected value of pixels with brightness values ​​i between zero and medium gray values ​​[0~MildGray] in the histogram distribution HistY, denoted as MeanDark;

[0081] ;

[0082] Calculate the average of the average darkness and the average of the mid-gray values, and determine the average value as the segmentation point RegionD, specifically:

[0083] .

[0084] For step S2, in one embodiment of the present invention, the bright area and the dark area can be specifically distinguished. Based on the display feature parameters and the brightness feature parameters, the S-shaped mapping curve of the brightness area of ​​the current target frame and the linear mapping line of the dark area of ​​the current target frame are determined. The S-shaped mapping curve and the linear mapping line are combined to obtain the tone mapping curve of the current target frame.

[0085] Specifically, a standard S-curve can be selected from preset standards (such as ST2094-20, ST2094-40, T / UWA 005.1-2022). After determining the standard S-curve, the brightness characteristic parameters and display characteristic parameters obtained in this invention are input into the parameter calculation formula specified in the standard to calculate the parameters of the S-curve. Substituting these parameters into the standard S-curve yields the S-curve of the brightness region of the current target frame. Similarly, the linear mapping line of the dark region of the current target frame is calculated. The functional relationship between the linear mapping line of the dark region of the current target frame and the S-curve of the brightness region of the current target frame is combined to obtain a piecewise function, which is the tone mapping curve of the current target frame in this invention.

[0086] For example, with Figure 2 The following is an example of a schematic diagram of a standard S-shaped mapping curve.

[0087] See Figure 2 The horizontal and vertical axes represent normalized pixel values, where "1" represents a pixel value of 255 and "0.1" represents a pixel value of 0.1. 255, "0.2" indicates a pixel value of 0.2. 255, and so on.

[0088] Assume the functional expression of the standard S-shaped mapping curve is as follows: (2). Where L represents the pixel value after normalization of the original RGB electrical signal, L=i / 255, and F(L) represents the pixel value after normalization of the RGB electrical signal after mapping correction; the upper limit of parameter mp is solved according to the following formula (3):

[0089] (3), where MaxDisplay represents the default value of the maximum screen brightness; the specific value of parameter mp is solved according to the following formula (4):

[0090] (4),

[0091] Where strengthL' represents the normalized luminance intensity, and mpMax represents the upper limit of mp; the specific value of parameter mp is updated according to the following formula (5):

[0092] (5),

[0093] MidLuma' represents the normalized average brightness.

[0094] The parameter deltaM is solved according to the following formula (6):

[0095] (6),

[0096] MinDisplay represents the default value for minimum screen brightness, RegionD' represents the segmentation point of the normalized bright and dark areas, and EOTF709() represents the electro-optical conversion function specified in the REC.709 standard.

[0097] Similarly, the function expression for the linear straight line in the dark area can be calculated based on the brightness characteristic parameters and display characteristic parameters.

[0098] For example, calculate the reciprocal of the default value of the maximum screen brightness MaxDisplay, multiply it by a preset fixed constant (e.g., 100); calculate the preset power of the product, e.g., C0, and determine the result as the limit value of the slope of the linear mapping line. The preset power C0 is related to the default value of the minimum screen brightness, specifically:

[0099] (7), where the value of C0 is related to the default value of the minimum screen brightness MinDisplay:

[0100] (8).

[0101] Determine the ordinates of the normalized segment points on the highlight S-curve, specifically as follows:

[0102] Substituting RegionD' into the above formula (3), we obtain the value F(RegionD').

[0103] The ratio of the ordinate to the normalized segment points, F(RegionD') / (RegionD'), is determined as the reference slope.

[0104] By comparing the limiting value of the slope with the reference slope, the minimum value of the two is determined as the slope of the linear mapping line in the dark area. Specifically:

[0105] (9).

[0106] Based on the slope and the normalized segmentation points, the functional expression for the linear mapping line of the dark region in the current frame video image is determined as follows:

[0107] (10).

[0108] Figure 3 This is a schematic diagram of a tone mapping curve provided in an embodiment of the present invention, see reference. Figure 3The horizontal and vertical axes represent normalized pixel values, where "1" represents a pixel value of 255 and "0.1" represents a pixel value of 0.1. 255, "0.2" indicates a pixel value of 0.2. 255, and so on. When the horizontal coordinate is [0, 0.2], it corresponds to the linear mapping line in the dark region; when the horizontal coordinate is (0.2, 1], it corresponds to the S-shaped mapping curve in the bright region. Combining the function expressions of the linear mapping line and the S-shaped mapping curve obtained above, the tone mapping curve TM(L) of the current target frame is obtained:

[0109] (11), where L represents the pixel value after normalization of the original RGB electrical signal, L=i / 255.

[0110] Specifically, in step S3, the YUV and RGB electrical signals of the target frame are mapped according to the calculated tone mapping curve to obtain the mapped YUV and RGB electrical signals.

[0111] In one embodiment of the present invention, step S3 maps the color encoding signal of the target frame according to the tone mapping curve to obtain the mapped color encoding signal. The specific processing procedure may include the following steps:

[0112] Step S31: Based on the calculated tone mapping curve, map the luminance component Y in the YUV electrical signal of the current target frame to the luminance component Y'; and based on the tone mapping curve, map the red component R in the RGB electrical signal of the current target frame to the red component R', map the green component G in the RGB electrical signal of the current target frame to the green component G', and map the blue component B in the RGB electrical signal of the current target frame to the blue component B'.

[0113] Step S32: Use the luminance component Y', red component R', green component G', and blue component B' as the mapped color encoding signal.

[0114] Specifically, in step S4, after mapping the YUV and RGB electrical signals according to the tone mapping curve, the detail loss quantization value of the current target frame is calculated based on the YUV and RGB electrical signals before and after mapping.

[0115] In one embodiment of the present invention, the specific processing procedure of step S4 may include the following steps:

[0116] Step S41: Calculate the information entropy loss quantization value of brightness based on the YUV electrical signals before and after mapping of the target frame;

[0117] Step S42: Calculate the quantization value of chromaticity information entropy loss based on the RGB electrical signals before and after the target frame mapping;

[0118] Step S43: Based on the preset loss coefficients, calculate the detail loss quantization value of the current target frame according to the information entropy loss quantization value of luminance and the information entropy loss quantization value of chrominance.

[0119] In some embodiments, step S41 may specifically include the following steps:

[0120] Step S411: Statistically analyze the pixel distribution of the luminance component Y in the YUV electrical signal and determine the histogram distribution HistY of the YUV luminance component Y; and statistically analyze the pixel distribution of the luminance component Y' in the mapped YUV electrical signal and determine the histogram distribution HistYtm of the mapped luminance component Y'.

[0121] Step S412: Calculate the information entropy of histogram distribution HistY and the information entropy of histogram distribution HistYtm respectively.

[0122] Step S413: Determine the absolute value of the difference between the information entropy of HistY and the information entropy of HistYtm, and use it as the quantization value of the information entropy loss of brightness.

[0123] In some embodiments, step S42 may specifically include the following steps:

[0124] Step S421: Statistically analyze the pixel distribution of the red component R and the mapped red component R' in the RGB electrical signal, and determine the histogram distribution HistR and HistRtm of the red component before and after mapping; Statistically analyze the pixel distribution of the green component G and the mapped red component G' in the RGB electrical signal, and determine the histogram distribution HistG and HistGtm of the green component before and after mapping; Statistically analyze the pixel distribution of the blue component B and the mapped blue component B' in the RGB electrical signal, and determine the histogram distribution HistB and HistBtm of the blue component before and after mapping.

[0125] Step S422: Calculate the information entropy of histogram distributions HistR and HistRtm respectively, and determine the absolute value of the difference between the information entropy of HistR and HistRtm as the information entropy loss quantization value of the red component R; and calculate the information entropy of histogram distributions HistG and HistGtm respectively, and determine the absolute value of the difference between the information entropy of HistG and HistGtm as the information entropy loss quantization value of the green component G; and calculate the information entropy of histogram distributions HistB and HistBtm respectively, and determine the absolute value of the difference between the information entropy of HistB and HistBtm as the information entropy loss quantization value of the blue component B.

[0126] Step S423: The sum of the entropy loss quantization values ​​of the red component R, the green component G, and the blue component B is taken as the entropy loss quantization value of the chromaticity.

[0127] In some embodiments, step S43 may specifically include the following steps:

[0128] The sum of the luminance entropy loss quantization value and the chrominance entropy loss quantization value of the current target frame is calculated. Based on the preset loss coefficients, the sum is revised to obtain the detail loss quantization value of the current target frame.

[0129] The preset loss coefficient can be obtained from multiple experimental data to obtain the optimal value, or it can be set based on experience. In this invention, the preset loss coefficient can be set to 0.1.

[0130] Specifically, the quantization value of detail loss can be expressed by a formula:

[0131] (12)

[0132] (13)

[0133] In formulas (12) and (13), delatInfo is the detail loss quantization value, Res is the total number of pixels in the target frame, En(HistX) represents the information entropy of X, abs() represents the absolute value, Res represents the total number of pixels in the target frame, and N represents the maximum pixel value of the target frame. For HDR video, N=1023; for SDR video, N=255. L represents the normalized pixel value. For SDR video, L=i / 255; for HDR video, L=i / 1023, where i represents the pixel value.

[0134] In some embodiments, the brightness characteristic parameters include the median brightness value and the average brightness value; step S5 may include the following steps:

[0135] If the median brightness of the target frame is less than the average brightness, the slope of the linear mapping line in the dark area of ​​the tone mapping curve is increased based on the detail loss quantization value.

[0136] Based on the increased slope, update the segmentation points of the S-shaped mapping curve in the bright area and the linear mapping line in the dark area of ​​the current target frame, and use the updated tone mapping curve of the current target frame as the corrected tone mapping curve of the current target frame.

[0137] For example, when MeanLuma < MidLuma, the overall brightness of the bright target frame is relatively low. At this time, only the slope of the linear mapping line in the dark area of the preset tone mapping curve is corrected. For example, taking a tone mapping curve provided in the standard ST2094-20 as an example, the slope of the linear mapping line in the dark area is SlopeO. Then, increase the slope of the dark area. The slope SlopeN of the mapping line in the corrected dark area is:

[0138] SlopeN = SlopeO + deltaInfo;

[0139] Correspondingly, after adjusting the slope of the mapping line in the dark area, synchronously update the break point of the S-shaped mapping curve in the bright area and the linear mapping line in the dark area of the current target frame. The break point P can satisfy:

[0140] SlopeN = TM(P) / P;

[0141] At the break point P, the slope is the same as the slope of the mapping line in the corrected dark area.

[0142] It can be understood that in the technical solution provided by the embodiments of the present invention, the dark slope of the preset tone mapping curve is increased through the detail loss quantization value, improving the picture quality. In some scenarios, when the corrected slope is close to 1, almost no compression is performed on the dark area, minimizing the picture loss.

[0143] In some embodiments, the brightness characteristic parameters include the brightness median and the average brightness value; step S5 may include the following steps:

[0144] If the brightness median of the target frame is greater than or equal to the average brightness value, then based on the detail loss quantization value, reduce the curvature of the S-shaped mapping curve in the bright area of the tone mapping curve;

[0145] According to the reduced curvature, update the break point of the S-shaped mapping curve in the bright area and the linear mapping line in the dark area of the current target frame, and use the updated tone mapping curve of the current target frame as the corrected tone mapping curve of the current target frame.

[0146] For example, when MeanLuma ≥ MidLuma, it indicates that the overall brightness of the picture is relatively high. At this time, the S-shaped curve part can be corrected to reduce the curvature of the S-shaped curve. Since a standard S-shaped curve is used when constructing the tone mapping curve, different tone mapping curves generally have different S-shaped curves.

[0147] For example, taking a tone mapping curve provided by the ST2094-40 standard, in the S-curve portion, P0 is modified to reduce the curvature of the S-curve. The standard S-curve form of the tone mapping curve in the ST2094-40 standard is as follows:

[0148] F(L) = P0 L 2 (1-L) 2 +P1 L 3 (1-L)+P2 L 4 ;

[0149] Modifying P0 can reduce curvature. The curvature P0N of the modified preset tone mapping curve can be expressed as:

[0150] .

[0151] Among them, beta is the influence parameter of the S-curve of the tone mapping curve of the ST2094-40 standard, which can be calculated and set according to the standard introduction.

[0152] For example, taking a tone mapping curve from the T / UWA 005.1-2022 standard as an example, the S-curve form of the tone mapping curve in the T / UWA 005.1-2022 standard is as follows:

[0153] F(L) = ((mp) L mn ) / ((k1) mp-k2) L mn +k3)) mm ;

[0154] Correcting mp can reduce curvature; therefore, the curvature mpN of the corrected preset tone mapping curve can be expressed as:

[0155] mpN=mp-alpha deltaInfo.

[0156] Wherein, alpha is the influence parameter of the tone mapping curve in the T / UWA 005.1-2022 standard, which can be calculated and set according to the standard introduction.

[0157] It is understood that in the technical solution provided by the embodiments of the present invention, when the brightness of the target frame is too bright, the bright S-shaped curve part of the preset tone mapping curve is corrected, that is, the curvature of the preset tone mapping curve is reduced by reducing the detail loss quantization value, thereby reducing the data mapping of the bright part in the mapping process and improving the image quality.

[0158] It is understood that the tone mapping method in this embodiment of the invention, after obtaining the color encoding signal, luminance feature parameters, and display terminal feature parameters of each target frame, calculates a tone mapping curve by considering the luminance feature parameters of the target frame and the display feature parameters of the display terminal. Based on the color encoding signals before and after the tone mapping curve, the detail loss quantization value of the current target frame is calculated, and the tone mapping curve of the target frame is corrected according to the detail loss quantization value and the luminance feature parameters. Using the technical solution provided by this invention, since the difference between the color encoding signals of the target frame before and after mapping is considered when calculating the detail loss quantization value, and the tone mapping curve is corrected synchronously according to the luminance feature parameters and the detail loss quantization value, the corrected tone mapping curve can reduce the detail loss before and after mapping under different luminance feature parameters. This solves the technical problem in the prior art where dark details are smoothed to a certain extent, improves the image information quality and visual effect, and enhances the adaptability of the final mapped image to the luminance peak of the display terminal.

[0159] Based on a general inventive concept, an embodiment of the present invention also provides a tone mapping apparatus for implementing the above-described method embodiments.

[0160] Figure 4 This is a schematic diagram of a tone mapping device according to an embodiment of the present invention. (See attached diagram.) Figure 4 The apparatus provided in the embodiments of the present invention may include the following structures:

[0161] The acquisition module 41 is used to acquire the color encoding signal and brightness feature parameters of the target frame; and to acquire the display feature parameters of the display terminal.

[0162] The first calculation module 42 is used to calculate the tone mapping curve of the current target frame based on the brightness feature parameters and the display feature parameters.

[0163] The first mapping module 43 is used to map the color encoding signal of the target frame according to the tone mapping curve to obtain the mapped color encoding signal;

[0164] The second calculation module 44 is used to calculate the detail loss quantization value of the current target frame based on the color-coded signals before and after mapping.

[0165] Correction module 45 is used to correct the tone mapping curve based on the detail loss quantization value and luminance feature parameters;

[0166] The second mapping module 46 is used to perform tone mapping on the current target frame according to the corrected preset tone mapping curve.

[0167] Optionally, the acquisition module is specifically used to determine the video stream and decode the video stream to obtain the YUV electrical signal of the target frame;

[0168] Based on the color gamut conversion standard, YUV electrical signals are converted into RGB electrical signals;

[0169] YUV and RGB electrical signals are used as color encoding signals.

[0170] Optionally, the first mapping module is specifically used to map the luminance component Y in the YUV electrical signal of the current target frame to a luminance component Y' according to the tone mapping curve; and,

[0171] According to the tone mapping curve, the red component R in the RGB electrical signal of the current target frame is mapped to the red component R', the green component G in the RGB electrical signal of the current target frame is mapped to the green component G', and the blue component B in the RGB electrical signal of the current target frame is mapped to the blue component B'.

[0172] The luminance component Y', red component R', green component G', and blue component B' are used as the mapped color-coded signals.

[0173] Optionally, the second calculation module is specifically used to calculate the information entropy loss quantization value of brightness based on the YUV electrical signals before and after the target frame is mapped.

[0174] Calculate the quantization value of chromaticity information entropy loss based on the RGB electrical signals before and after the target frame mapping;

[0175] Based on the preset loss coefficients, the detail loss quantization value of the current target frame is calculated according to the information entropy loss quantization value of luminance and the information entropy loss quantization value of chrominance.

[0176] Optionally, the second calculation module is specifically used to statistically analyze the pixel distribution of the luminance component Y in the YUV electrical signal and determine the histogram distribution HistY of the YUV luminance component Y; and to statistically analyze the pixel distribution of the luminance component Y' in the mapped YUV electrical signal and determine the histogram distribution HistYtm of the mapped luminance component Y'.

[0177] Calculate the information entropy of the histogram distribution HistY and the information entropy of the histogram HistYtm respectively.

[0178] The absolute value of the difference between the information entropy of HistY and the information entropy of HistYtm is determined as the quantization value of the information entropy loss of brightness.

[0179] Optionally, the second calculation module is specifically used to separately calculate the pixel distribution of the red component R and the mapped red component R' in the RGB electrical signal, and determine the histogram distribution HistR and HistRtm of the red component before and after mapping; and separately calculate the pixel distribution of the green component G and the mapped red component G' in the RGB electrical signal, and determine the histogram distribution HistG and HistGtm of the green component before and after mapping; and separately calculate the pixel distribution of the blue component B and the mapped blue component B' in the RGB electrical signal, and determine the histogram distribution HistB and HistBtm of the blue component before and after mapping.

[0180] Calculate the information entropy of histogram distributions HistR and HistRtm respectively, and determine the absolute value of the difference between the information entropy of HistR and HistRtm as the quantized value of the information entropy loss of the red component R; calculate the information entropy of histogram distributions HistG and HistGtm respectively, and determine the absolute value of the difference between the information entropy of HistG and HistGtm as the quantized value of the information entropy loss of the green component G; calculate the information entropy of histogram distributions HistB and HistBtm respectively, and determine the absolute value of the difference between the information entropy of HistB and HistBtm as the quantized value of the information entropy loss of the blue component B.

[0181] The sum of the entropy loss quantization values ​​of the red component R, the green component G, and the blue component B is taken as the entropy loss quantization value of the chromaticity.

[0182] Optionally, the second calculation module is specifically used to calculate the sum of the luminance entropy loss quantization value and the chrominance entropy loss quantization value of the current target frame, and to revise the sum based on preset loss coefficients to obtain the detail loss quantization value of the current target frame.

[0183] Optionally, the first calculation module is specifically used to determine the S-shaped mapping curve of the brightness region of the current target frame and the linear mapping line of the dark region of the current target frame based on the display feature parameters and brightness feature parameters.

[0184] By combining the S-shaped mapping curve and the linear mapping line, the tone mapping curve of the current target frame is obtained.

[0185] Optionally, a correction module is used to increase the slope of the linear mapping line in the dark area of ​​the tone mapping curve based on the detail loss quantization value if the median brightness of the target frame is less than the average brightness value.

[0186] Based on the increased slope, update the segmentation points of the S-shaped mapping curve in the bright area and the linear mapping line in the dark area of ​​the current target frame, and use the updated tone mapping curve of the current target frame as the corrected tone mapping curve of the current target frame.

[0187] Optionally, a correction module is used to reduce the curvature of the S-shaped mapping curve in the bright area of ​​the tone mapping curve based on the detail loss quantization value if the median brightness of the target frame is greater than or equal to the average brightness value.

[0188] Based on the reduced curvature, update the segmentation points of the S-shaped mapping curve in the bright area and the linear mapping line in the dark area of ​​the current target frame, and use the updated tone mapping curve of the current target frame as the corrected tone mapping curve of the current target frame.

[0189] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0190] It is understood that the tone mapping device in this embodiment of the invention, after acquiring the color encoding signal, luminance feature parameters, and display terminal feature parameters of each target frame, calculates a tone mapping curve considering the luminance feature parameters of the target frame and the display feature parameters of the display terminal. Based on the color encoding signals before and after the tone mapping curve, the detail loss quantization value of the current target frame is calculated, and the tone mapping curve of the target frame is corrected according to the detail loss quantization value and the luminance feature parameters. By adopting the technical solution provided by this invention, since the difference between the color encoding signals of the target frame before and after mapping is considered when calculating the detail loss quantization value, and the tone mapping curve is corrected synchronously according to the luminance feature parameters and the detail loss quantization value, the corrected tone mapping curve can reduce the detail loss before and after mapping under different luminance feature parameters. This solves the technical problem in the prior art where dark details are smoothed to a certain extent, improves the image information quality and visual effect, and enhances the adaptability of the final mapped image to the luminance peak of the display terminal.

[0191] Based on a general inventive concept, one embodiment of the present invention also provides an electronic device.

[0192] Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. (See attached diagram.) Figure 5 The electronic device provided by the present invention includes: at least one processor 51; and a memory 52 communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the tone mapping method described in any of the above embodiments.

[0193] Optionally, the electronic device can be a display terminal for displaying the target frame after tone mapping according to the modified preset tone mapping curve.

[0194] Based on a general inventive concept, one embodiment of the present invention also provides a non-transitory computer-readable storage medium storing computer instructions.

[0195] The embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer instructions, which are used to cause a computer to execute the tone mapping method described in any of the above embodiments.

[0196] Based on a general inventive concept, one embodiment of the present invention also provides a computer program product.

[0197] The computer program product provided in the embodiments of the present invention includes a computer program that, when executed by a processor, implements the tone mapping method described in any of the above embodiments.

[0198] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0199] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means at least two.

[0200] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.

[0201] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0202] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0203] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0204] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.

[0205] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0206] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A tone mapping method characterized by, Applied to a display terminal, the method includes: The system acquires the color encoding signal and brightness feature parameters of the target frame; and acquires the display feature parameters of the display terminal; the color encoding signal includes YUV electrical signals and RGB electrical signals; the brightness feature parameters include brightness values; Calculating the tone mapping curve of the current target frame based on the brightness feature parameters and the display feature parameters includes: determining the S-shaped mapping curve of the brightness region of the current target frame and the linear mapping line of the dark region of the current target frame based on the display feature parameters and the brightness feature parameters; and combining the S-shaped mapping curve and the linear mapping line to obtain the tone mapping curve of the current target frame. The color encoding signal of the target frame is mapped according to the tone mapping curve to obtain the mapped color encoding signal; The method for calculating the detail loss quantization value of the current target frame based on the color-coded signals before and after mapping includes: calculating the luminance information entropy loss quantization value based on the YUV electrical signals of the target frame before and after mapping; calculating the chrominance information entropy loss quantization value based on the RGB electrical signals of the target frame before and after mapping; and calculating the detail loss quantization value of the current target frame based on the luminance information entropy loss quantization value and the chrominance information entropy loss quantization value based on a preset loss coefficient. Based on the detail loss quantization value and the brightness feature parameters, the tone mapping curve is corrected, including: if the median brightness of the target frame is greater than or equal to the average brightness value, then the curvature of the S-shaped mapping curve in the bright area of ​​the tone mapping curve is reduced based on the detail loss quantization value; according to the reduced curvature, the segmentation points of the S-shaped mapping curve in the bright area and the linear mapping line in the dark area of ​​the current target frame are updated, and the updated tone mapping curve of the current target frame is used as the corrected tone mapping curve of the current target frame; The current target frame is tone-mapped according to the modified preset tone mapping curve.

2. The method of claim 1, wherein, The acquisition of the color encoding signal of the target frame includes: The video stream is determined and decoded to obtain the YUV electrical signal of the target frame; Based on the color gamut conversion standard, the YUV electrical signal is converted into an RGB electrical signal; The YUV electrical signal and the RGB electrical signal are used as the color encoding signal.

3. The method of claim 2, wherein, The step of mapping the color-coded signal of the target frame according to the tone mapping curve to obtain the mapped color-coded signal includes: Based on the tone mapping curve, the luminance component Y in the YUV electrical signal of the current target frame is mapped to a luminance component Y'; and, According to the tone mapping curve, the red component R in the RGB electrical signal of the current target frame is mapped to the red component R', the green component G in the RGB electrical signal of the current target frame is mapped to the green component G', and the blue component B in the RGB electrical signal of the current target frame is mapped to the blue component B'. The luminance component Y', red component R', green component G', and blue component B' are used as the mapped color-coded signal.

4. The method according to claim 1, characterized in that, The step of calculating the information entropy loss quantization value of brightness based on the YUV electrical signals before and after mapping of the target frame includes: The pixel distribution of the luminance component Y in the YUV electrical signal is statistically analyzed to determine the histogram distribution HistY of the luminance component Y; and the pixel distribution of the luminance component Y' in the mapped YUV electrical signal is statistically analyzed to determine the histogram distribution HistYtm of the luminance component Y' after mapping. Calculate the information entropy of the histogram distribution HistY and the information entropy of the histogram distribution HistYtm respectively; The absolute value of the difference between the information entropy of HistY and the information entropy of HistYtm is determined as the quantized value of the information entropy loss of brightness.

5. The method of claim 1, wherein, The step of calculating the chromaticity information entropy loss quantization value based on the RGB electrical signals before and after the target frame mapping includes: The pixel distributions of the red component R and the mapped red component R' in the RGB electrical signal are statistically analyzed to determine the histogram distributions HistR and HistRtm of the red component before and after mapping; the pixel distributions of the green component G and the mapped red component G' in the RGB electrical signal are statistically analyzed to determine the histogram distributions HistG and HistGtm of the green component before and after mapping; and the pixel distributions of the blue component B and the mapped blue component B' in the RGB electrical signal are statistically analyzed to determine the histogram distributions HistB and HistBtm of the blue component before and after mapping. Calculate the information entropy of histogram distributions HistR and HistRtm respectively, and determine the absolute value of the difference between the information entropy of HistR and HistRtm as the quantized value of the information entropy loss of the red component R; and calculate the information entropy of histogram distributions HistG and HistGtm respectively, and determine the absolute value of the difference between the information entropy of HistG and HistGtm as the quantized value of the information entropy loss of the green component G; and calculate the information entropy of histogram distributions HistB and HistBtm respectively, and determine the absolute value of the difference between the information entropy of HistB and HistBtm as the quantized value of the information entropy loss of the blue component B. The sum of the entropy loss quantization values ​​of the red component R, the green component G, and the blue component B is taken as the entropy loss quantization value of the chromaticity.

6. The method according to claim 1, characterized in that, The step of calculating the detail loss quantization value of the current target frame based on preset loss coefficients, according to the information entropy loss quantization value of luminance and the information entropy loss quantization value of chrominance, includes: The sum of the luminance entropy loss quantization value and the chrominance entropy loss quantization value of the current target frame is calculated, and the sum is revised based on the preset loss coefficient to obtain the detail loss quantization value of the current target frame.

7. The method of claim 1, wherein, The brightness feature parameters include the median brightness value and the average brightness value; the step of correcting the tone mapping curve based on the detail loss quantization value and the brightness feature parameters includes: If the median brightness of the target frame is less than the average brightness value, then the slope of the linear mapping line in the dark region of the tone mapping curve is increased based on the detail loss quantization value. Based on the increased slope, update the segmentation points of the S-shaped mapping curve in the bright area and the linear mapping line in the dark area of ​​the current target frame, and use the updated tone mapping curve of the current target frame as the corrected tone mapping curve of the current target frame.

8. A tone mapping apparatus characterized by comprising: The device, applied to a display terminal, includes: The acquisition module is used to acquire the color encoding signal and brightness feature parameters of the target frame; and to acquire the display feature parameters of the display terminal. The first calculation module is used to calculate the tone mapping curve of the current target frame based on the brightness feature parameters and the display feature parameters; the color encoding signal includes YUV electrical signals and RGB electrical signals; the brightness feature parameters include brightness values; The first mapping module is used to map the color encoding signal of the target frame according to the tone mapping curve to obtain the mapped color encoding signal; specifically, it is used to determine the S-shaped mapping curve of the brightness region of the current target frame and the linear mapping line of the dark region of the current target frame according to the display feature parameters and brightness feature parameters; and combine the S-shaped mapping curve and the linear mapping line to obtain the tone mapping curve of the current target frame. The second calculation module is used to calculate the detail loss quantization value of the current target frame based on the color encoding signals before and after mapping; specifically, it is used to calculate the luminance information entropy loss quantization value based on the YUV electrical signals of the target frame before and after mapping; calculate the chrominance information entropy loss quantization value based on the RGB electrical signals of the target frame before and after mapping; and calculate the detail loss quantization value of the current target frame based on the luminance information entropy loss quantization value and the chrominance information entropy loss quantization value based on a preset loss coefficient. The correction module is used to correct the tone mapping curve based on the detail loss quantization value and the brightness feature parameters; specifically, if the median brightness of the target frame is greater than or equal to the average brightness value, it reduces the curvature of the S-shaped mapping curve in the bright area of ​​the tone mapping curve based on the detail loss quantization value; according to the reduced curvature, it updates the segmentation points of the S-shaped mapping curve in the bright area and the linear mapping line in the dark area of ​​the current target frame, and uses the updated tone mapping curve of the current target frame as the corrected tone mapping curve of the current target frame; The second mapping module is used to perform tone mapping on the current target frame according to the modified preset tone mapping curve.

9. An electronic device, comprising: include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the tone mapping method according to any one of claims 1-7.

10. The electronic device of claim 9, wherein, The electronic device is a display terminal.

11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the tone mapping method according to any one of claims 1-7.

12. A computer program product, characterized in that, The computer program comprises a computer program which, when executed by a processor, implements the tone mapping method according to any one of claims 1-7.