Method and apparatus for dynamic range mapping

文档序号:196207 发布日期:2021-11-02 浏览:50次 中文

阅读说明:本技术 动态范围映射的方法和装置 (Method and apparatus for dynamic range mapping ) 是由 徐巍炜 余全合 陈虎 王弋川 于 2020-04-30 设计创作,主要内容包括:本申请提供了动态范围映射的方法和装置,有助于在图像的最大显示亮度与显示设备的最大显示亮度接近时,避免出现映射之后的终端设备的像素的亮度比原始的图像还要亮的异常现象。该动态范围映射的方法,包括:获取终端设备的显示参数;获取图像数据的特征信息;获取所述图像数据的第一色调映射曲线的第一参数;在预设条件成立时,根据所述第一参数、所述终端设备的显示参数和所述图像数据的特征信息,得到第二色调映射曲线的第二参数,其中,所述第二色调映射曲线上第一点处的输出亮度不高于所述第二色调映射曲线上的所述第一点的输入亮度;根据所述第二色调映射曲线的第二参数对所述图像数据进行动态范围映射。(The application provides a dynamic range mapping method and device, which are beneficial to avoiding the abnormal phenomenon that the brightness of a pixel of a terminal device after mapping is brighter than that of an original image when the maximum display brightness of an image is close to that of a display device. The dynamic range mapping method comprises the following steps: acquiring display parameters of terminal equipment; acquiring characteristic information of image data; acquiring a first parameter of a first tone mapping curve of the image data; when a preset condition is met, obtaining a second parameter of a second tone mapping curve according to the first parameter, the display parameter of the terminal equipment and the characteristic information of the image data, wherein the output brightness of a first point on the second tone mapping curve is not higher than the input brightness of the first point on the second tone mapping curve; and carrying out dynamic range mapping on the image data according to a second parameter of the second tone mapping curve.)

1. A method of dynamic range mapping, comprising:

acquiring display parameters of terminal equipment;

acquiring characteristic information of image data;

acquiring a first parameter of a first tone mapping curve of the image data;

when a preset condition is met, obtaining a second parameter of a second tone mapping curve according to the first parameter, the display parameter of the terminal equipment and the characteristic information of the image data, wherein the output brightness of a first point on the second tone mapping curve is not higher than the input brightness of the first point on the second tone mapping curve;

and carrying out dynamic range mapping on the image data according to a second parameter of the second tone mapping curve.

2. The method according to claim 1, wherein the preset condition is satisfied when any one of the following conditions is met:

when performing tone mapping on image data according to the first parameter, the output brightness at a second point on the first tone mapping curve is higher than the input brightness at the second point on the first tone mapping curve; or

A parameter p of the first parametersP1Greater than a first value Tp, wherein said first value Tp is according to a in said first parameterP1And a is predeterminedP1And pP1Obtaining the corresponding relation of; or

Parameter a of the first parametersP1Greater than a second value Ta, wherein the second value Ta is according to p in the first parameterP1And a is predeterminedP1And pP1Obtaining the corresponding relation of; or

Parameter a of the first parametersP1And parameter pP1The product of (1) is greater than a third value Tap, wherein the third value Tap is a preset rational number.

3. The method according to claim 1 or 2, wherein the second parameter comprises a first one-dimensional spline curve parameter comprising a slope MB [0] [0] of a first one-dimensional spline in the second tone mapping curve or a maximum value TH3[0] of a luminance value of an interval pixel point of the first one-dimensional spline.

4. The method according to any one of claims 1 to 3, wherein the first parameter includes a second linear spline parameter, the second linear spline parameter includes a slope MB _ mid [0] [0] of a second linear spline in the first tone mapping curve and a maximum value TH3_ mid [0] of luminance values of section pixel points of the second linear spline, the display parameter includes a maximum display luminance MaxDisplay of the terminal device, and the feature information includes a maximum luminance correction value max _ lum of the image data;

wherein the obtaining a second parameter of a second tone mapping curve according to the first parameter, the display parameter, and the feature information includes:

and adjusting the curve parameters MB _ mid [0] [0] and TH3_ mid [0] according to the maximum display brightness MaxDisplay and the maximum brightness correction value max _ lum to obtain the curve parameters MB [0] [0] and TH3[0 ].

5. The method according to claim 4, characterized in that said curvilinear parameters MB _ mid [0] [0] and TH3_ mid [0], and said curvilinear parameters MB [0] [0] and TH3[0], satisfy the following formulae:

wherein the content of the first and second substances,

or

Wherein, L is input signal, G (L) is inverse function of function H (L) corresponding to tone mapping curve, M _ a, M _ b, M _ M, M _ N, k1, k2, k3 are curve parameters, G (L, M _ a _ T) represents that G (L) value N1, N2 corresponding to input variable L is rational number when M _ a value of parameter of G (L) is M _ a _ T, max (a, b) represents that larger value of a and b is solved, min (a, b) represents that smaller value of a and b is solved, H (L) is inverse function of function H (L) corresponding to tone mapping curve, M (L, M _ a _ b) represents that G (L) value of parameter of input variable L is M _ a _ T, and M _ b) value is rational number, max (a, b) represents that larger value of input variable L is solved, min (a, H (L) represents that smaller value of input variable L) corresponding to input variable L is smaller value of input variable L, and H (L) is smaller value of the inverse function of input variable L, and L, where L, where L is smaller value of M _ b, and L, where L is smaller value of M _ b is smaller value, and L, where L is equal to which is equal to where L, and L, where L, and L, where L is equal to L, where L, and L is equal to the value of M is equal to L, and L, where L, and L, where L, and L, where L, and L, and L

Alternatively, the first and second electrodes may be,

6. the method according to any one of claims 1 to 5, wherein the second parameter comprises a cubic spline parameter, and the cubic spline parameter comprises interpolation values TH1[1], TH2[1], TH3[1] of a cubic spline on the second tone mapping curve, wherein TH1[1] represents a minimum value of luminance values of pixels in a first interval of the cubic spline, TH2[1] represents a maximum value of luminance values of pixels in the first interval of the cubic spline and a minimum value of luminance values of pixels in a second interval of the cubic spline, and TH3[1] represents a maximum value of luminance values of pixels in a second interval of the cubic spline.

7. The method according to claim 6, characterized in that the interpolation values TH1[1], TH2[1], TH3[1] of the cubic splines are derived from preset offset values of the second one of the first parameters TH3[0], the interpolation values TH1[1], TH2[1], TH3[1], as follows:

TH1[1]=TH3[0];

TH2[1]=TH1[1]+B;

TH3[1]=TH2[1]+C*TH2[1]-D*TH1[1];

b, C and D are preset values of interpolation values TH1[1], TH2[1] and TH3[1] of the cubic spline for calculating correlation values, B is a preset deviation value corresponding to the brightness value of the pixel point in the dark area transition area, and C and D are preset weighting coefficients corresponding to the brightness value of the pixel point in the bright area.

8. The method according to claim 6, characterized in that the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline are calculated from the calculated correlation values of the second one of the first parameters TH3[0], the interpolation values TH1[1], TH2[1], TH3[1], as follows:

TH1[1]=3Spline_TH[i][0][w];

TH2[1]=3Spline_TH[i][0][w]+3Spline_TH_Delta1[i][1][w];

TH3[1]=3Spline_TH[i][0][w]+3Spline_TH_Delta1[i][1][w]+3Spline_TH_Delta1[i][2][w];

wherein, 3Spline _ TH [ i ] [0] [ w ], 3Spline _ TH _ Delta1[ i ] [1] [ w ], and 3Spline _ TH _ Delta1[ i ] [2] [ w ] are calculation correlation values of the interpolation values TH1[1], TH2[1], TH3[1] extracted from the metadata.

9. The method of claim 8, wherein a Y coordinate of a primary spline in the second tone mapping curve at TH3[0] is the same as a Y coordinate of a cubic spline in the second tone mapping curve at TH1[1], and a first derivative of the primary spline at TH3[0] is the same as a first derivative of the cubic spline at TH1[1 ].

10. The method of claim 8 or 9, wherein the Y coordinate at TH2[1] of a first cubic spline in the second tone mapping curve is the same as the Y coordinate at TH2[1] of a second cubic spline in the second tone mapping curve, and the first derivative at TH2[1] of the first cubic spline is the same as the first derivative at TH2[1] of the second cubic spline.

11. The method of any of claims 8-10, wherein the Y coordinate of the second cubic spline in the second tone mapping curve at TH3[1] is the same as the Y coordinate of the third tone mapping function in the second tone mapping curve at TH3[1], and the first derivative of the second cubic spline at TH3[1] is the same as the first derivative of the third tone mapping function at TH3[1 ].

12. The method of any of claims 1-11, wherein obtaining the first parameter of the first tone mapping curve for the image data comprises:

acquiring metadata of the image data;

and determining a first parameter of the first tone mapping curve according to the metadata and the display parameter.

13. An apparatus for dynamic range mapping, comprising:

the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring display parameters of the terminal equipment;

the acquisition unit is further used for acquiring characteristic information of the image data;

the obtaining unit is further configured to obtain a first parameter of a first tone mapping curve of the image data;

the processing unit is used for obtaining a second parameter of a second tone mapping curve according to the first parameter, the display parameter of the terminal equipment and the characteristic information of the image data when a preset condition is met, wherein the output brightness of a first point on the second tone mapping curve is not higher than the input brightness of the first point on the second tone mapping curve;

and the mapping unit is used for carrying out dynamic range mapping on the image data according to the second parameter of the second tone mapping curve.

14. The apparatus according to claim 13, wherein the preset condition is satisfied when any one of the following conditions is met:

when performing tone mapping on image data according to the first parameter, the output brightness at a second point on the first tone mapping curve is higher than the input brightness at the second point on the first tone mapping curve; or

A parameter p of the first parametersP1Greater than a first value Tp, wherein said first value Tp is according to a in said first parameterP1And a is predeterminedP1And pP1Obtaining the corresponding relation of; or

Parameter a of the first parametersP1Greater than a second value Ta, wherein the second value Ta is according to p in the first parameterP1And a is predeterminedP1And pP1Obtaining the corresponding relation of; or

Parameter a of the first parametersP1And parameter pP1The product of (1) is greater than a third value Tap, wherein the third value Tap is a preset rational number.

15. The apparatus according to claim 13 or 14, wherein the second parameter comprises a first one-dimensional spline curve parameter, the first one-dimensional spline curve parameter comprising a slope MB [0] [0] of a first one-dimensional spline in the second tone mapping curve or a maximum value TH3[0] of a luminance value of an interval pixel point of the first one-dimensional spline.

16. The apparatus according to any one of claims 13 to 15, wherein the first parameter includes a second linear spline parameter, the second linear spline parameter includes a slope MB _ mid [0] [0] of a second linear spline in the first tone mapping curve and a maximum value TH3_ mid [0] of luminance values of section pixel points of the second linear spline, the display parameter includes a maximum display luminance MaxDisplay of the terminal device, and the feature information includes a maximum luminance correction value max _ lum of the image data;

wherein the processing unit is specifically configured to:

and adjusting the curve parameters MB _ mid [0] [0] and TH3_ mid [0] according to the maximum display brightness MaxDisplay and the maximum brightness correction value max _ lum to obtain the curve parameters MB [0] [0] and TH3[0 ].

17. The apparatus of claim 16, wherein said curvilinear parameters MB _ mid [0] [0] and TH3_ mid [0], and said curvilinear parameters MB [0] [0] and TH3[0], satisfy the following equations:

wherein the content of the first and second substances,

or

Wherein, L is input signal, G (L) is inverse function of function H (L) corresponding to tone mapping curve, M _ a, M _ b, M _ M, M _ N, k1, k2, k3 are curve parameters, G (L, M _ a _ T) represents that G (L) value N1, N2 corresponding to input variable L is rational number when M _ a value of parameter of G (L) is M _ a _ T, max (a, b) represents that larger value of a and b is solved, min (a, b) represents that smaller value of a and b is solved, H (L) is inverse function of function H (L) corresponding to tone mapping curve, M (L, M _ a _ b) represents that G (L) value of parameter of input variable L is M _ a _ T, and M _ b) value is rational number, max (a, b) represents that larger value of input variable L is solved, min (a, H (L) represents that smaller value of input variable L) corresponding to input variable L is smaller value of input variable L, and H (L) is smaller value of the inverse function of input variable L, and L, where L, where L is smaller value of M _ b, and L, where L is smaller value of M _ b is smaller value, and L, where L is equal to which is equal to where L, and L, where L, and L, where L is equal to L, where L, and L is equal to the value of M is equal to L, and L, where L, and L, where L, and L, where L, and L, and L

Alternatively, the first and second electrodes may be,

18. the apparatus according to any one of claims 13 to 17, wherein the second parameter comprises a cubic spline parameter, and the cubic spline parameter comprises interpolation values TH1[1], TH2[1], TH3[1] of a cubic spline on the second tone mapping curve, where TH1[1] represents a minimum value of luminance values of pixels in a first interval of the cubic spline, TH2[1] represents a maximum value of luminance values of pixels in the first interval of the cubic spline and a minimum value of luminance values of pixels in a second interval of the cubic spline, and TH3[1] represents a maximum value of luminance values of pixels in a second interval of the cubic spline.

19. The apparatus of claim 18, wherein the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline are derived from preset offset values of the second one of the first parameters TH3[0], TH1[1], TH2[1], TH3[1], as follows:

TH1[1]=TH3[0];

TH2[1]=TH1[1]+B;

TH3[1]=TH2[1]+C*TH2[1]-D*TH1[1];

b, C and D are preset values of interpolation values TH1[1], TH2[1] and TH3[1] of the cubic spline for calculating correlation values, B is a preset deviation value corresponding to the brightness value of the pixel point in the dark area transition area, and C and D are preset weighting coefficients corresponding to the brightness value of the pixel point in the bright area.

20. The apparatus of claim 18, wherein the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline are calculated from the calculated correlation values of the second one of the first parameters TH3[0], TH1[1], TH2[1], TH3[1], as follows:

TH1[1]=3Spline_TH[i][0][w];

TH2[1]=3Spline_TH[i][0][w]+3Spline_TH_Delta1[i][1][w];

TH3[1]=3Spline_TH[i][0][w]+3Spline_TH_Delta1[i][1][w]+3Spline_TH_Delta1[i][2][w];

wherein, 3Spline _ TH [ i ] [0] [ w ], 3Spline _ TH _ Delta1[ i ] [1] [ w ], and 3Spline _ TH _ Delta1[ i ] [2] [ w ] are calculation correlation values of the interpolation values TH1[1], TH2[1], TH3[1] extracted from the metadata.

21. The apparatus of claim 20, wherein a Y coordinate of a first-order spline in the second tone mapping curve at TH3[0] is the same as a Y coordinate of a cubic spline in the second tone mapping curve at TH1[1], and a first derivative of the first-order spline at TH3[0] is the same as a first derivative of the cubic spline at TH1[1 ].

22. The apparatus of claim 20 or 21, wherein the Y coordinate at TH2[1] of a first cubic spline in the second tone mapping curve is the same as the Y coordinate at TH2[1] of a second cubic spline in the second tone mapping curve, and the first derivative at TH2[1] of the first cubic spline is the same as the first derivative at TH2[1] of the second cubic spline.

23. The apparatus of any of claims 20-22, wherein a Y coordinate of a second cubic spline in the second tone mapping curve at TH3[1] is the same as a Y coordinate of a third tone mapping function in the second tone mapping curve at TH3[1], and a first derivative of the second cubic spline at TH3[1] is the same as a first derivative of the third tone mapping function at TH3[1 ].

24. The apparatus according to any one of claims 13 to 23, wherein the obtaining unit is specifically configured to:

acquiring metadata of the image data;

and determining a first parameter of the first tone mapping curve according to the metadata and the display parameter.

Technical Field

The present application relates to the field of display technologies, and more particularly, to a method and apparatus for dynamic range mapping.

Background

Dynamic Range (DR) is used in many fields to represent the ratio of the maximum value to the minimum value of a variable. In digital images, the dynamic range characterizes the ratio between the maximum luminance and the minimum luminance within the displayable range of the image, i.e. the number of levels of gray division between the image from "brightest" to "darkest", in candelas per square meter (cd/m2), which can also be expressed as nits (nits). The larger the dynamic range of an image is, the richer the brightness gradation which can be represented by the image is, and the more vivid the visual effect of the image is. The dynamic range of the natural scene in the real world is 10-3To 106In between, the dynamic range is very large, so called High Dynamic Range (HDR). The dynamic range of a general image is a Standard Dynamic Range (SDR) or a low dynamic range (SDR) with respect to a high dynamic range image.

At present, the display device with a dynamic range less than 0.1 to 400nits is generally called SDR display device; a display device with a dynamic range exceeding 0.01 to 540nits is referred to as HDR display device. Different high dynamic range display devices display different dynamic ranges, such as 0.01 to 540nits HDR display devices, 0.005 to 1000nits HDR display devices, and so on. The method of mapping of dynamic range is mainly applied in the adaptation process of the display device of the front-end HDR signal and the back-end HDR, including a tone-mapping (tone-mapping) process from high to low, and a tone-mapping process from low to high. For example, the front end is the collected 4000nit illumination signal, and the HDR display capability of the rear-end display device is only 500nit, so that mapping the 4000nit illumination signal onto the 500nit display device is a mapping process from high to low. For another example, the front end is the collected 100nit SDR illumination signal, and the HDR display capability of the rear-end display device is 2000nit, so that mapping the 100nit illumination signal onto the 2000nit display device is a mapping process from low to high.

In the prior art, when the maximum brightness of an image is smaller than the maximum display brightness of a display device, a mapping algorithm based on a dynamic range of an "S" type curve may be used to adjust a high dynamic range image to a dynamic range that can be displayed by the display device for display. However, when the maximum brightness of the image is close to the maximum display brightness of the display device, if the above scheme is still used, an abnormal phenomenon that the brightness of the pixels of the display device after mapping is brighter than that of the original image may occur, and user experience may be affected.

Disclosure of Invention

The application provides a dynamic range mapping method and device, which are beneficial to avoiding the abnormal phenomenon that the brightness of a pixel of a terminal device after mapping is brighter than that of an original image when the maximum display brightness of an image is close to the maximum display brightness of a display device.

In a first aspect, a method for dynamic range mapping is provided, including:

acquiring display parameters of terminal equipment;

acquiring characteristic information of image data;

acquiring a first parameter of a first tone mapping curve of the image data;

when a preset condition is met, obtaining a second parameter of a second tone mapping curve according to the first parameter, the display parameter of the terminal equipment and the characteristic information of the image data, wherein the output brightness of a first point on the second tone mapping curve is not higher than the input brightness of the first point on the second tone mapping curve;

and carrying out dynamic range mapping on the image data according to a second parameter of the second tone mapping curve.

Therefore, the embodiment of the present application further adjusts the parameter of the first tone mapping curve, so that the output brightness of a certain point on the tone mapping curve (i.e. the second tone mapping curve) corresponding to the adjusted curve parameter (i.e. the second parameter) is not higher than the input brightness corresponding to the certain point, thereby helping to avoid the abnormal phenomenon that the brightness of the pixel of the terminal device after mapping is brighter than that of the original image when the maximum display brightness of the image is close to the maximum display brightness of the display device.

The embodiment of the application can be applied to terminal equipment, and the terminal equipment is display end equipment. The product form of the display end equipment can be set top boxes, television display equipment, mobile phone display equipment, electronic equipment such as conversion equipment for live broadcast and video application and the like. As an example, the scheme provided by the embodiment of the present application may be implemented in a form of a hardware chip on a set top box, a television display device, or a mobile phone display device, and the scheme provided by the embodiment of the present application is implemented mainly in a form of a software program code on a live network broadcast or video playback device, but the embodiment of the present application is not limited thereto.

Illustratively, the image data may be, for example, an HDR source, an SDR source, or the like, for example, pixel data in an image, such as luminance and color data of each pixel point, or the like.

For example, the characteristic information of the image data may be obtained from metadata M of the image data, and the metadata M may include, for example, a curve parameter M corresponding to the image datacurveThe target system displays the actual peak brightness MTPLThe present invention is not limited to this, and the present invention is not limited to this, but may include (targeted system display actual peak luminance), a maximum value MaxSource of luminance of contents of image data (maximum value of Y component of all pixels or maximum value of RGB component of all pixels), a minimum value MinSource (minimum value of Y component of all pixels or minimum value of RGB component of all pixels), an average value (average value of Y component of all pixels or average value of maximum value of RGB component of all pixels), a variation range of display contents, and the like.

In some embodiments, the feature information of the image data V may also be obtained from the pixel information of the image data V; or a preset value of the feature information value of the image data is used, which is not limited in the embodiment of the present application.

Illustratively, the display parameter M of the terminal deviceTPLThe maximum display brightness MaxDisplay and/or the minimum display brightness minidisplay of the terminal device may be included, or other parameters, which are not limited in this embodiment of the application.

With reference to the first aspect, in certain implementations of the first aspect, the preset condition is satisfied when any one of the following conditions is met:

when performing tone mapping on image data according to the first parameter, the output brightness at a second point on the first tone mapping curve is higher than the input brightness at the second point on the first tone mapping curve; or

A parameter p of the first parametersP1Greater than a first value Tp, wherein said first value Tp is according to a in said first parameterP1And a is predeterminedP1And pP1Wherein Tp represents the threshold value of the curve parameter p. When the first parameter pP1When Tp is exceeded, there is a possibility that the output luminance is higher than the input luminance at a point on the second tone mapping curve; or

Parameter a of the first parametersP1Greater than a second value Ta, wherein the second value Ta is according to p in the first parameterP1And a is predeterminedP1And pP1Wherein Ta represents the threshold value of the curve parameter a when the first parameter aP1When the output luminance exceeds Ta, a phenomenon that the output luminance is higher than the input luminance at a certain point on the second tone mapping curve may occur; or

Parameter a of the first parametersP1And parameter pP1Is greater than a third value Tap, wherein the third value Tap is a preset rational number when the parameter a in the first parameter isP1And parameter pP1When the product of (d) exceeds Tap, a phenomenon that the output luminance is higher than the input luminance at a point on the second tone mapping curve may occur. Illustratively, the third value Tap may be a rational number between 3 and 4, such as 3.2 or 3.4, which is not limited in the embodiments of the present application.

Therefore, the embodiment of the present application can perform the process of generating the second parameter of the second tone mapping curve when the predetermined condition is satisfied, that is, when the tone mapping is performed on the image data according to the first tone mapping curve, which results in that the output luminance of a certain point on the first tone mapping curve is higher than the input luminance of the point on the first tone mapping curve.

With reference to the first aspect, in certain implementations of the first aspect, the second parameter includes a first one-time spline curve parameter, and the first one-time spline curve parameter includes a slope MB [0] [0] of a first one-time spline in the second tone mapping curve or a maximum value TH3[0] of a luminance value of an interval pixel point of the first one-time spline.

In the embodiment of the present application, when the image data is subjected to dynamic range mapping according to the second parameter, the dark area of the image data may be tone-mapped using the straight line portion (i.e., the first one-time spline), so that the gain of luminance may be controlled, and it is more convenient to control the second parameter to gradually change from a straight line to a straight line where y is x, is equivalent to the output luminance of any point on the tone mapping curve to be equal to the input luminance, and thus the embodiment of the present application is not prone to cause a flicker phenomenon with respect to the content of gradual luminance change.

With reference to the first aspect, in certain implementations of the first aspect, the first parameter includes a second linear spline parameter, the second linear spline parameter includes a slope MB _ mid [0] [0] of a second linear spline in the first tone mapping curve and a maximum value TH3_ mid [0] of a luminance value of an interval pixel point of the second linear spline, the display parameter includes a maximum display luminance MaxDisplay of the terminal device, and the feature information includes a maximum luminance correction value max _ lum of the image data;

wherein the obtaining a second parameter of a second tone mapping curve according to the first parameter, the display parameter, and the feature information includes:

and adjusting the curve parameters MB _ mid [0] [0] and TH3_ mid [0] according to the maximum display brightness MaxDisplay and the maximum brightness correction value max _ lum to obtain the curve parameters MB [0] [0] and TH3[0 ].

Therefore, in the embodiment of the present application, the slope MB [0] [0] of the first primary spline of the second tone mapping curve and the maximum value TH3[0] of the luminance value of the interval pixel of the first primary spline may be obtained according to the slope MB _ mid [0] [0] of the second primary spline in the first tone mapping curve and the maximum value TH3_ mid [0] of the luminance value of the interval pixel of the second primary spline, as well as the maximum display luminance MaxDisplay of the terminal device and the maximum luminance correction value max _ lum of the image data.

With reference to the first aspect, in certain implementations of the first aspect, the curve parameters MB _ mid [0] [0] and TH3_ mid [0], and the curve parameters MB [0] [0] and TH3[0], satisfy the following equations:

wherein the content of the first and second substances,

alternatively, the first and second electrodes may be,

wherein

Or

Wherein, L is input signal, G (L) is inverse function of function H (L) corresponding to tone mapping curve, M _ a, M _ b, M _ M, M _ N, k1, k2, k3 are curve parameters, G (L, M _ a _ T) represents that G (L) value N1, N2 corresponding to input variable L is rational number when M _ a value of parameter of G (L) is M _ a _ T, max (a, b) represents that larger value of a and b is solved, min (a, b) represents that smaller value of a and b is solved, H (L) is inverse function of function H (L) corresponding to tone mapping curve, M (L, M _ a _ b) represents that G (L) value of parameter of input variable L is M _ a _ T, and M _ b) value is rational number, max (a, b) represents that larger value of input variable L is solved, min (a, H (L) represents that smaller value of input variable L) corresponding to input variable L is smaller value of input variable L, and H (L) is smaller value of the inverse function of input variable L, and L, where L, where L is smaller value of M _ b, and L, where L is smaller value of M _ b is smaller value, and L, where L is equal to which is equal to where L, and L, where L, and L, where L is equal to L, where L, and L is equal to the value of M is equal to L, and L, where L, and L, where L, and L, where L, and L, and L

Alternatively, the first and second electrodes may be,

with reference to the first aspect, in certain implementations of the first aspect, the second parameter includes a cubic spline parameter, and the cubic spline parameter includes interpolation values TH1[1], TH2[1], and TH3[1] of a cubic spline on the second tone mapping curve, where TH1[1] represents a minimum value of luminance values of pixel points in a first interval of the cubic spline, TH2[1] represents a maximum value of luminance values of pixel points in the first interval of the cubic spline and a minimum value of luminance values of pixel points in a second interval of the cubic spline, and TH3[1] represents a maximum value of luminance values of pixel points in the second interval of the cubic spline.

With reference to the first aspect, in certain implementations of the first aspect, the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline are derived from preset offset values of the calculated correlation values of the second primary spline curve parameter TH3[0] and the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline in the first parameter, as follows:

TH1[1]=TH3[0];

TH2[1]=TH1[1]+B;

TH3[1]=TH2[1]+C*TH2[1]-D*TH1[1];

b, C and D are preset values of interpolation values TH1[1], TH2[1] and TH3[1] of the cubic spline for calculating correlation values, B is a preset deviation value corresponding to the brightness value of the pixel point in the dark area transition area, and C and D are preset weighting coefficients corresponding to the brightness value of the pixel point in the bright area.

Therefore, according to the second primary spline curve parameter in the first parameter and the preset offset values of the calculation correlation values of the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline, the embodiment of the present application can obtain the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline in the second parameter.

With reference to the first aspect, in certain implementations of the first aspect, the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline are derived from a calculated correlation of the second primary spline curve parameter TH3[0] and the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline in the first parameter, as follows:

TH1[1]=3Spline_TH[i][0][w];

TH2[1]=3Spline_TH[i][0][w]+3Spline_TH_Delta1[i][1][w];

TH3[1]=3Spline_TH[i][0][w]+3Spline_TH_Delta1[i][1][w]+3Spline_TH_Delta1[i][2][w];

wherein, 3Spline _ TH [ i ] [0] [ w ], 3Spline _ TH _ Delta1[ i ] [1] [ w ], and 3Spline _ TH _ Delta1[ i ] [2] [ w ] are interpolation values TH1[1], TH2[1], and TH3[1] of cubic splines extracted from metadata, and correlation values are calculated.

Therefore, the embodiment of the present application can obtain the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline in the second parameter according to the second primary spline curve parameter in the first parameter and the calculation correlation value of the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline extracted from the metadata.

With reference to the first aspect, in certain implementations of the first aspect, the Y coordinate of the first-order spline in the second tone mapping curve at TH3[0] is the same as the Y coordinate of the cubic spline in the second tone mapping curve at TH1[1], and the first derivative of the first-order spline at TH3[0] is the same as the first derivative of the cubic spline at TH1[1 ].

In this way, the first-order spline curve in the second tone mapping curve can be made continuous with the third-order spline curve in the second tone mapping curve at TH [1 ].

With reference to the first aspect, in certain implementations of the first aspect, a Y coordinate of a first cubic spline in the second tone mapping curve at TH2[1] is the same as a Y coordinate of a second cubic spline in the second tone mapping curve at TH2[1], and a first derivative of the first cubic spline at TH2[1] is the same as a first derivative of the second cubic spline at TH2[1 ].

In this way, the first cubic spline curve and the second cubic spline curve in the second tone mapping curve can be made continuous at TH 2.

With reference to the first aspect, in certain implementations of the first aspect, a Y coordinate of a second cubic spline in the second tone mapping curve at TH3[1] is the same as a Y coordinate of a third tone mapping function in the second tone mapping curve at TH3[1], and a first derivative of the second cubic spline at TH3[1] is the same as a first derivative of the third tone mapping function at TH3[1 ].

In this way, the second cubic spline in the second tone mapping curve can be made continuous with the curve of the third tone mapping function at TH 3.

With reference to the first aspect, in certain implementations of the first aspect, the obtaining a first parameter of a first tone mapping curve of the image data includes:

acquiring metadata of the image data;

and determining a first parameter of the first tone mapping curve according to the metadata and the display parameter.

For example, the display-side device may determine the average value average _ maxrgb of the brightness of the content of the image data V in the metadata M, and/or the maximum value MaxSource of the brightness, and/or the minimum value MinSource of the brightness, and/or the maximum display brightness MaxDisplay of the display-side device, and/or the minimum display brightness minidisplay of the display-side device, and/or the curve parameter Mcurve(p1P2, …), and/or other data, obtaining a first parameter of the first tone mapping curve, which may be denoted as P1, for examplecurve(X, p1, p2, …). Where X is the input luminance value and p1, p2, … are the values of the curve parameters.

With reference to the first aspect, in certain implementations of the first aspect, the second parameter further includes a primary spline curve parameter, and the primary spline curve parameter includes a maximum value TH3C of luminance values of interval pixel points of a first primary spline in the second tone mapping curve, and a slope Dark of the first primary spline.

In the embodiment of the present application, when the image data is subjected to dynamic range mapping according to the second parameter, the dark area of the image data may be tone-mapped using the straight line portion (i.e., the first one-time spline), so that the gain of luminance may be controlled, and it is more convenient to control the second parameter to gradually change from a straight line to a straight line where y is x, is equivalent to the output luminance of any point on the tone mapping curve to be equal to the input luminance, and thus the embodiment of the present application is not prone to cause a flicker phenomenon with respect to the content of gradual luminance change.

With reference to the first aspect, in certain implementations of the first aspect, the method further includes:

obtaining the maximum value TH3C0 of the brightness value of the pixel point in the initial interval of the first one-time spline;

acquiring an initial slope Dark0 of the first primary spline;

determining the maximum value TH3C of the brightness values of the interval pixel points according to the maximum value TH3C0 of the brightness values of the initial interval pixel points;

determining the slope Dark according to the initial slope Dark 0.

With reference to the first aspect, in certain implementation manners of the first aspect, the obtaining a maximum value TH3C0 of the brightness value of the pixel point in the initial interval of the first one-time spline includes:

determining the maximum value TH3C0 of the brightness value of the pixel point in the initial interval according to a first parameter, wherein the first parameter comprises the maximum value TH3[0] of the brightness value of the pixel point in the interval of a second primary spline in the first tone mapping curve; or

Determining the maximum value TH3C0 of the brightness values of the pixels in the initial interval according to a preset value, for example, the preset value is the decomposition of scotopic vision and bright vision, that is, the brightness of the human eye with the corresponding strength of cone cells and rod cells changing, such as 1 nit; or

And determining the maximum value TH3C0 of the brightness value of the pixel point in the initial interval according to the metadata of the image data, wherein the metadata comprises feature data of the number of histogram dark area pixels.

With reference to the first aspect, in certain implementations of the first aspect, the obtaining the initial slope Dark0 of the first primary spline includes:

determining the initial slope Dark0 according to a first parameter, wherein the first parameter comprises a slope MB [0] [0] of a second sub-spline in the first tone mapping curve; or

Determining the initial slope Dark0 according to a ratio of a fourth value to a maximum value TH3C of the luminance values of the range pixel points, wherein the fourth value is an output value of the first tone mapping curve at the maximum value TH3C of the luminance values of the range pixel points; or

And determining the initial slope Dark0 according to a slope value of a preset input value of the first tone mapping curve between 0 and the maximum value TH3C of the brightness values of the interval pixels.

With reference to the first aspect, in certain implementations of the first aspect, a maximum value TH3C0 of the brightness values of the pixels in the initial interval, a maximum value TH3C of the brightness values of the pixels in the interval, an initial slope Dark0, and the slope Dark satisfy the following formula:

TH3C=TH3C0+(MaxSource-TH3C0)*(WA)N2

Dark=Dark0+(1-Dark0)*(WA)N1

or

Wherein TH3C is greater than TH3C0 and less than MaxSource, TH3C0 is less than MaxSource, N1 and N2 are rational numbers greater than 0, h (l) is a tone mapping curve, g (l) is an inverse function of h (l).

With reference to the first aspect, in certain implementations of the first aspect, a maximum value TH3C0 of the brightness values of the pixels in the initial interval, a maximum value TH3C of the brightness values of the pixels in the interval, an initial slope Dark0, and the slope Dark satisfy the following formula:

TH3C=TH3C0+(MaxLum-TH3C0)*(WA)N2

DARK=DARK0+(1-DARK0)*(WA)N1

or

Wherein, MaxLum is the adjustment value of the maximum brightness of the image data, TH3C is greater than TH3C0 and smaller than MaxSource, TH3C0 is smaller than MaxSource, N1 and N2 are rational numbers greater than 0, h (l) is the tone mapping curve function, and g (l) is the inverse function of h (l).

With reference to the first aspect, in some implementations of the first aspect, the second parameter further includes a cubic spline curve parameter, where the cubic spline curve parameter includes a minimum value TH1D of a luminance value of a first interval pixel point of a first cubic spline of the second tone mapping curve;

the method further comprises the following steps:

and determining the minimum value TH1D of the brightness values of the first interval pixel points according to the maximum value TH3C of the brightness values of the interval pixel points of the first primary spline in the second tone mapping curve.

With reference to the first aspect, in some implementations of the first aspect, the second parameter further includes a cubic spline curve parameter, where the cubic spline curve parameter includes a maximum value TH2D of a luminance value of a first interval pixel point of a first cubic spline of the second tone mapping curve;

the method further comprises the following steps:

and determining the maximum value TH2D of the brightness values of the pixels in the first interval according to the minimum value TH1D of the brightness values of the pixels in the first interval.

With reference to the first aspect, in certain implementation manners of the first aspect, the determining a maximum value TH2D of the luminance values of the pixels in the first interval according to a minimum value TH1D of the luminance values of the pixels in the first interval includes:

determining the maximum value TH2D of the brightness values of the pixels in the first interval according to the minimum value TH1D of the brightness values of the pixels in the first interval and the first parameter; or

Determining the maximum value TH2D of the brightness values of the first interval pixels according to the minimum value TH1D of the brightness values of the first interval pixels and a preset rational value; or

And determining the maximum value TH2D of the brightness values of the pixels in the first interval according to the minimum value TH1D of the brightness values of the pixels in the first interval and the metadata of the image data.

With reference to the first aspect, in certain implementations of the first aspect, a minimum value TH1D of the luminance values of the first interval pixel points of the first cubic spline of the second tone mapping curve is the same as a maximum value TH3C of the luminance values of the interval pixel points of the first cubic spline, an output value of the first cubic spline and a first spline in the second tone mapping curve at TH1D are the same, and a first derivative of the first cubic spline and a first spline in the second tone mapping curve at TH1D are the same.

In this way, the first-order spline curve in the second tone mapping curve can be made continuous with the third-order spline curve in the second tone mapping curve at TH 1D.

With reference to the first aspect, in certain implementations of the first aspect, the cubic spline curve parameter further includes a maximum value TH3D of luminance values of pixel points in a second interval of a second cubic spline of the second tone mapping curve;

the method further comprises the following steps:

and determining the maximum value TH3D of the brightness value of the pixel points in the second interval according to the minimum value TH1D of the brightness value of the pixel points in the first interval and the maximum value TH2D of the brightness value of the pixel points in the first interval.

With reference to the first aspect, in certain implementation manners of the first aspect, the determining a maximum value TH3D of the luminance values of the pixels in the second interval according to a minimum value TH1D of the luminance values of the pixels in the first interval and a maximum value TH2D of the luminance values of the pixels in the first interval includes:

determining the third maximum input brightness TH3D according to the minimum value TH1D of the brightness values of the pixels in the first interval, the maximum value TH2D of the brightness values of the pixels in the first interval and the first parameter; or

Determining a third maximum input brightness TH3D according to the minimum value TH1D of the brightness values of the pixels in the first interval, the maximum value TH2D of the brightness values of the pixels in the first interval and a preset rational number; or

And determining the third maximum input brightness TH3D according to the minimum value TH1D of the brightness values of the pixels in the first interval, the maximum value TH2D of the brightness values of the pixels in the first interval and the metadata of the image data.

With reference to the first aspect, in certain implementations of the first aspect, a minimum value of the luminance value of the second interval pixel point of the second cubic spline is the same as a maximum value TH2D of the luminance value of the first interval pixel point of the first cubic spline, output values of the first cubic spline and the second cubic spline at a maximum value TH2D of the luminance values of the interval pixel points are the same, and first derivatives of the first cubic spline and the second cubic spline at a maximum value TH2D of the luminance values of the interval pixel points are the same.

In this way, the first cubic spline curve and the second cubic spline curve in the second tone mapping curve can be made continuous at TH 2D.

With reference to the first aspect, in certain implementations of the first aspect, the second parameter further includes a curve parameter of a tone mapping sub-function of the second tone mapping curve, a minimum value of luminance values of pixel points in a third interval of the tone mapping sub-function is the same as a maximum value TH3D of the luminance values of pixel points in the second interval, an output value of the second cubic spline at the maximum value TH3D of the luminance values of pixel points in the second interval is the same as an output value of the tone mapping sub-function at the maximum value TH3D of the luminance values of pixel points in the second interval, and a first derivative of the second cubic spline at the maximum value TH3D of the luminance values of pixel points in the second interval is the same as the first derivative of the tone mapping sub-function.

In this way, the second cubic spline in the second tone mapping curve can be made continuous with the curve of the tone mapping sub-function at TH 3D.

With reference to the first aspect, in certain implementations of the first aspect, a is included in the first parameterP1、pP1Obtaining a second parameter of a second tone mapping curve according to the first parameter, the display parameter, and the feature information, including:

according to aP1And a is presetP1And pP1Obtaining a first value Tp;

if p isP1If the value is more than Tp, p in the first parameter is addedP1Replacement with Tp;

and taking the replaced first parameter as the second parameter.

Thus, by applying p in the first parameterP1Replacing Tp and using the first parameter after replacement as the second parameter can help to make the output luminance at a first point on the second tone mapping curve not higher than the input luminance at the first point on the second tone mapping curve.

With reference to the first aspect, in certain implementations of the first aspect, a is included in the first parameterP1、pP1Obtaining a second parameter of a second tone mapping curve according to the first parameter, the display parameter, and the feature information, including:

according to pP1And a is presetP1And pP1Obtaining a second value Ta according to the corresponding relation;

if a isP1If greater than Ta, a in the first parameter is determinedP1Replacing with Ta;

and taking the replaced first parameter as the second parameter.

Thus, by applying a in the first parameterP1By replacing with Ta, andthe first parameter as the second parameter can contribute to making the output luminance at a first point on the second tone mapping curve not higher than the input luminance at the first point on the second tone mapping curve.

With reference to the first aspect, in certain implementations of the first aspect, a is included in the first parameterP1、pP1Obtaining a second parameter of a second tone mapping curve according to the first parameter, the display parameter, and the feature information, including:

if a isP1*pP1If the value is larger than the third value Tap, p in the first parameter is addedP1Substitution to Tap/aP1Or a in the first parameterP1Substitution to Tap/pP1

And taking the replaced first parameter as the second parameter.

Thus, by applying p in the first parameterP1Substitution to Tap/aP1Or a in the first parameterP1Substitution to Tap/pP1And using the replaced first parameter as the second parameter can help to make the output luminance at the first point on the second tone mapping curve not higher than the input luminance at the first point on the second tone mapping curve.

In a second aspect, an apparatus for dynamic range mapping is provided, which includes an obtaining unit, a processing unit and a mapping unit.

The device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring display parameters of the terminal equipment;

the acquisition unit is further used for acquiring characteristic information of the image data;

the obtaining unit is further configured to obtain a first parameter of a first tone mapping curve of the image data;

the processing unit is used for obtaining a second parameter of a second tone mapping curve according to the first parameter, the display parameter of the terminal equipment and the characteristic information of the image data when a preset condition is met, wherein the output brightness of a first point on the second tone mapping curve is not higher than the input brightness of the first point on the second tone mapping curve;

and the mapping unit is used for carrying out dynamic range mapping on the image data according to the second parameter of the second tone mapping curve.

With reference to the second aspect, in some implementations of the second aspect, the preset condition is satisfied when any one of the following conditions is met:

when performing tone mapping on image data according to the first parameter, the output brightness at a second point on the first tone mapping curve is higher than the input brightness at the second point on the first tone mapping curve; or

A parameter p of the first parametersP1Greater than a first value Tp, wherein said first value Tp is according to a in said first parameterP1And a is predeterminedP1And pP1Obtaining the corresponding relation of; or

Parameter a of the first parametersP1Greater than a second value Ta, wherein the second value Ta is according to p in the first parameterP1And a is predeterminedP1And pP1Obtaining the corresponding relation of; or

Parameter a of the first parametersP1And parameter pP1The product of (1) is greater than a third value Tap, wherein the third value Tap is a preset rational number.

With reference to the second aspect, in some implementations of the second aspect, the second parameter includes a first one-time spline curve parameter, and the first one-time spline curve parameter includes a slope MB [0] [0] of a first one-time spline in the second tone mapping curve or a maximum value TH3[0] of a luminance value of an interval pixel point of the first one-time spline.

With reference to the second aspect, in some implementations of the second aspect, the first parameter includes a second linear spline parameter, the second linear spline parameter includes a slope MB _ mid [0] [0] of a second linear spline in the first tone mapping curve and a maximum value TH3_ mid [0] of luminance values of interval pixel points of the second linear spline, the display parameter includes a maximum display luminance MaxDisplay of the terminal device, and the feature information includes a maximum luminance correction value max _ lum of the image data;

wherein the processing unit is specifically configured to:

and adjusting the curve parameters MB _ mid [0] [0] and TH3_ mid [0] according to the maximum display brightness MaxDisplay and the maximum brightness correction value max _ lum to obtain the curve parameters MB [0] [0] and TH3[0 ].

With reference to the second aspect, in certain implementations of the second aspect, the curve parameters MB _ mid [0] [0] and TH3_ mid [0], and the curve parameters MB [0] [0] and TH3[0], satisfy the following equations:

wherein the content of the first and second substances,

or

Or

Wherein, L is input signal, G (L) is inverse function of function H (L) corresponding to tone mapping curve, M _ a, M _ b, M _ M, M _ N, k1, k2, k3 are curve parameters, G (L, M _ a _ T) represents that G (L) value N1, N2 corresponding to input variable L is rational number when M _ a value of parameter of G (L) is M _ a _ T, max (a, b) represents that larger value of a and b is solved, min (a, b) represents that smaller value of a and b is solved, H (L) is inverse function of function H (L) corresponding to tone mapping curve, M (L, M _ a _ b) represents that G (L) value of parameter of input variable L is M _ a _ T, and M _ b) value is rational number, max (a, b) represents that larger value of input variable L is solved, min (a, H (L) represents that smaller value of input variable L) corresponding to input variable L is smaller value of input variable L, and H (L) is smaller value of the inverse function of input variable L, and L, where L, where L is smaller value of M _ b, and L, where L is smaller value of M _ b is smaller value, and L, where L is equal to which is equal to where L, and L, where L, and L, where L is equal to L, where L, and L is equal to the value of M is equal to L, and L, where L, and L, where L, and L, where L, and L, and L

Alternatively, the first and second electrodes may be,

with reference to the second aspect, in certain implementations of the second aspect, the second parameter includes a cubic spline parameter, and the cubic spline parameter includes interpolation values TH1[1], TH2[1], TH3[1] of a cubic spline on the second tone mapping curve, where TH1[1] represents a minimum value of luminance values of pixel points in a first interval of the cubic spline, TH2[1] represents a maximum value of luminance values of pixel points in the first interval of the cubic spline and a minimum value of luminance values of pixel points in a second interval of the cubic spline, and TH3[1] represents a maximum value of luminance values of pixel points in the second interval of the cubic spline.

With reference to the second aspect, in certain implementations of the second aspect, the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline are derived from preset offset values of second primary spline curve parameters TH3[0], TH1[1], TH2[1], TH3[1] of the first parameters, as follows:

TH1[1]=TH3[0];

TH2[1]=TH1[1]+B;

TH3[1]=TH2[1]+C*TH2[1]-D*TH1[1];

b, C and D are preset values of interpolation values TH1[1], TH2[1] and TH3[1] of the cubic spline for calculating correlation values, B is a preset deviation value corresponding to the brightness value of the pixel point in the dark area transition area, and C and D are preset weighting coefficients corresponding to the brightness value of the pixel point in the bright area.

With reference to the second aspect, in certain implementations of the second aspect, the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline are calculated from the calculated correlation values of the second one-time spline curve parameter TH3[0], the interpolation values TH1[1], TH2[1], TH3[1] of the first parameters, as follows:

TH1[1]=3Spline_TH[i][0][w];

TH2[1]=3Spline_TH[i][0][w]+3Spline_TH_Delta1[i][1][w];

TH3[1]=3Spline_TH[i][0][w]+3Spline_TH_Delta1[i][1][w]+3Spline_TH_Delta1[i][2][w];

wherein, 3Spline _ TH [ i ] [0] [ w ], 3Spline _ TH _ Delta1[ i ] [1] [ w ], and 3Spline _ TH _ Delta1[ i ] [2] [ w ] are calculation correlation values of the interpolation values TH1[1], TH2[1], TH3[1] extracted from the metadata.

With reference to the second aspect, in certain implementations of the second aspect, the Y coordinate of the primary spline in the second tone mapping curve at TH3[0] is the same as the Y coordinate of the cubic spline in the second tone mapping curve at TH1[1], and the first derivative of the primary spline at TH3[0] is the same as the first derivative of the cubic spline at TH1[1 ].

With reference to the second aspect, in certain implementations of the second aspect, the Y coordinate of a first cubic spline in the second tone mapping curve at TH2[1] is the same as the Y coordinate of a second cubic spline in the second tone mapping curve at TH2[1], and the first derivative of the first cubic spline at TH2[1] is the same as the first derivative of the second cubic spline at TH2[1 ].

With reference to the second aspect, in certain implementations of the second aspect, the Y coordinate of the second cubic spline in the second tone mapping curve at TH3[1] is the same as the Y coordinate of the third tone mapping function in the second tone mapping curve at TH3[1], and the first derivative of the second cubic spline at TH3[1] is the same as the first derivative of the third tone mapping function at TH3[1 ].

With reference to the second aspect, in some implementations of the second aspect, the obtaining unit is specifically configured to:

acquiring metadata of the image data;

and determining a first parameter of the first tone mapping curve according to the metadata and the display parameter.

In a third aspect, there is provided a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the method of the first aspect described above.

In a fourth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.

In a fifth aspect, an electronic device is provided, which includes the apparatus for processing media data according to the second aspect.

It should be understood that the beneficial effects achieved by the second to fifth aspects and the corresponding implementation manners of the present application are referred to the beneficial effects achieved by the first aspect and the corresponding implementation manners of the present application, and are not repeated herein.

Drawings

Fig. 1 is an image of the PQ photoelectric transfer function.

Fig. 2 is an image of the HLG photoelectric transfer function.

Fig. 3 is an image of the SLF photoelectric transfer function.

Fig. 4 is a schematic diagram of a dynamic range adjustment curve of a high dynamic range image according to an embodiment of the present application.

Fig. 5 shows a schematic diagram of a sigmoid curve.

Fig. 6 shows a schematic diagram of a bezier curve.

Fig. 7 is an example of a mapping curve in which the maximum luminance of an image is the same as the maximum display luminance of the display device.

Fig. 8 shows a schematic diagram of a system architecture provided by an embodiment of the present application.

Fig. 9 shows a schematic flow chart of a method of dynamic range mapping provided by an embodiment of the present application.

Fig. 10 shows a schematic block diagram of an apparatus for dynamic range mapping provided in an embodiment of the present application.

Fig. 11 is a schematic block diagram illustrating another apparatus for dynamic range mapping provided in an embodiment of the present application.

Detailed Description

The technical solution in the present application will be described below with reference to the accompanying drawings.

First, related concepts and technologies related to the embodiments of the present application will be briefly described.

1. Dynamic range is used in many fields to represent the ratio of the maximum value to the minimum value of a variable. In a digital image, the dynamic range represents the ratio between the maximum luminance value and the minimum luminance value in the range in which the image can be displayed. The dynamic range of nature is very large. For example, the luminance of a night scene in the sky is about 0.001cd/m2The sun itself has a brightness of 1000,000,000cd/m2. Wherein, cd/m2(candela per square meter) is an international unit derived unit for measuring brightness. Thus, the dynamic range of the nature reaches 1000,000,000/0.001-1013Of the order of magnitude.

However, in a real scene in nature, the brightness of the sun and the brightness of the starlight are not obtained simultaneously. For a natural scene in the real world, the dynamic range is 10-3To 106Within the range. Since this is a very large dynamic range, we generally refer to it as a High Dynamic Range (HDR). With respect to the high dynamic range, the dynamic range on a general picture is called a Low Dynamic Range (LDR) or a Standard Dynamic Range (SDR). It will thus be appreciated that the imaging process of a digital camera is effectively a mapping of the high dynamic range of the real world to the low dynamic range of the photograph. FIG. 1 shows one example of low dynamic mapping from real world high dynamic range to a display device.

The larger the dynamic range of the image is, the more scene details are shown in the image, the richer the gradation of the brightness is, and the more vivid the visual effect is. Conventional digital images generally use one byte, i.e., 8 bits of space, to store one pixel value, and high dynamic range uses a floating point number, i.e., a plurality of bytes, to store one pixel value, and thus, can represent the high dynamic range of a natural scene.

The process of optical digital imaging (for example, the imaging process of a digital camera) is to convert the light radiation of a real scene into an electrical signal through an image sensor, and store the electrical signal in the form of a digital image. And the purpose of the image display is to reproduce a real scene depicted by a digital image via a display device. The ultimate goal of both is to get the user the same visual perception as if he were directly observing the real scene.

Whereas the intensity level in a real scene that can be exhibited by optical radiation (light signal) is almost linear, so the light signal is also referred to as linear signal. However, in the process of converting optical signals into electrical signals in optical digital imaging, each optical signal does not correspond to one electrical signal, and the converted electrical signals are nonlinear. Therefore, the electrical signal is also referred to as a nonlinear signal.

2. The Optical Electro Transfer Function (OETF) represents the linear to nonlinear signal conversion relationship of an image pixel.

Before the advent of video cameras that can capture HDR images, conventional cameras could only record captured optical information within a certain range by controlling exposure values. Since the maximum luminance information of the display device cannot reach the real world luminance information and we can browse the image through the display device, a photoelectric transfer function is required. Early display devices were Cathode Ray Tube (CRT) displays whose photoelectric transfer function was the Gamma function. This photoelectric transfer function based on the "Gamma" function is defined in the international telecommunications union-radio communication sector (ITU-R) telecommunication bt.1886 standard, as shown in equation (1) below.

The image after quantization to 8 bits by the above conversion is a conventional SDR image. SDR image and transfer function in the above formula (1) in conventional display device (luminance in 100 cd/m)2Left and right) upper performanceIs good.

With the continuous upgrade of display devices, the dynamic range that display devices at the present stage can display is continuously increased compared with the conventional display devices. The current HDR display at the consumer level can reach 600cd/m2High-end HDR display can reach 2000cd/m2And the display range of the traditional SDR display equipment is far beyond. Therefore, the photoelectric transfer function compatible with the conventional SDR display device in the ITU-R bt.1886 standard protocol is no longer able to well express the display performance of the current-stage HDR display device. Therefore, improvements in the photoelectric transfer function are needed to accommodate the upgrade of HDR display devices.

The HDR photoelectric transfer function OETF mainly has three types: a Perceptual Quantization (PQ) photoelectric transfer function, a hybrid log-Gamma (HLG) photoelectric transfer function, and a Scene Luminance Fidelity (SLF) photoelectric transfer function. The three photoelectric transfer functions are photoelectric transfer functions specified by audio video coding standard (AVS) standards.

The PQ photoelectric transfer function is a perceptually quantized photoelectric transfer function proposed according to a human eye brightness perception model. Referring to fig. 2, fig. 2 is an image of a PQ photoelectric transfer function.

The PQ photoelectric transfer function represents the conversion relationship from the linear signal value of the image pixel to the PQ domain nonlinear signal value, and can be expressed as formula (2):

wherein, each parameter in the formula (2) is calculated as follows:

wherein L represents a linear signal value normalized to [0,1]]L' represents a nonlinear signal value having a value in the range of [0,1]],m1、m2、c1、c2、c3In order to obtain the PQ photoelectric transfer coefficient,

the HLG photoelectric transfer function is obtained by improving on the basis of a traditional Gamma curve. Referring to fig. 3, fig. 3 is an image of the HLG photoelectric transfer function.

The HLG photoelectric transfer function applies the traditional Gamma curve at the low section and supplements the log curve at the high section. The HLG photoelectric transfer function represents a conversion relationship from a linear signal value of an image pixel to a non-linear signal value of the HLG domain, and can be expressed as formula (3):

wherein, L represents a linear signal value with a range of [0, 12], L represents a nonlinear signal value with a range of [0,1], a, b and c represent HLG photoelectric transfer coefficients, a is 0.17883277, b is 0.28466892, and c is 0.55991073.

The SLF photoelectric transfer function is an optimal curve obtained according to the brightness distribution of the HDR scene on the premise of meeting the optical characteristics of human eyes. Referring to fig. 4, fig. 4 is an image of the SLF photoelectric transfer function.

The SLF photoelectric transfer curve represents a conversion relationship of linear signal values of image pixels to SLF domain nonlinear signal values. The conversion relationship of the linear signal value of the image pixel to the SLF domain nonlinear signal value is as shown in equation (4):

wherein, the SLF photoelectric transfer function can be expressed as formula (5):

wherein L represents a linear signal value normalized to [0,1], L represents a nonlinear signal value having a value in the range of [0,1], p, m, a, and b are SLF photoelectric transfer coefficients, p is 2.3, m is 0.14, a is 1.12762, and b is-0.12762.

3. The mapping method of the dynamic range is mainly applied to the adaptation process of the display device of the front-end HDR signal and the back-end HDR, including a tone-mapping (tone-mapping) process from high to low and a tone-mapping process from low to high. For example, the front end is the collected 4000nit illumination signal, and the HDR display capability of the rear-end display device (e.g., a tv drama, a tablet computer, etc.) is only 500nit, so that mapping the 4000nit illumination signal onto the 500nit display device is a high-to-low tone-mapping process. For another example, the front end is the acquired SDR illumination signal of 100nit, and the HDR display capability of the rear-end display device is 2000nit, so that mapping the illumination signal of 100nit onto the display device of 2000nit is a tone-mapping process from low to high.

The mapping method of the dynamic range can be divided into static dynamic range mapping and dynamic range mapping. The static dynamic range mapping method is to perform an integral tone mapping process by using single data according to the same video content or the same hard disk content, that is, the processing curves of the same video content or the same hard disk content are generally the same. The method has the advantages of less information and simpler processing flow. The disadvantage of this method is that each scene uses the same curve for tone mapping, which results in information loss in some scenes. For example, if the curve is emphasized by protecting bright areas, some details may be lost in some extremely dark scenes or may be invisible, which may affect the user experience.

The dynamic mapping method is to dynamically adjust according to a specific region, each scene or according to the content of each frame. The advantage of this method is that different curve processing can be performed for each scene or each frame according to the specific area, and the processed image display result is better. However, the disadvantage is that each frame or each scene is required to carry the relevant scene information, and the amount of information carried is large.

At present, there are the following five major tone-mapping technologies. The five tone-mapping techniques are described below.

The first technique is a tone-mapping process based on sigmoid curves, mainly proposed by dolby. Fig. 5 shows a schematic diagram of a sigmoid curve. Referring to fig. 5, the abscissa represents the input luminance, i.e., the luminance of the HDR image before dynamic range adjustment, and the ordinate represents the output luminance, i.e., the luminance of the image after dynamic range adjustment. The sigmoid curve is S-shaped, and the slope of the curve rises first and then falls. For example, taking the tuning point on the sigmoid curve as an example, the brightness can be adjusted to be about 300cd/m by the sigmoid curve2Is mapped to a source adaptation level of about 30cd/m luminance2Target adaptation level(s).

The second technology is a tone-mapping process based on Bezier curves. Fig. 6 shows a schematic diagram of a bezier curve. In fig. 6, the abscissa represents the input luminance, i.e., the luminance of the HDR image before dynamic range adjustment, and the ordinate represents the output luminance, i.e., the luminance of the image after dynamic range adjustment. Wherein the Bezier curve has an input brightness of 0-KsIs a linear mapping process, and the input brightness is KsThe range to 1 is an S-shaped curve, and the slope of the curve firstly rises and then falls.

The third technology is a tone-mapping process based on an S-shaped curve perceived by human eyes. The form of this curve is shown in equation (6) below:

wherein, L and L 'represent normalized electrical signals or optical signals, the value range of a is between 0.0 and 1.0, the value range of b is between 0.0 and 1.0, the value ranges of p, N and m are between 0.1 and N, N is a rational number larger than 0.1, L' is a rational number in the range of 0.0 to 1.0, L is a rational number in the range of 0.0 to 1.0, and k1, k2 and k3 are rational numbers. .

The fourth technique is a tone-mapping process combining cubic splines and linear S-shaped curves. Wherein the form of the partial curve is shown in the following formula (7):

where L and L' are normalized electrical or optical signals. Wherein the value range of a is between 0.0 and 1.0, the value range of b is between 0.0 and 1.0, the value ranges of p, N and m are between 0.1 and N, and N is a rational number more than 0.1. L' is a rational number in the range of 0.0-1.0, L is a rational number in the range of 0.0-1.0, K1, K2 and K3 are rational numbers, K1 and K2 are not 0 at the same time, and K3 is not 0. TH1[ i ], TH2[ i ] and TH3[ i ] are rational numbers in the range of 0.0-1.0.

Technique five is another tone-mapping process that combines cubic splines and linear S-curves. Wherein the form of the partial curve is shown in the following formula (8):

where L and L' are normalized electrical or optical signals. Wherein the value range of a is between 0.0 and 1.0, the value range of b is between 0.0 and 1.0, the value ranges of p, N and m are between 0.1 and N, and N is a rational number more than 0.1. L' is a rational number in the range of 0.0 to 1.0, L is a rational number in the range of 0.0 to 1.0, and k1, k2, k3 are rational numbers. LT is a preset rational number, and the range of LT is 0.0-1.0. TH1[ i ], TH2[ i ] and TH3[ i ] are rational numbers in the range of 0.0-1.0.

Metadata related to the curve parameters is transmitted in the dynamic metadata.

In the first technique, in the dynamic metadata definition related to St2094-10 dolby, not only statistical values such as a maximum value (maximum PQ-encoded maxRGB), a minimum value (minimum PQ-encoded maxRGB), and an average value (average PQ-encoded maxRGB) but also parameters related to sigmoid curves such as tone mapping offset (tone mapping offset), tone mapping gain (tone mapping gain), and tone mapping gamma (tone mapping gamma) are transmitted.

For the technique 2, the dynamic metadata definition related to St2094-40 includes histogram information (distribution MaxRGB) and Bezier curve parameters (Bezier curve anchors) for directly generating the curve.

In addition, in the St2094 series of standards, the metadata includes a target system display actual peak luminance (target system display actual luminance).

For technology three, technology four and technology five, the metadata may convey information such as maximum value, minimum value, average value, etc., and may also convey curve parameters such as p, m, a, b, n, K1, K2, K3, etc.

When the maximum brightness of the image is smaller than the maximum display brightness of the display device, the mapping algorithm of the dynamic range of the first to fifth technologies may be adopted to adjust the high dynamic range image to the dynamic range that can be displayed by the display device for display. However, when the maximum brightness of the image is close to the maximum display brightness of the display device, if the mapping algorithm of the dynamic range of the first to fifth techniques is still used, an abnormal phenomenon occurs in which the brightness of the pixels of the display device after mapping is brighter than that of the original image.

FIG. 7 shows that the maximum luminance of the image is the same as the maximum display luminance of the display device (e.g., both 500 cd/m)2) An example of a tone-mapping curve of time. Referring to fig. 7, a straight line where y ═ x (two end points are a (500,500) and B (0,0), respectively) corresponds to a tone-mapping curve that equates input luminance with output luminance. According to the straight line where y is x, the luminance of the pixel on the display device is the same as that of the original image. For example, for point D above y ═ x, both the input and output luminances are 450cd/m2

With continued reference to FIG. 7, for an "S" type curve (with two endpoints A (500,500) and B (0,0), respectively, such as a sigmoid curve of one of the techniques), then at the inputThe brightness is close to 500cd/m2In the case of (1), when the input luminance is the same, the output luminance of the tone-mapping by the "S" type curve is higher than the output luminance of the tone-mapping by y ═ x. For example, for point E on the "S" curve, which is the same as the D-point input luminance, the output luminance is 480cd/m2

In view of the above, the present application provides a dynamic range mapping method, which, when the maximum brightness of an image is close to the maximum display brightness of a display device, adjusts parameters of an original tone mapping curve so that the output brightness of the tone mapping curve corresponding to the adjusted parameters is not higher than the input brightness of the tone mapping curve, thereby helping to avoid an abnormal phenomenon that the brightness of pixels of the display device after mapping is brighter than that of the original image. Here, the original tone mapping curve may be a fixed curve adjusted to display the actual peak luminance according to the target system in the metadata of the image data, such as the tone mapping curves of the above-described one to five techniques.

Fig. 8 is a schematic diagram illustrating a system architecture of a method for dynamic range mapping provided in an embodiment of the present application. Referring to fig. 8, the front end may acquire HDR content by acquiring and producing the HDR content, and transmit the HDR content and metadata of the HDR content to the display end via the transport layer. The display side may comprise an HDR display device and further an SDR display device. As an example, when the display side includes an HDR display device, mapping of HDR content onto the HDR display device may be implemented, and when the display side includes an SDR display device, mapping of HDR content onto the SDR display device may be implemented.

Illustratively, the product form of the display end may be set top box, television display device, mobile phone display device, and electronic device such as conversion device for live broadcast and video application.

As an example, the scheme provided by the embodiment of the present application may be implemented in a form of a hardware chip on a set top box, a television display device, or a mobile phone display device, and the scheme provided by the embodiment of the present application is implemented mainly in a form of a software program code on a live network broadcast or video playback device, but the embodiment of the present application is not limited thereto.

It should be noted that, the embodiment of the present application is described by taking the application scenario in fig. 7 as an example, but the system architecture applied to the embodiment of the present application is not limited thereto. For example, the front end may also retrieve SDR content, in which case mapping of SDR content onto an HDR display device may be implemented when the display end includes an HDR display device.

Fig. 9 is a schematic flow chart diagram of a method 900 for dynamic range mapping provided by an embodiment of the present application. The method 900 is applicable to the application scenario provided in fig. 8, for example, performed by the display side shown in fig. 8. Referring to fig. 9, method 900 includes the following steps 910 through 940.

And 910, acquiring characteristic information of the image data and display parameters of the local display device. Here, the image data (which may be denoted as V) may be HDR image data or SDR image data, which is not limited in the embodiment of the present application.

Illustratively, the display-side device may receive the video source from the front-end, which mainly contains image data V, e.g., pixel data, etc. As a specific example, for a 4K video source, it may include 3840 × 2160 pixels of brightness and color data, etc.

The embodiment of the present application does not limit the format of the image data V. For example, the image data V may be image data in y (luminance) uv (chrominance) space or image data in RGB pixel space, in terms of color space of pixel data. For example, the image data V may be 8 bits wide, 10 bits wide, or 12 bits wide in terms of the bit width of the pixel data.

In some embodiments, at the same time as the image data V is acquired, characteristic information of the image data may also be acquired, for example, from metadata (metadata) M. The metadata M of the image data V is used to represent the data characteristics of the image data, and may include, for example, the format of the image data or the curve parameter M corresponding to the image data VcurveThe target system displays the actual peak brightness MTPL(targeted system display actual peak luminance), maximum value MaxSource of luminance of content of image datace (the maximum value of the Y components of all the pixels or the maximum value of the RGB components of all the pixels), min source (the minimum value of the Y components of all the pixels or the minimum value of the maximum values of the RGB components of all the pixels), average value (the average value of the Y components of all the pixels or the average value of the maximum values of the RGB components of all the pixels), a variation range of display contents, and the like, which are not limited in the embodiments of the present application.

In some embodiments, the feature information of the image data V may also be obtained from the pixel information of the image data V; or a preset value of the feature information value of the image data is used, which is not limited in the embodiment of the present application.

It should be noted that, when the metadata M includes the curve parameter McurveIn the embodiment of the application, the curve parameter M is not determinedcurveIs defined. For example, for technique three above, the curve parameter M included in the metadatacurveP, m, a, b, n, K1, K2, K3, etc.

In some embodiments, the metadata includes dynamic metadata and static metadata, as can be seen in the standard ST2094-1dynamic metadata for color volume transform or static metadata related standard (static metadata). For example, metadata may be packed with the image, e.g., SEI packets containing different file formats, different coding standards, some packet structures related to HDMI including hardware, etc.

In some embodiments, the display device may further obtain the display parameter M of the display device (i.e. the actual terminal device P, or the local display device)TPL(also may be referred to as a display brightness parameter). Illustratively, the display parameter MTPLThe maximum display brightness MaxDisplay of the display-side device and the minimum display brightness minidisplay of the display-side device may be included, or other parameters, which are not limited in this embodiment of the application.

A first parameter of a first tone mapping curve of the image data is obtained 920.

Illustratively, the display-side device may be based on the metadata M of the image data V and the display parameters M of the display-side deviceTPLAcquiring the imageA first parameter of a first tone mapping curve of the data V. For example, the average value average _ maxrgb of the brightness according to the content of the image data V in the metadata M, and/or the maximum value MaxSource of the brightness, and/or the minimum value MinSource of the brightness, and/or the maximum display brightness MaxDisplay of the display-side device, and/or the minimum display brightness minidispllay of the display-side device, and/or the curve parameter Mcurve(P1, P2, …), and/or other data, obtaining a first parameter of a first tone mapping curve, which may be denoted as P1curve(X, p1, p2, …). Where X is the input luminance value and p1, p2, … are the values of the curve parameters.

It should be noted that, in the embodiment of the present application, the first parameter P1 for the first tone mapping curvecurveThe form of (A) is not limited. In addition, the embodiment pair of the present application generates the first parameter P1curveData used in the process, or generation of the first parameter P1curveThe algorithm of time is not limited. For example, a first parameter P1 is generatedcurveThe data of (2) may be metadata, and/or display parameters of the display end device, or may be other preset data.

As a specific example, for technique five above, the curve parameter McurveFor example, parameter values (p, m, a, b, n, K1, K2, K3) and (TH1[ i ]]、TH2[i]、TH3[i]MB0) can be determined from this curve parameter McurveObtaining a first parameter P1 of the first tone mapping curvecurveE.g. is (p)P1、mP1、aP1、bP1、nP1、K1P1、K2P1、K3P1、TH1[i]、TH2[i]、TH3[i]、MD1[i]、MC1[i]、MB1[i]、MA1[i]、MD2[i]、MC2[i]、MB2[i]、MA2[i]、MB3)。

As another specific example, for technique four above, the curve parameter McurveFor example, parameter values (p, m, a, b, n, K1, K2, K3) and (TH1[ i ]]、TH2[i]、TH3[i]MB0) can be determined from this curve parameter McurveObtaining a first parameter P1 of the first tone mapping curvecurveE.g. is (p)P1、mP1、aP1、bP1、nP1、K1P1、K2P1、K3P1、TH1[i]、TH2[i]、TH3[i]、MD1[i]、MC1[i]、MB1[i]、MA1[i]、MD2[i]、MC2[i]、MB2[i]、MA2[i])。

It should be noted that the first tone mapping curve in the embodiment of the present application is an example of the original tone mapping curve, including but not limited to the tone mapping curves used in the first technique, the second technique, the third technique, the fourth technique, and the fifth technique. The first parameters of the first mapping curve in this application include, but are not limited to, parameters related to the tone mapping curve used in technology one, technology two, technology three, technology four, and technology five.

And 930, when the preset condition is met, acquiring a second parameter of the second tone mapping curve according to the characteristic information, the display parameter and the first parameter. Wherein the output luminance at a first point on the second tone mapping curve is not higher than the input luminance at the first point on the second tone mapping curve. That is, in the input luminance range of the second tone mapping curve, the output luminance obtained by mapping any one input luminance according to the second tone mapping curve is not higher than the input luminance. The second parameter is used for dynamic range mapping of the image data, which may be denoted as Rcurve

As an example, the input luminance of the tone mapping curve may be a linear light, a nonlinear value, or a normalized value of a linear relationship (for example, 10000 is 1, or the maximum luminance of the content is 1), which is not limited in this embodiment of the present application.

Illustratively, it may be based on the first parameter P1curveAnd the average value average _ maxrgb of the brightness of the content of the image data V, and/or the maximum value MaxSource of the brightness, and/or the minimum value MinSource of the brightness, and/or the maximum display brightness MaxDisplay of the display-side device, and/or the minimum display brightness minidisplay of the display-side device, and/or other data, obtaining the second parameter R of the second tone mapping curvecurve

Illustratively, the second parameter RcurveMay have a form represented by the following formula (9):

Wherein, L and L' are normalized electric signals or optical signals, and Dark, TH3C, TH2D, TH3D, MD1D, MC1D, MB1D, MA1D, MD2D, MC2D, MB2D and MA2D are rational numbers.

In some embodiments, the predetermined condition, such as tone mapping the image data according to the first tone mapping curve, may cause the output luminance at a point on the first tone mapping curve to be higher than the input luminance at the point on the first tone mapping curve.

In the embodiment of the present application, in the case where the output luminance of the tone mapping curve is different from the input luminance within the first range, the output luminance and the input luminance may be considered to be substantially the same. That is, when a portion of the tone mapping curve where the output luminance is higher than the input luminance is within the first range, both can be considered to be substantially the same. Conversely, when the portion of the tone mapping curve where the output luminance is higher than the input luminance exceeds the first range, the output luminance may be considered to be higher than the input luminance.

When a preset condition is satisfied, that is, the tone mapping of the image data according to the first parameter causes the output brightness of the first tone mapping curve to be higher than the input brightness of the first tone mapping curve, generating the second parameter R of the second tone mapping curve is performedcurveThe process of (1).

As a possible implementation manner, the preset condition may be a parameter p in the first parameterP1Greater than a first value Tp, wherein said first value Tp is according to a in said first parameterP1And a is predeterminedP1And pP1The corresponding relationship of (a). Where Tp represents the threshold value of the curve parameter p in technique three or technique four or technique five. When the first parameter pP1Beyond Tp, there is a possibility that the output luminance is higher than the input luminance at a point on the second tone mapping curve.

As a specific example, for technique four or technique five above, the first parameter P1curveIncluding aP1、pP1And the like. At this time, a may beP1As Ta, the look-up table Tpa (Tp, Ta) obtains a corresponding first value Tp. Here, the table Tpa (Tp, Ta) is a predetermined table aP1And pP1An example of the correspondence of (c). Wherein Ta represents the threshold value of the curve parameter a in technique three or technique four or technique five.

If p isP1If the length is more than Tp, the preset condition is met. Optionally, the first parameter P1 may be used at this timecurveIn (c) pP1This first value Tp obtained by table lookup is replaced. Thus, the first parameter P1 after replacementcurveI.e. the second parameter R can becurve

If p isP1Less than or equal to Tp, then the generation of the second parameter R of the second tone mapping curve need not be performedcurveThe process of (1).

As another possible implementation manner, the preset condition may be a parameter a in the first parameterP1Greater than a second value Ta, wherein the second value Ta is according to p in the first parameterP1And a is predeterminedP1And pP1The corresponding relationship of (a). When the first parameter aP1When Ta is exceeded, a phenomenon that the output luminance is higher than the input luminance at a certain point on the second tone mapping curve may occur.

As a specific example, for technique four or technique five above, the first parameter P1curveIncluding aP1、pP1And the like. At this time, p may beP1The look-up table Tpa (Tp, Ta) obtains a corresponding second value Ta as Tp. Here, the table Tpa (Tp, Ta) is a predetermined table aP1And pP1An example of the correspondence of (c).

If a isP1If greater than Ta, the preset condition is satisfied. Optionally, the first parameter P1 may be used at this timecurveA in (a)P1And replacing the value with a second value Ta obtained by table lookup. Thus, the replaced first parameter may be the first parameterTwo parameters Rcurve

If a isP1Less than or equal to Ta, the generation of the second parameter R of the second tone mapping curve need not be performedcurveThe process of (1).

In the above example, the table Tpa (Tp, Ta) is a preset rational number combination, such as (3.5,0.879), (4.5,0.777), and so on. It should be noted that, for the values not shown in the table, the values may be generated by using linear difference values, adjacent values, or weighted average values of adjacent values. In the embodiments of the present application, the specific form of table Tpa (Tp, Ta) is not limited, and for example, table Tpa (Tp, Ta) may be expressed as a functional relationship between Tp and Ta.

As another possible implementation manner, the preset condition is a parameter a in the first parameterP1And parameter pP1The product of (1) is greater than a third value Tap, wherein the third value Tap is a predetermined rational number. Illustratively, the third value Tap may be a rational number between 3 and 4, such as 3.2 or 3.4, which is not limited in the embodiments of the present application.

As a specific example, for technique four or technique five above, the first parameter P1curveIncluding aP1、pP1And the like. At this time, the parameter a can be judgedP1And parameter pP1Product of aP1*pP1Whether it is greater than the preset value Tap.

If a isP1*pP1If the value is greater than Tap, the preset condition is met. Optionally, the first parameter P1 may be used at this timecurveP in (1)P1Substitution to Tap/aP1Or a in the first parameterP1Substitution to Tap/pP1. Thus, the replaced first parameter may be the second parameter Rcurve

If a isP1*pP1Less than or equal to Tap, then the generation of the second parameter R of the second tone mapping curve need not be performedcurveThe process of (1).

In other embodiments, the first parameter P1 corresponding to the first tone mapping curve may also be usedcurveConversion to absolute luminance space, e.g.Such as linear space or non-linear space such as PQ, HLG, etc., it is necessary to ensure that y and x have the same value and the same brightness. Then, it is determined whether the first tone mapping curve has a portion higher than y ═ x according to whether the first tone mapping curve has an intersection with the y ═ x straight line. For example, when the first tone mapping curve has an intersection with a y ═ x straight line, it may be determined that there is a portion of the first tone mapping curve higher than y ═ x, and when the first tone mapping curve has no intersection with y ═ x, it may be determined that there is no portion of the first tone mapping curve higher than y ═ x.

Therefore, the embodiment of the present application further adjusts the parameter of the first tone mapping curve, so that the output brightness of a certain point on the tone mapping curve (i.e. the second tone mapping curve) corresponding to the adjusted curve parameter (i.e. the second parameter) is not higher than the input brightness corresponding to the certain point, thereby helping to avoid the abnormal phenomenon that the brightness of the pixel of the terminal device after mapping is brighter than that of the original image when the maximum display brightness of the image is close to the maximum display brightness of the display device.

In some optional embodiments, the second parameter further includes a first-order spline parameter, where the first-order spline parameter includes a maximum value TH3C (which may also be referred to as a first maximum input luminance TH3C) of luminance values of interval pixels of a first-order spline (which may be referred to as a first-order spline) in the second tone mapping curve, and a slope Dark of the first-order spline. Illustratively, the first primary spline is, for example, a tone mapping curve with an input luminance less than TH3C in equation (9) above, i.e., Dark × L, L < TH 3C. Wherein, L < TH3C is an interval pixel point of the first one-time spline.

Optionally, the display end device may obtain a maximum value TH3C0 (which may also be referred to as an initial first maximum input brightness TH3C0) of the brightness values of the pixels in the initial interval of the first one-time spline and an initial slope Dark0, determine the first maximum input brightness TH3C according to the initial first maximum input brightness TH3C0, and determine the slope Dark according to the initial slope Dark 0.

The following are three methods for obtaining the initial first maximum input luminance TH3C0 provided in the embodiments of the present application.

Method 1

The display end device can be used for displaying the first parameter P1curveThe initial first maximum input luminance TH3C0 is determined. For example, when a first spline (which may be referred to as a second spline, for example, the second spline, the fourth spline, or the fifth spline) exists in the first tone mapping curve, the initial first maximum input luminance TH3C0 may be determined to be the maximum value of the luminance values of the interval pixel points of the second spline.

Method two

And the display end equipment determines the initial first maximum input brightness TH3C0 according to a preset value. For example, the preset value may be a decomposition of scotopic vision and bright vision, i.e. a brightness of the human eye where the intensity of the cone and rod varies, such as 1 nit.

Method III

The display-side device determines the initial first maximum input luminance TH3C0 from the metadata M of the image data V. The metadata M includes feature data of the number of histogram dark area pixels, such as feature luminance positions of the number of histogram dark area pixels, or luminance of dark area pixels significantly varying from dark to bright pixel numbers/accumulated pixel numbers, or accumulated pixel numbers from 0 to feature luminance occupying more than a preset proportion of the total pixels.

The following are three methods for obtaining the initial slope Dark0 provided in the embodiments of the present application.

Method 1

The display end device can be used for displaying the first parameter P1curveThe initial slope Dark0 is determined. Illustratively, when a first spline (e.g., a second spline) exists for the first tone mapping curve, the initial slope Dark0 may be determined to be the slope of the second spline, such as MB0 in technical four or technical five.

Method two

The display device may determine the initial slope Dark0 according to a ratio of a fourth value to the first maximum input luminance TH3C, wherein the fourth value is an output value of the first tone mapping curve at the first maximum input luminance TH3C, for exampleE.g. the fourth value may be expressed as Vdark-P1curve(TH3C), at which time the initial slope Dark0 may be expressed as (Vdark/TH 3C).

Method III

The display-side device may determine the initial slope Dark0 according to a slope value of a preset input value of the first tone mapping curve between 0 and the first maximum input luminance TH 3C. For example, the average value, the maximum value, or the intermediate value of the slope values between 0 and the first maximum input luminance TH3C may be used, which is not limited in the present application.

It should be noted that the above manner of obtaining the initial maximum input brightness TH3C0 or the initial slope Dark0 is only an example, and is not limited to the embodiment of the present application, and for example, the manner of obtaining the initial maximum input brightness TH3C0 or the initial slope Dark0 by replacing the above method by a conventional method is also within the protection scope of the embodiment of the present application.

The following are two methods for obtaining the first maximum input luminance TH3C and the slope Dark of the second target tone mapping curve according to the initial first maximum input luminance TH3C0 and the initial slope Dark0 provided in the embodiments of the present application.

Method 1

The above-described first maximum input luminance TH3C and slope Dark may be determined according to the following equations (10) and (11), that is, the first initial maximum input luminance TH3C0, the first maximum input luminance TH3C, the initial slope Dark0 and the slope Dark satisfy the following equations (10) and (11).

TH3C=TH3C0+(MaxSource-TH3C0)*(WA)N2 (10)

Dark=Dark0+(1-Dark0)*(WA)N1 (11)

Wherein the content of the first and second substances,

or

Where N1 and N2 are rational numbers greater than 0, H (L) is a tone mapping curve, and G (L) is an inverse function of H (L).

Method two

The first maximum input luminance TH3C and the slope Dark may be determined according to the following equations (12) and (13), that is, the first initial maximum input luminance TH3C0, the first maximum input luminance TH3C, the initial slope Dark0 and the slope Dark satisfy the following equations (12) and (13).

TH3C=TH3C0+(MaxLum-TH3C0)*(WA)N2 (12)

Dark=Dark0+(1-Dark0)*(WA)N1 (13)

Wherein the content of the first and second substances,

or

Wherein, MaxLum is the adjustment value of the maximum brightness MaxSource of the image data, h (l) is the tone mapping curve function, and g (l) is the inverse function of h (l). It should be noted that, the embodiment of the present application is not limited to the adjustment mode from MaxSource to MaxLum.

Illustratively, for the tone mapping curve in the following equation (14-1), the inverse function G (L) is shown in equation (15-1).

Illustratively, for the tone mapping curve in the following equation (14-2), the inverse function G (L) is shown in equation (15-2).

In the embodiment of the present application, when the image data is subjected to dynamic range mapping according to the second parameter, the dark area of the image data may be tone-mapped using the straight line portion, so that the gain of the luminance may be controlled, and it is more convenient to control the second parameter to gradually change from a straight line to a straight line where y equals x, where y equals x is equal to the output luminance at any point on the tone mapping curve, and thus the embodiment itself is not easy to cause a flicker phenomenon with respect to the content of the gradual luminance change.

In some alternative embodiments, the second tone mapping curve further includes a cubic spline curve, and the second parameter R iscurveThe method also comprises the minimum value of the brightness value of the first interval pixel point of the first cubic spline of the second tone mapping curve. At this time, the display end device may determine the maximum value TH1D of the brightness value of the first interval pixel point of the first cubic spline according to the maximum value TH3C of the brightness value of the interval pixel point of the first spline in the second tone mapping curve, that is, the first maximum input brightness TH 3C. For example, the maximum value TH1D of the luminance values of the first interval pixel points may be equal to the first maximum input luminance TH3C, i.e., TH1D is TH 3C.

Illustratively, the tone mapping curve corresponding to the first cubic spline may be the tone mapping curve having the input luminance range of TH3C or more and less than TH2D in the above formula (9), i.e., MD1D × (L-TH1D)3+MC1D×(L-TH1D)2+MB1D×(L-TH1D)+MA1D,TH1D≤L<TH2D, wherein, TH1D is less than or equal to L<TH2D is the first interval pixel.

Wherein the second parameter RcurveThe brightness of the first interval pixel point of the first cubic spline is also includedThe maximum value TH2D of the values may also be referred to as the second maximum input luminance TH 2D. For example, the second maximum input brightness TH2D may be determined according to the maximum value TH1D of the brightness values of the pixel points in the first interval.

In some alternative embodiments, the second parameter RcurveThe maximum value TH3D of the brightness value of the second interval pixel point of the second cubic spline of the second tone mapping curve is also referred to as a third maximum input brightness TH 3D. Optionally, the minimum value of the brightness values of the pixels in the second interval may be TH 2D. Illustratively, the tone mapping curve corresponding to the second cubic spline is a tone mapping curve having a luminance range greater than or equal to TH2D and less than TH3D, that is, MD2D × (L-TH2D), which can be input in equation (9) above3+MC2D×(L-TH2D)2+ MB2D x (L-TH2D) + MA2D, TH2D is more than or equal to L and less than or equal to TH3D, wherein TH2D is more than or equal to L and less than or equal to TH3D is the second interval pixel.

For example, the display-side device may determine the third maximum input luminance TH3D according to the maximum value TH1D of the luminance values of the pixel points in the first interval and the second maximum input luminance TH 2D.

The following are three methods of determining the second maximum input luminance TH2D and the third maximum input luminance TH3D provided in the embodiments of the present application.

Method 1

The display-side device may determine the second maximum input luminance TH2D according to the maximum value TH1D of the luminance values of the pixels in the first interval and TH1[0], TH2[0], TH3[0] (or parameters TH1[0], TH2[0], TH3[0]) in the first parameter. Illustratively, TH2D and TH3D may satisfy the following equations (16-1) and (17-1), respectively:

TH2D=TH1D+TH2[0]-TH1[0] (16-1)

TH3D=TH2D+TH3[0]-TH2[0] (17-1)

method two

The display end device may determine the second maximum input brightness TH2D according to the maximum value TH1D of the brightness values of the pixels in the first interval and deltaTH2[0], deltaTH3[0] (or parameters deltaTH2[0], deltaTH3[0]) in the first parameter. Illustratively, TH2D and TH3D may satisfy the following equation (16-2) and equation (17-2), respectively:

TH2D=TH1D+deltaTH2[0] (16-2)

TH3D=TH2D+deltaTH3[0] (17-2)

method two

The display terminal device can determine TH2D and TH3D according to TH1D and a preset value. Illustratively, TH2D and TH3D may satisfy the following equation (18) and equation (19), respectively:

TH2D=TH1D+B (18)

TH3D=TH2D+C*TH2D-D*TH1D (19)

b is a rational number greater than 0, for example, the B may be an offset value corresponding to a brightness value of a pixel point in the dark transition region, and the default value may be 0.15; c and D are rational numbers greater than 0, for example, weighting coefficients corresponding to brightness values of bright-area pixels, and the default value may be 0.5.

Optionally, a second parameter R may be determinedcurveParameters in (1) (i.e., in formula (9)) such as MD1D, MC1D, MB1D, MA1D, MD2D, MC2D, MB2D, and MA 2D. Illustratively, these parameters may be determined according to the following equations (14) to (19).

In some embodiments, the minimum value TH1D of the luminance of the first interval pixel of the first cubic spline of the second tone mapping curve is the same as the first maximum input luminance TH3C (i.e., the maximum value TH3C of the luminance of the interval pixel of the first cubic spline). Therefore, the interval pixel point of the first cubic spline of the second tone mapping curve can be continuous with the first interval pixel point of the first cubic spline. And the output values of the first primary spline and the first tertiary spline in the second tone mapping curve at TH1D are the same, and the first primary spline and the first tertiary spline in the second tone mapping curve have the same first derivative at TH1D, i.e., the second tone mapping curve is continuous at TH 1D.

Illustratively, for R in formula (9)curveParametrically, MA1D, Dark when the second tone mapping curve is continuous at TH1DTH3C, MB1D satisfy the following formulae (20) and (21):

Dark×TH3C=MA1D (20)

Dark=MB1D (21)

in some embodiments, the maximum value of the brightness value of the pixel point in the second interval of the second cubic spline is the same as the maximum value TH2D of the brightness value of the pixel point in the first interval of the first cubic spline, that is, the second maximum input brightness TH2D, and the output values of the second cubic spline and the first cubic spline at TH2D are the same. Therefore, the first interval pixel point of the first cubic spline of the second tone mapping curve and the second interval pixel point of the second cubic spline can be continuous. And the first derivative of the second cubic spline and the first cubic spline at TH2D is the same, i.e., the second tone mapping curve is continuous at TH 2D.

Illustratively, for R in formula (9)curveParametrically, when the second hue mapping curve is continuous at TH2D, MD1D, TH3C, MC1D, MB1D, MA1D, MD2D, TH2D, MB2D, MA2D satisfy the following formulas (22) and (23)

MD1D×(TH2D-TH3C)3+MC1D×(TH2D-TH3C)2+MB1D×(TH2D-TH3C)+MA1D=MA2D

(22)

3×MD1D×(TH2D-TH3C)3+2×MC1D×(TH2D-TH3C)+MB1D=MB2D (23)

In some embodiments, the second parameter further includes a curve parameter of a tone mapping sub-function of the second tone mapping curve, and a minimum value of luminance values of pixels in the third interval of the tone mapping sub-function is the same as the maximum value TH3D of luminance values of pixels in the second interval of the second cubic spline, that is, the third maximum input luminance TH 3D. Therefore, the second interval pixel point of the second cubic spline of the second tone mapping curve and the second interval pixel point corresponding to the tone mapping sub-function can be continuous. And the output values of the second cubic spline and the tone mapping sub-function at TH3D are the same, and the first derivatives of the second cubic spline and the tone mapping sub-function at TH3D are the same, i.e. the second tone mapping curve is continuous at TH 3D.

Illustratively, for R in formula (9)curveParametrically, when the second hue mapping curve is continuous at TH3D, MD2D, TH3D, TH2D, MC2D, MB2D, MA2D, MD2D, MC2D, MB2D satisfy the following equations (24) and (25)

In addition, in some embodiments, the values of the two segments of cubic splines (i.e., the first cubic spline and the second cubic spline) at TH2D may be obtained according to a preset strategy. For example, the values of the two segments of cubic splines at TH2D may be the values of the middle point of a two-point line on the second tone mapping curve with input intensities TH1D and TH 3D.

In the embodiment of the present application, the cubic spline in the second tone mapping curve may smoothly connect the primary spline and the basic curve, and may help to conveniently control the gain of the portion adjacent to the linear portion.

It should be noted that, in the embodiment of the present application, the process of acquiring the primary spline parameter in the second parameter may be included only, and the process of acquiring the parameters other than the primary spline parameter in the second parameter is not required.

940, dynamic range mapping is carried out on the image data according to the second parameter of the second tone mapping curve. For example, after obtaining the second parameter, a second tone mapping curve may be obtained for dynamic range mapping of the image data.

Illustratively, according to equation (9) above, a mapping relationship between the normalized HDR/SDR source data to the normalized HDR/SDR display data may be obtained. For example, the mapping value L' may be inversely normalized to be between the maximum display capability and the minimum display capability of the display-side device according to the maximum display capability and the minimum hour capability (for example, 0) of the display-side device. The above inverse normalization calculation may be a non-linear space of PQ, or a linear space normalized by 0 to 1. In addition, the reverse normalization may be 0 to 10000nit, or 0.0001 to 100000nit, or the like. The embodiment of the present application does not limit the reverse normalization range and process of the HDR/SDR mapping data L'.

It should be noted that, after the second tone mapping curve is obtained, the subsequent display adaptation process not only includes tone-mapping (tone-mapping), but also may further adjust the saturation process before displaying, and/or the color gamut transformation process, and/or the denoising process, and/or the sharpening process, and the like, which is not limited in this embodiment of the present application.

It should be further noted that the maximum display capability of the display device can be obtained according to the parameters of the device or the information of the manufacturer. The minimum display capability of the display-side device is usually 0nit, and may also be 1nit, which is not limited in this embodiment of the application.

Therefore, the embodiment of the present application, by further adjusting the parameters of the tone mapping curve, the output luminance of the tone mapping curve corresponding to the adjusted curve parameters is not higher than the input luminance of the tone mapping curve, thereby helping to avoid the abnormal phenomenon that the luminance of the pixels of the display device after mapping is brighter than the original image when the maximum display luminance of the image is close to the maximum display luminance of the display device. Therefore, the embodiment of the application can provide greater flexibility for terminal display equipment with different brightness, so that a better presentation effect is achieved under the condition of reasonably adjusting parameters.

In some optional embodiments of the present application, the first-order spline curve parameter (which may be referred to as a first-order spline curve parameter) in the second parameter may include a slope of the first-order spline in the second tone mapping curve (which may be represented as MB [0] [0]) and a maximum value of a luminance value of an interval pixel point of the first-order spline (which may be represented as TH3[0 ]).

In this embodiment, the first linear spline parameter (which may be referred to as a second linear spline parameter) included in the first parameter may include a slope of a second linear spline in the first tone mapping curve (which may be represented as MB _ mid [0] [0], for example) and a maximum value of luminance values of pixel points in a section of the second linear spline (which may be represented as TH3_ mid [0], for example).

At this time, when a preset condition is satisfied, one implementation manner of obtaining the second parameter of the second hue mapping curve according to the first parameter, the display parameter, and the feature information may be: according to the maximum display brightness MaxDisplay and the maximum brightness correction value max _ lum, the curve parameters MB _ mid [0] [0] and TH3_ mid [0] are adjusted to obtain the curve parameters MB [0] [0] and TH3[0 ].

Illustratively, if the parameter m _ a (i.e., the tone mapping curve parameter a) is greater than Tm _ ap (m _ p), a process of generating the second parameter, i.e., adjusting MB [0] [0] and TH3[0] according to max _ lum/MaxDisplay, is performed. Tm _ ap may be obtained according to a mapping relationship between m _ p _ T and m _ a _ T, such as by looking up a table (m _ p _ T, m _ a _ T), where m _ p corresponds to a tone mapping curve parameter p, and the predetermined value Tm _ ap (m _ p) of m _ a obtained according to m _ p is m _ a _ T.

Illustratively, when the curve parameters MB _ mid [0] [0] and TH3_ mid [0] are adjusted, the inputs may be the highest display luminance MaxDisplay (value of PQ field) of the display luminance range of the display end device, the maximum luminance correction value max _ lum of the frame to be processed, the target _ system _ display _ maximum _ luminance in the metadata (if the target _ system _ display _ maximum _ luminance does not exist in the metadata, the target _ system _ display _ maximum _ luminance is equal to xdisplay); the parameters of the original primary spline (i.e., the primary spline in the first tone mapping curve), MB0, TH3 0; the color signal mapping curve parameter Ptone _ mapping includes m _ p, m _ m, m _ n, m _ a, m _ b, k1, k2, k 3. The outputs may be the parameters of the first-order spline (i.e., the first-order spline of the second tone mapping curve), MB [0] [0], TH3[0 ].

As a possible implementation, the curve parameters MB _ mid [0] [0] and TH3_ mid [0], and the curve parameters MB [0] [0] and TH3[0], satisfy the following equations (26) and (27):

TH3[0]=TH3_mid[0]+(MaxSource-TH3_mid[0])*(WA)N2 (26)

MB[0][0]=MB_mid[0][0]+(1-MB_mid[0][0])*(WA)N1 (27)

wherein the content of the first and second substances,

or

Where N1 and N2 are rational numbers greater than 0, and G (L) is the mapping curve parameter TcurveIs the inverse function of (c).

As another possible implementation, the curve parameters MB _ mid [0] [0] and TH3_ mid [0], and the curve parameters MB [0] [0] and TH3[0], satisfy the following equations (28) and (29):

TH3[0]=TH3_mid[0]+(MaxLum-TH3_mid[0])*(WA)N2 (28)

MB[0][0]=MB_mid[0][0]+(1-MB_mid[0][0])*(WA)N1 (29)

wherein the content of the first and second substances,

or

Wherein MaxLum is the maximum brightness correction value (adjustment value of MaxSource), G (L) is the mapping curve parameter TcurveIs the inverse function of (c).

As another possible implementation, the curve parameters MB _ mid [0] [0] and TH3_ mid [0], and the curve parameters MB [0] [0] and TH3[0], satisfy the following equations (30) and (31):

wherein the content of the first and second substances,

or

Wherein

Or

Wherein, L is an input signal, G (L) is an inverse function of a function H (L) corresponding to a tone mapping curve, M _ a, M _ b, M _ M, M _ N, k1, k2, and k3 are curve parameters, G (L, M _ a _ T) represents a G (L) value corresponding to an input variable L when a parameter M _ a of G (L) takes a value of M _ a _ T, H (L, M _ a _ T) is the same, N1 and N2 are rational numbers, for example, default values of N1 and N2 may be 0. max (a, b) represents finding the larger of a and b; min (a, b) represents finding the smaller of a and b.

In some embodiments, K1, K2 are not both 0 and K3 is not 0.

Illustratively, h (l) is a few examples of:

or

It should be noted that, in the embodiment of the present application, only the process of acquiring the primary spline parameter in the second parameter may be included, and the process of acquiring the parameter other than the primary spline parameter in the second parameter is not required, that is, the following processing process may not be required.

In some optional embodiments, the second parameter includes a cubic spline parameter, and the cubic spline parameter includes interpolation values TH1[1], TH2[1], TH3[1] of a cubic spline on the second tone mapping curve, where TH1[1] represents a minimum value of luminance values of pixels in a first interval of the cubic spline, TH2[1] represents a maximum value of luminance values of pixels in the first interval of the cubic spline and a minimum value of luminance values of pixels in a second interval of the cubic spline, and TH3[1] represents a maximum value of luminance values of pixels in the second interval of the cubic spline. Illustratively, TH1[1] may be an example of TH1D, TH2[1] may be an example of TH2D, and TH3[1] may be an example of TH 3D.

As a possible implementation mode, the interpolation values TH1[1], TH2[1] and TH3[1] of the cubic splines can be obtained by calculation according to a preset offset value of calculation correlation values of a second primary spline curve parameter TH3[0] and interpolation values TH1[1], TH2[1] and TH3[1] of the cubic splines in the first parameters. Illustratively, TH1[1], TH2[1], TH3[1] satisfy the following formulas (32) to (34):

TH1[1]=TH3[0] (32)

TH2[1]=TH1[1]+B (33)

TH3[1]=TH2[1]+C*TH2[1]-D*TH1[1] (34)

b, C and D are preset values of interpolation values TH1[1], TH2[1] and TH3[1] of the cubic spline for calculating correlation values, B is a preset deviation value corresponding to the brightness value of the pixel point in the dark area transition area, and C and D are preset weighting coefficients corresponding to the brightness value of the pixel point in the bright area. Illustratively, the default value for B may be 0.15, and the default values for C and D may be 0.5.

As another possible implementation manner, the interpolation values TH1[1], TH2[1] and TH3[1] of the cubic splines can be obtained by calculation according to the second primary spline curve parameter TH3[0] in the first parameters and the calculation correlation values TH1[1], TH2[1] and TH3[1] of the cubic splines. Illustratively, TH1[1], TH2[1], TH3[1] satisfy the following formulas (35) to (37):

TH1[1]=3Spline_TH[i][0][w] (35)

TH2[1]=3Spline_TH[i][0][w]+3Spline_TH_Delta1[i][1][w] (36)

TH3[1]=3Spline_TH[i][0][w]+3Spline_TH_Delta1[i][1][w]+3Spline_TH_Delta1[i][2][w] (37)

wherein, 3Spline _ TH [ i ] [0] [ w ], 3Spline _ TH _ Delta1[ i ] [1] [ w ], and 3Spline _ TH _ Delta1[ i ] [2] [ w ] are interpolation values TH1[1], TH2[1], and TH3[1] of cubic splines extracted from metadata, and correlation values are calculated.

In some alternative embodiments, the coordinates (e.g., Y-coordinates) corresponding to TH1[1], TH2[1], TH3[1] in the second tone mapping curve may be obtained, and may be represented as VA1, VA2 and VA3, respectively, for example. Wherein the Y coordinate of the first-order spline in the second tone mapping curve at TH3[0] is the same as the Y coordinate of the cubic spline in the second tone mapping curve at TH1[1], and the first derivative of the first-order spline at TH3[0] is the same as the first derivative of the cubic spline at TH1[1 ].

In some alternative embodiments, the Y coordinate of the first cubic spline in the second tone mapping curve at TH2[1] is the same as the Y coordinate of the second cubic spline in the second tone mapping curve at TH2[1], and the first derivative of the first cubic spline at TH2[1] is the same as the first derivative of the second cubic spline at TH2[1 ].

In some alternative embodiments, characterized in that the Y coordinate of the second cubic spline in the second tone mapping curve at TH3[1] is the same as the Y coordinate of the third tone mapping function in the second tone mapping curve at TH3[1], and the first derivative of the second cubic spline at TH3[1] is the same as the first derivative of the third tone mapping function at TH3[1 ].

Illustratively, equation (38) may be obtained from a linear spline in the second tone mapping curve described above:

F(L)=MB[0][0]×L (38)

then, L is set to TH1, and the coordinate VA1 of TH1 is calculated to satisfy the following formula (39):

VA1=MB[0][0]×TH[1] (39)

next, MA [0] [1], MA [1] [1] are obtained from the first cubic spline in the second tone mapping curve, satisfying the following equations (40) and (41):

MA[0][1]=VA1 (40)

MA[1][1]=VA2 (41)

then, the first derivative GD1 of the first cubic spline in the second tone mapping curve is calculated, MB [0] [1] ═ GD1, and the first derivative GD3 of the second cubic spline in the second tone mapping curve at TH3[1] is calculated, satisfying the following equations (42) and (43):

MB[0][1]=GD1=MB[0][0] (42)

GD3=m_a×m_m×m_p×K3×m_n×TH3[1]m_m-1×DGD3(L) (43)

wherein the content of the first and second substances,

then, the value VA2[0] of the first cubic spline (i.e., the first cubic spline) curve at TH2[1] in the second tone mapping curve is calculated, the value VA3[0] of the second cubic spline (i.e., the second cubic spline) curve at TH3[1] is calculated, and VA3[0] is made equal to VA 3.

The derivative GD3[0] of the second cubic spline at TH3[1] is calculated such that GD3[0] is GD 3.

The first and second cubic spline curves are calculated at first derivatives GD2[0], GD2[1] of TH2[1], respectively, such that GD2[0] is GD2[1 ].

The second derivatives of the two cubic spline curves at TH2[1] were calculated GGD2[0], GGD2[1], making GGD2[0] ═ GGD2[1 ].

In summary, the following equation (44) can be obtained:

wherein DTH2 (TH2[1] -TH1[1]), DTH3 (TH3[1] -TH2[1 ]).

Through the calculation, parameters such as MC [0] [1], MD [0] [1], MB [1] [1], MC [1] [1], MD [1] and the like in the second parameters can be obtained by combining other conditions.

Therefore, the embodiment of the present application further adjusts the parameter of the first tone mapping curve, so that the output brightness of a certain point on the tone mapping curve (i.e. the second tone mapping curve) corresponding to the adjusted curve parameter (i.e. the second parameter) is not higher than the input brightness corresponding to the certain point, thereby helping to avoid the abnormal phenomenon that the brightness of the pixel of the terminal device after mapping is brighter than that of the original image when the maximum display brightness of the image is close to the maximum display brightness of the display device.

The method of dynamic range mapping of the embodiment of the present application is described in detail above with reference to fig. 9, and the apparatus of dynamic range mapping of the embodiment of the present application is described below with reference to fig. 10 and 11, it should be understood that the apparatus of dynamic range mapping described in fig. 10 and 11 is capable of performing the steps of the method of dynamic range mapping shown in fig. 9, and the definitions of the steps in fig. 9 above are also applicable to the apparatus shown in fig. 10 and 11, and therefore, when the apparatus shown in fig. 10 and 11 is described below, repeated descriptions are appropriately omitted for brevity.

Fig. 10 is a schematic block diagram of an apparatus 1000 for dynamic range mapping according to an embodiment of the present application. The apparatus 1000 comprises an obtaining unit 1010, a processing unit 1020 and a mapping unit 1030.

An obtaining unit 1010, configured to obtain display parameters of the terminal device.

The obtaining unit 1010 is further configured to obtain feature information of the image data.

The obtaining unit 1010 is further configured to obtain a first parameter of a first tone mapping curve of the image data.

A processing unit 1020, configured to obtain a second parameter of a second tone mapping curve according to the first parameter, the display parameter of the terminal device, and the feature information of the image data when a preset condition is met, where output luminance at a first point on the second tone mapping curve is not higher than input luminance at the first point on the second tone mapping curve.

A mapping unit 1030, configured to perform dynamic range mapping on the image data according to the second parameter of the second tone mapping curve.

In some implementations of the present application, the preset condition is satisfied when any one of the following conditions is met:

when performing tone mapping on image data according to the first parameter, the output brightness at a second point on the first tone mapping curve is higher than the input brightness at the second point on the first tone mapping curve; or

The parameter pP1 in the first parameter is larger than a first value Tp, wherein the first value Tp is obtained according to the aP1 in the first parameter and the preset correspondence relationship between aP1 and pP 1; or

The parameter aP1 in the first parameter is larger than a second value Ta, wherein the second value Ta is obtained according to the pP1 in the first parameter and the preset corresponding relation between aP1 and pP 1; or

The product of the parameter aP1 and the parameter pP1 in the first parameter is greater than a third value Tap, wherein the third value Tap is a preset rational number.

In some implementations of the application, the second parameter includes a first one-time spline curve parameter, and the first one-time spline curve parameter includes a slope MB [0] [0] of a first one-time spline in the second tone mapping curve or a maximum value TH3[0] of luminance values of interval pixel points of the first one-time spline.

In some implementations of the application, the first parameter includes a second linear spline parameter, the second linear spline parameter includes a slope MB _ mid [0] [0] of a second linear spline in the first tone mapping curve and a maximum value TH3_ mid [0] of a luminance value of an interval pixel point of the second linear spline, the display parameter includes a maximum display luminance MaxDisplay of the terminal device, and the feature information includes a maximum luminance correction value max _ lum of the image data;

wherein, the processing unit 1020 is specifically configured to:

and adjusting the curve parameters MB _ mid [0] [0] and TH3_ mid [0] according to the maximum display brightness MaxDisplay and the maximum brightness correction value max _ lum to obtain the curve parameters MB [0] [0] and TH3[0 ].

In certain implementations of the present application, the curvilinear parameters MB _ mid [0] [0] and TH3_ mid [0], and the curvilinear parameters MB [0] [0] and TH3[0], satisfy the following equations:

wherein the content of the first and second substances,

or

Wherein

Or

Wherein, L is input signal, G (L) is inverse function of function H (L) corresponding to tone mapping curve, M _ a, M _ b, M _ M, M _ N, k1, k2, k3 are curve parameters, G (L, M _ a _ T) represents G (L) value corresponding to input variable L when parameter M _ a of G (L) is M _ a _ T, H (L, M _ a _ T), N1, N2 are rational numbers, max (a, b) represents solving larger value of a and b, min (a, b) represents solving smaller value of a and b, H (L) is inverse function of function H (L) corresponding to tone mapping curve, min (L, M _ N, k _ T) represents G (L) value corresponding to input variable L when parameter M _ a of G (L) is M _ a _ T, H (L, M _ a _ T) represents rational number, max (a, b) represents solving larger value of a and b, min (a, H (L) represents solving smaller value of a and b

Alternatively, the first and second electrodes may be,

in some implementations of the present application, the second parameter includes a cubic spline curve parameter, and the cubic spline curve parameter includes interpolation values TH1[1], TH2[1], TH3[1] of a cubic spline on the second tone mapping curve, where TH1[1] represents a minimum value of luminance values of pixels in a first interval of the cubic spline, TH2[1] represents a maximum value of luminance values of pixels in the first interval of the cubic spline and a minimum value of luminance values of pixels in a second interval of the cubic spline, and TH3[1] represents a maximum value of luminance values of pixels in the second interval of the cubic spline.

In certain implementations of the present application, the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline are derived from preset offset values of a second one of the first parameters TH3[0], the interpolation values TH1[1], TH2[1], TH3[1], as follows:

TH1[1]=TH3[0];

TH2[1]=TH1[1]+B;

TH3[1]=TH2[1]+C*TH2[1]-D*TH1[1];

b, C and D are preset values of interpolation values TH1[1], TH2[1] and TH3[1] of the cubic spline for calculating correlation values, B is a preset deviation value corresponding to the brightness value of the pixel point in the dark area transition area, and C and D are preset weighting coefficients corresponding to the brightness value of the pixel point in the bright area.

In certain implementations of the present application, the interpolation values TH1[1], TH2[1], TH3[1] of the cubic spline are calculated from the calculated correlation values of the second one of the first parameters TH3[0], the interpolation values TH1[1], TH2[1], TH3[1], as follows:

TH1[1]=3Spline_TH[i][0][w];

TH2[1]=3Spline_TH[i][0][w]+3Spline_TH_Delta1[i][1][w];

TH3[1]=3Spline_TH[i][0][w]+3Spline_TH_Delta1[i][1][w]+3Spline_TH_Delta1[i][2][w];

wherein, 3Spline _ TH [ i ] [0] [ w ], 3Spline _ TH _ Delta1[ i ] [1] [ w ], and 3Spline _ TH _ Delta1[ i ] [2] [ w ] are calculation correlation values of the interpolation values TH1[1], TH2[1], TH3[1] extracted from the metadata.

In certain implementations of the present application, the Y coordinate of the primary spline in the second tone mapping curve at TH3[0] is the same as the Y coordinate of the cubic spline in the second tone mapping curve at TH1[1], and the first derivative of the primary spline at TH3[0] is the same as the first derivative of the cubic spline at TH1[1 ].

In certain implementations of the present application, the Y coordinate of a first cubic spline in the second tone mapping curve at TH2[1] is the same as the Y coordinate of a second cubic spline in the second tone mapping curve at TH2[1], and the first derivative of the first cubic spline at TH2[1] is the same as the first derivative of the second cubic spline at TH2[1 ].

In certain implementations of the present application, the Y coordinate of the second cubic spline in the second tone mapping curve at TH3[1] is the same as the Y coordinate of the third tone mapping function in the second tone mapping curve at TH3[1], and the first derivative of the second cubic spline at TH3[1] is the same as the first derivative of the third tone mapping function at TH3[1 ].

In some implementations of the present application, the obtaining unit 1010 is specifically configured to:

acquiring metadata of the image data;

and determining a first parameter of the first tone mapping curve according to the metadata and the display parameter.

Fig. 11 is a hardware configuration diagram of an apparatus 1100 for dynamic range mapping according to an embodiment of the present application. The apparatus 1100 shown in fig. 11 can be regarded as a computer device, and the apparatus 1100 can be implemented as an implementation of the apparatus for dynamic range mapping according to the embodiment of the present application, and also as an implementation of the method for dynamic range mapping according to the embodiment of the present application, where the apparatus 1100 includes a processor 1101, a memory 1102, an input/output interface 1103, a bus 1105, and a communication interface 1104. The processor 1101, the memory 1102, the input/output interface 1103 and the communication interface 1104 are connected to each other through a bus 1105.

The processor 1101 may be a general Central Processing Unit (CPU), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits, configured to execute related programs to implement the functions required by the modules in the apparatus for processing media data according to the embodiment of the present application, or to execute the method for processing media data according to the embodiment of the present application. The processor 1101 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The processor 1101 may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 1102, and the processor 1101 reads the information in the memory 1102, and completes the functions required to be executed by the modules included in the apparatus for processing media data according to the embodiment of the present application, or performs the method for processing media data according to the embodiment of the method of the present application, in combination with the hardware thereof.

The memory 1102 may be a Read Only Memory (ROM), a static memory device, a dynamic memory device, or a Random Access Memory (RAM). The memory 1102 may store an operating system and other application programs. When the functions required to be executed by the modules included in the apparatus for processing media data according to the embodiment of the present application or the method for processing media data according to the embodiment of the present application are implemented by software or firmware, the program codes for implementing the technical solutions provided by the embodiment of the present application are stored in the memory 1102, and the processor 1101 executes the operations required to be executed by the modules included in the apparatus for processing media data or the method for processing media data according to the embodiment of the present application.

The input/output interface 1103 is used for receiving input data and information, and outputting data such as operation results.

Communication interface 1104 enables communication between apparatus 1100 and other devices or communication networks using transceiver means such as, but not limited to, a transceiver. May be used as the acquiring module or the sending module in the processing device.

Bus 1105 may include pathways to transfer information between various components of apparatus 1100, such as processor 1101, memory 1102, input/output interface 1103, and communication interface 1104.

It should be noted that although the apparatus 1100 shown in fig. 11 only shows the processor 1101, the memory 1102, the input/output interface 1103, the communication interface 1104 and the bus 1105, in a specific implementation, it should be understood by those skilled in the art that the apparatus 1100 also comprises other devices necessary for normal operation, for example, a display for displaying video data to be played. Also, those skilled in the art will appreciate that the apparatus 1100 may also include hardware components to implement other additional functions, according to particular needs. Further, those skilled in the art will appreciate that apparatus 1100 may also include only those components necessary to implement embodiments of the present application, and need not include all of the components shown in FIG. 11.

Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.

Embodiments of the present application further provide a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to perform the above-mentioned method for dynamic range mapping.

Embodiments of the present application also provide a computer program product containing instructions which, when run on a computer, cause the computer to perform the above-described method of dynamic range mapping.

Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.

It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.

The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

48页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:墨水屏终端的图像处理方法、装置、存储介质及智能设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类