Method and device for processing high dynamic range images

By calculating the reference maximum value and the corrected maximum value of the HDR image, and adjusting the dynamic range of the HDR image using graded intervals, the problems of lost brightness levels and excessive darkness in the existing technology are solved, thus improving the image display effect.

CN112686809BActive Publication Date: 2024-11-22HUAWEI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN201910995765.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-18
Publication Date
2024-11-22
Estimated Expiration
2039-10-18

AI Technical Summary

Technical Problem

Existing technologies, when adjusting the dynamic range of high dynamic range images, result in the loss of brightness levels and poor display effects, especially when using the maximum and minimum brightness parameters of the display device, the adjusted image may be too dark.

Method used

By acquiring image information from HDR images, calculating the reference maximum value and the correction maximum value, and adjusting the dynamic range of HDR images using graded intervals, the system avoids relying solely on the maximum and minimum brightness of the displayed content. Instead, it uses a percentage of the maximum value of the RGB components for correction, thereby improving the accuracy of the graded range.

Benefits of technology

It effectively avoids the problem of overly dark adjusted images, improves the display effect of HDR images at different dynamic range levels, and enhances visual performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112686809B_ABST
    Figure CN112686809B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method and device for processing a high dynamic range image, which is applied to the field of image processing, and obtains image information of a high dynamic range HDR image to be processed, wherein the HDR image includes multiple pixels, and the image information includes a first percentage, a maximum value of the RGB component of the first pixel corresponding to the first percentage, a second percentage and a maximum value of the RGB component of the second pixel corresponding to the second percentage, wherein the first percentage and the second percentage are both greater than 0 and less than 1; according to the first percentage, the maximum value of the RGB component of the first pixel corresponding to the first percentage, the second percentage and the maximum value of the RGB component of the second pixel corresponding to the second percentage, a reference maximum value of the HDR image is determined; according to the reference maximum value and multiple preset grading intervals, a corrected maximum value of the HDR image is determined; according to the corrected maximum value of the HDR image, the dynamic range of the HDR image is adjusted. The method and device for processing a high dynamic range image provided by the embodiment of the present application can improve the display effect of a high dynamic range image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing, and more specifically, to a method and device for processing high dynamic range images. Background Art

[0002] Dynamic Range (DR) is used in many fields to represent the ratio of the maximum and minimum values ​​of a variable. In digital images, the dynamic range represents the ratio between the maximum brightness and the minimum brightness within the displayable range of the image, that is, the number of grayscale levels from the "brightest" to the "darkest" of the image. Its unit is candela per square meter (cd / m2), which can also be expressed as nits. The larger the dynamic range of an image, the richer the brightness levels it can represent, and the more realistic the visual effect of the image. Since the dynamic range of natural scenes in the real world is between 10-3 and 106, the dynamic range is very large, so it is called High Dynamic Range (HDR). Compared with high dynamic range images, the dynamic range of ordinary images is low dynamic range (Low Dynamic Range, LDR).

[0003] At present, display devices with a dynamic range of less than 0.1 to 400 nits are generally called standard dynamic range (SDR) display devices; those with a dynamic range of more than 0.01 to 540 nits are called high dynamic range (HDR) display devices. Different high dynamic range display devices have different display dynamic ranges, such as 0.01 to 540 nits high dynamic range display devices, 0.005 to 1000 nits high dynamic range display devices, etc. In order to make HDR images adapt to HDR display devices with different dynamic ranges, it is necessary to adjust the dynamic range of HDR images (compress or stretch) to adjust the high dynamic range of HDR images to the display capability range of the display device for display.

[0004] In the prior art, the adjustment of the dynamic range of HDR images is only related to the maximum brightness and minimum brightness of the image display content, the maximum brightness value and the minimum brightness value that the display device can display, and other parameters. Using only these parameters will result in a large loss of brightness levels in the HDR image, unclear brightness contrast, and poor display effect of the adjusted HDR image. Summary of the invention

[0005] The embodiments of the present application provide a method and device for processing HDR images, which can improve the display effect of HDR images.

[0006] In a first aspect, an embodiment of the present application provides a method for processing a high dynamic range image, the method comprising:

[0007] Acquire image information of a high dynamic range HDR image to be processed, the HDR image comprising a plurality of pixels, the image information comprising a first percentage, a maximum RGB component value of a first pixel corresponding to the first percentage, a second percentage, and a maximum RGB component value of a second pixel corresponding to the second percentage, the first percentage indicating the percentage of at least one pixel among the plurality of pixels whose maximum RGB component value is less than or equal to the maximum RGB component value of the first pixel among the plurality of pixels, the second percentage indicating the percentage of at least one pixel among the plurality of pixels whose maximum RGB component value is less than or equal to the maximum RGB component value of the second pixel among the plurality of pixels, the maximum RGB component value indicating the maximum value among an R component, a G component, and a B component of a pixel, and the first percentage and the second percentage being both greater than 0 and less than 1;

[0008] Determine a reference maximum value of the HDR image according to the first percentage, the maximum value of the RGB components of the first pixel corresponding to the first percentage, the second percentage, and the maximum value of the RGB components of the second pixel corresponding to the second percentage;

[0009] Determine a corrected maximum value of the HDR image according to the reference maximum value and a plurality of preset grading intervals, wherein the grading interval is used to grade the reference maximum value, each grading interval in the plurality of grading intervals corresponds to a value range of the reference maximum value, and the corrected maximum value is used to correct a maximum value among the maximum values ​​of the RGB components of the plurality of pixels included in the HDR image;

[0010] The dynamic range of the HDR image is adjusted according to the corrected maximum value of the HDR image.

[0011] In the method for processing an HDR image provided by the embodiment of the present application, since the maximum value of the RGB component of the first pixel and the maximum value of the RGB component of the second pixel are not the maximum brightness of the display content of the HDR image or the minimum brightness of the display content, the reference maximum values ​​obtained based on the above pixels are graded, and the corrected maximum value of the HDR image is calculated based on the reference maximum value, which can improve the grading accuracy of HDR images with different levels of dynamic range. Therefore, applying the corrected maximum value to the adjustment of the dynamic range of the HDR image can improve the display effect of the HDR image.

[0012] Optionally, the above method can be executed by an image processing device.

[0013] Optionally, the first percentage may be a first ratio, and the second percentage may be a second ratio.

[0014] As an optional embodiment, taking an HDR image including 4 pixels as an example, the maximum value of the RGB component of the first pixel is 80, the maximum value of the RGB component of the second pixel is 30, the maximum value of the RGB component of the third pixel is 60, and the maximum value of the fourth RGB component is 55, then 25% corresponds to the second pixel, 50% corresponds to the fourth pixel, 75% corresponds to the third pixel, and 100 corresponds to the first pixel.

[0015] That is to say, among the 4 pixels, the pixel whose maximum value of the RGB component is less than or equal to 30 (the 2nd pixel) accounts for 25% of the 4 pixels, the pixels whose maximum value of the RGB component is less than or equal to 55 (the 2nd and 4th pixels) account for 50% of the 4 pixels, the pixels whose maximum value of the RGB component is less than or equal to 60 (the 2nd, 4th and 3rd pixels) account for 75% of the 4 pixels, and the pixels whose maximum value of the RGB component is less than or equal to 80 (the 2nd, 4th, 3rd and 1st pixels) account for 100% of the 4 pixels.

[0016] It should be noted that the multiple pixels included in the above-mentioned HDR image can be understood as the multiple pixels included in the effective display area of ​​the HDR image, and the effective display area can be a partial area or the entire area of ​​the HDR image.

[0017] For example, the effective display area of ​​the HDR image may be a rectangular area determined by a display horizontal size and a display vertical size.

[0018] Optionally, the image processing device may obtain image information of the HDR image in a variety of ways, which is not limited in the embodiments of the present application.

[0019] In a possible implementation, the image processing device may calculate the HDR image using an existing method to obtain the image information.

[0020] In another possible implementation manner, the image processing device may obtain the image information through metadata carried by the HDR image.

[0021] Optionally, the image processing device may determine the reference maximum value of the HDR image in a variety of ways based on the first percentage, the maximum value of the RGB component of the first pixel corresponding to the first percentage, the second percentage, and the maximum value of the RGB component of the second pixel corresponding to the second percentage. This is not limited to the embodiments of the present application.

[0022] In a possible implementation, the image information also includes an average of the maximum values ​​of the RGB components of the multiple pixels, and determining the reference maximum value of the HDR image based on the first percentage, the maximum value of the RGB component of the first pixel corresponding to the first percentage, the second percentage, and the maximum value of the RGB component of the second pixel corresponding to the second percentage includes: determining the reference maximum value based on the first percentage, the maximum value of the RGB component of the first pixel, the second percentage and the maximum value of the RGB component of the second pixel, the maximum value of the RGB component maximum values ​​of the multiple pixels, and the average of the maximum values ​​of the RGB component of the multiple pixels.

[0023] In a possible implementation manner, the reference maximum value MAX may be determined by the following formula:

[0024]

[0025] in, The maximum_maxrgb represents the maximum value among the maximum values ​​of the RGB components of the multiple pixels, the average_maxrgb represents the average value among the maximum values ​​of the RGB components of the multiple pixels, the K1 represents the first percentage, and the represents the maximum value of the RGB components of the first pixel, K2 represents the second percentage, represents the maximum value of the RGB components of the second pixel, F() represents a preset function, B, K1 and K2 are preset values, 0 <B<1,K1-K2≥0.5,0<K1<1,0<K2<1。

[0026] Optionally, the above F() function may be a constant function or an increasing function, which is not limited in the embodiment of the present application.

[0027] For example, F(x) = x, or F(x) = x N , or F(x)=logx, or F(x)=ax+b, where a and b are constants.

[0028] In the method for processing an HDR image provided by an embodiment of the present application, maximum_maxrgb is the maximum value of the RGB component of the pixel corresponding to 100%, 2×average_maxrgb is the maximum value of the RGB component of the pixel corresponding to 100%, K1-K2≥0.5 is the maximum value of the RGB component of the pixel corresponding to more than 50%, and by setting different weights for these three dimensions, the final reference maximum value is obtained, and the maximum value of the maximum values ​​of the RGB components of the HDR image is finally adjusted according to the reference maximum value, which can avoid the situation in the prior art where the adjusted image is too dark when the maximum brightness adjustment is used.

[0029] In a possible implementation manner, the reference maximum value MAX may be determined by the following formula:

[0030]

[0031] Wherein, K1 represents the first percentage, represents the maximum value of the RGB components of the first pixel, K2 represents the second percentage, Indicates the maximum value of the RGB components of the second pixel, A, K1 and K2 are preset values, 0 <A<1,0<K1<1,0<K2<1。

[0032] Using the method for processing HDR images provided in an embodiment of the present application, since the above-mentioned PK1 and PK2 are two pixels in the HDR image except for the maximum brightness and minimum brightness of the display content, the reference maximum value is calculated through these two pixels, and the maximum value of the RGB component maximum values ​​of the HDR image is finally adjusted according to the reference maximum value, which can avoid the situation in the prior art where the adjusted image is too dark when the maximum brightness adjustment is used.

[0033] In a possible implementation, each grading interval corresponds to an expression, and the expression is used to calculate the corrected maximum value of the HDR. Determining the corrected maximum value of the HDR image based on the reference maximum value and a plurality of preset grading intervals includes: determining a first grading interval to which the reference maximum value belongs from the plurality of grading intervals, the first grading interval corresponding to a first expression; and determining the corrected maximum value based on the first expression.

[0034] In a possible implementation, the modified maximum value maximum_maxrgb1 of the HDR image may be determined by the following formula:

[0035]

[0036] Among them, the MaxRefDisplay represents the maximum display brightness of the display device used to display the HDR image to be processed, the MIN represents a preset grading threshold, and the MAX represents the reference maximum value.

[0037] In a possible implementation, the modified maximum value maximum_maxrgb1 of the HDR image may be determined by the following formula:

[0038]

[0039] Wherein, the maximux_maxrgb represents the maximum value among the maximum RGB components of the multiple pixels, the MAX represents the reference maximum value, the A represents a preset grading threshold, min() represents the operation of taking the minimum value, and f() represents a non-linear function or a linear function.

[0040] In a possible implementation manner, the method further includes: verifying the accuracy of the corrected maximum value according to a third percentage, the maximum RGB component value of the third pixel corresponding to the third percentage in the HDR image, the maximum GRB component value of the fourth pixel corresponding to the third percentage in the processed image, a fourth percentage, the maximum RGB component value of the fifth pixel corresponding to the fourth percentage in the HDR image, and the maximum GRB component value of the sixth pixel corresponding to the fourth percentage in the processed HDR image, where the processed image is the image obtained by adjusting the dynamic range of the HDR image.

[0041] It should be noted that the accuracy of the corrected maximum value can also be understood as the grading accuracy of the HDR image.

[0042] In a possible implementation manner, the verifying the accuracy of the corrected maximum value according to a third percentage, the maximum RGB component value of the third pixel corresponding to the third percentage in the HDR image, the maximum GRB component value of the fourth pixel corresponding to the third percentage in the output image, a fourth percentage, the maximum RGB component value of the fifth pixel corresponding to the fourth percentage in the HDR image, and the maximum GRB component value of the sixth pixel corresponding to the fourth percentage in the output HDR image includes:

[0043] When And At this time, it is determined that the corrected maximum value is accurate, where K3 - K4 < M, M is a preset first threshold, T is a preset second threshold, 0 < T < 2, K3 represents the third percentage, the Represents the maximum RGB component value of the third pixel, Represents the maximum RGB component value of the fourth pixel, K4 represents the fourth percentage, the Represents the maximum RGB component value of the fifth pixel, Represents the maximum RGB component value of the sixth pixel.

[0044] In a second aspect, an embodiment of the present application further provides an image processing method, and the method includes:

[0045] Acquire image information of an image to be processed, the image to be processed comprising a plurality of pixels, the image information comprising a first ratio, a first RGB component maximum value, a second ratio, and a second RGB component maximum value, the first ratio representing a ratio of the number of pixels whose RGB component maximum value is less than or equal to the first RGB component maximum value among the plurality of pixels to the number of the plurality of pixels, the second ratio representing a ratio of the number of pixels whose RGB component maximum value is less than or equal to the second RGB component maximum value among the plurality of pixels to the number of the plurality of pixels, the RGB component maximum value representing a maximum value of one of the R component, the G component, and the B component of a pixel;

[0046] Determine a reference maximum value of the image to be processed according to the first ratio, the maximum value of the first RGB component, the second ratio, and the maximum value of the second RGB component;

[0047] According to the reference maximum value and a plurality of preset grading intervals, adjusting the maximum value among the maximum values ​​of the RGB components of the plurality of pixels to determine a corrected maximum value of the image to be processed, wherein each grading interval in the plurality of grading intervals corresponds to a value range of the reference maximum value;

[0048] The dynamic range of the image to be processed is adjusted according to the corrected maximum value of the image to be processed.

[0049] In a possible implementation, the image information also includes an average of the maximum values ​​of the RGB components of the multiple pixels, and determining the reference maximum value of the image to be processed based on the first ratio, the first RGB component maximum value, the second ratio and the second RGB component maximum value includes: determining the reference maximum value based on the first ratio, the first RGB component maximum value, the second ratio and the second RGB component maximum value, the maximum value among the RGB component maximum values ​​of the multiple pixels, and the average of the RGB component maximum values ​​of the multiple pixels.

[0050] In a possible implementation manner, the reference maximum value MAX is determined by the following formula:

[0051]

[0052] in, The maximum_maxrgb represents the maximum value among the maximum values ​​of the RGB components of the multiple pixels, the average_maxrgb represents the average value of the maximum values ​​of the RGB components of the multiple pixels, the K1 represents the first ratio, represents the maximum value of the first RGB component, K2 represents the second ratio, represents the maximum value of the second RGB component, F() represents a preset function, B, K1 and K2 are preset values, 0 <B<1,K1-K2≥0.5,0<K1<1,0<K2<1。

[0053] In a possible implementation manner, the reference maximum value MAX is determined by the following formula:

[0054]

[0055] Wherein, K1 represents the first ratio, represents the maximum value of the first RGB component, K2 represents the second ratio, Indicates the maximum value of the second RGB component. A, K1 and K2 are preset values. 0 <A<1,0<K1<1,0<K2<1。

[0056] In a possible implementation, each of the grading intervals corresponds to an expression, and the expression is used to calculate the corrected maximum value of the image to be processed. The corrected maximum value maximum_maxrgb1 of the image to be processed is determined by the following formula:

[0057]

[0058] Wherein, the MaxRefDisplay represents the maximum display brightness of the display device used to display the image to be processed, the MIN represents a preset grading threshold, and the MAX represents the reference maximum value.

[0059] In a possible implementation, the method further includes: verifying the accuracy of the corrected maximum value according to a third ratio, a third RGB component maximum value, a fourth GRB component maximum value, a fourth ratio, a fifth RGB component maximum value, and a sixth GRB component maximum value, wherein the third ratio represents a ratio of the number of pixels whose RGB component maximum value is less than or equal to the third RGB component maximum value among the multiple pixels to the number of the multiple pixels, the fourth GRB component maximum value satisfies that the ratio of the number of pixels whose RGB component maximum value is less than or equal to the fourth RGB component maximum value among the pixels of the processed image to the number of pixels of the processed image is the third ratio, the fourth ratio represents a ratio of the number of pixels whose RGB component maximum value is less than or equal to the fifth RGB component maximum value among the multiple pixels to the number of the multiple pixels, the sixth GRB component maximum value satisfies that the ratio of the number of pixels whose RGB component maximum value is less than or equal to the sixth RGB component maximum value among the pixels of the processed image to the number of pixels of the processed image is the fourth ratio, and the processed image is an image after the dynamic range of the image to be processed is adjusted.

[0060] In a possible implementation, verifying the accuracy of the corrected maximum value according to the third ratio, the maximum value of the third RGB component, the maximum value of the fourth GRB component, the fourth ratio, the maximum value of the fifth RGB component, and the maximum value of the sixth GRB component includes:

[0061] When and , it is determined that the corrected maximum value is accurate, where K3 - K4 < M, M is a preset first threshold, T is a preset second threshold, 0 < T < 2, K3 represents the third ratio, and the represents the maximum value of the third RGB component, P′ K3 represents the maximum value of the fourth RGB component, K4 represents the fourth ratio, and the represents the maximum value of the fifth RGB component, represents the maximum value of the sixth RGB component.

[0062] In a possible implementation, the method further includes at least one of the following steps:

[0063] Determine the maximum value of the first RGB component according to the first ratio and the multiple pixels;

[0064] Determine the maximum value of the second RGB component according to the second ratio and the multiple pixels;

[0065] Determine the maximum value of the third RGB component according to the third ratio and the multiple pixels;

[0066] Determine the maximum value of the fourth RGB component according to the third ratio and the pixels of the processed image;

[0067] Determine the maximum value of the fifth RGB component according to the fourth ratio and the multiple pixels; or,

[0068] Determine the maximum value of the sixth RGB component according to the fourth ratio and the pixels of the processed image.

[0069] In a third aspect, an embodiment of the present application further provides a device for processing high-dynamic range images, and the device includes:

[0070] an acquisition unit, configured to acquire image information of a high dynamic range (HDR) image to be processed, the HDR image comprising a plurality of pixels, the image information comprising a first percentage, a maximum RGB component value of a first pixel corresponding to the first percentage, a second percentage, and a maximum RGB component value of a second pixel corresponding to the second percentage, the first percentage indicating a percentage of at least one pixel among the plurality of pixels whose maximum RGB component value is less than or equal to a maximum RGB component value of the first pixel, the second percentage indicating a percentage of at least one pixel among the plurality of pixels whose maximum RGB component value is less than or equal to a maximum RGB component value of the second pixel, the maximum RGB component value indicating a maximum value among an R component, a G component, and a B component of a pixel, and the first percentage and the second percentage being both greater than 0 and less than 1;

[0071] a determining unit, configured to determine a reference maximum value of the HDR image according to the first percentage, a maximum value of the RGB components of a first pixel corresponding to the first percentage, the second percentage, and a maximum value of the RGB components of a second pixel corresponding to the second percentage; and to determine a corrected maximum value of the HDR image according to the reference maximum value and a plurality of preset grading intervals, wherein the grading interval is used to grade the reference maximum value, each of the plurality of grading intervals corresponds to a value range of the reference maximum value, and the corrected maximum value is used to correct a maximum value among the maximum values ​​of the RGB components of the plurality of pixels included in the HDR image;

[0072] An adjustment unit is used to adjust the dynamic range of the HDR image according to the corrected maximum value of the HDR image.

[0073] In a possible implementation, the image information also includes an average of the maximum values ​​of the RGB components of the multiple pixels, and the determination unit is specifically used to determine the reference maximum value based on the first percentage, the maximum value of the RGB component of the first pixel, the second percentage and the maximum value of the RGB component of the second pixel, the maximum value of the RGB component of the multiple pixels, and the average of the maximum values ​​of the RGB component of the multiple pixels.

[0074] In a possible implementation manner, the determining unit is specifically configured to: determine the reference maximum value MAX by using the following formula:

[0075]

[0076] in, The maximum_maxrgb represents the maximum value among the maximum values ​​of the RGB components of the multiple pixels, the average_maxrgb represents the average value among the maximum values ​​of the RGB components of the multiple pixels, the K1 represents the first percentage, and the represents the maximum value of the RGB components of the first pixel, K2 represents the second percentage, represents the maximum value of the RGB components of the second pixel, F() represents a preset function, B, K1 and K2 are preset values, 0 <B<1,K1-K2≥0.5,0<K1<1,0<K2<1。

[0077] In a possible implementation manner, the determining unit is specifically configured to: determine the reference maximum value MAX by using the following formula:

[0078]

[0079] Wherein, K1 represents the first percentage, represents the maximum value of the RGB components of the first pixel, K2 represents the second percentage, Indicates the maximum value of the RGB components of the second pixel, A, K1 and K2 are preset values, 0 <A<1,0<K1<1,0<K2<1。

[0080] In a possible implementation, each grading interval corresponds to an expression, and the expression is used to calculate the corrected maximum value of the HDR. The determination unit is specifically used to: determine a first grading interval to which the reference maximum value belongs from the multiple grading intervals, and the first grading interval corresponds to a first expression; and determine the corrected maximum value according to the first expression.

[0081] In a possible implementation manner, the determining unit is specifically configured to: determine a corrected maximum value maximum_maxrgb1 of the HDR image by using the following formula:

[0082]

[0083] Among them, the MaxRefDisplay represents the maximum display brightness of the display device used to display the HDR image to be processed, the MIN represents a preset grading threshold, and the MAX represents the reference maximum value.

[0084] In a possible implementation, the device further includes: a verification unit, configured to verify the accuracy of the corrected maximum value according to a third percentage, the maximum value of the RGB components of the third pixel corresponding to the third percentage in the HDR image, the maximum value of the GRB components of the fourth pixel corresponding to the third percentage in the output image, a fourth percentage, the maximum value of the RGB components of the fifth pixel corresponding to the fourth percentage in the HDR image, and the maximum value of the GRB components of the sixth pixel corresponding to the fourth percentage in the output HDR image, where the output image is an image obtained by performing dynamic range adjustment on the HDR image.

[0085] In a possible implementation, the verification unit is specifically configured to:

[0086] When and , determine that the corrected maximum value is accurate, where K3 - K4 < M, M is a preset first threshold, T is a preset second threshold, 0 < T < 2, K3 represents the third percentage, the represents the maximum value of the RGB components of the third pixel, represents the maximum value of the RGB components of the fourth pixel, K4 represents the fourth percentage, the represents the maximum value of the RGB components of the fifth pixel, represents the maximum value of the RGB components of the sixth pixel.

[0087] Fourthly, an embodiment of the present application further provides an image processing device, where the device includes:

[0088] an acquisition unit, configured to acquire image information of an image to be processed, where the image to be processed includes a plurality of pixels, and the image information includes a first ratio, a first maximum value of RGB components, a second ratio, and a second maximum value of RGB components. The first ratio represents the ratio of the number of pixels whose maximum value of RGB components is less than or equal to the first maximum value of RGB components to the number of the plurality of pixels, the second ratio represents the ratio of the number of pixels whose maximum value of RGB components is less than or equal to the second maximum value of RGB components to the number of the plurality of pixels, and the maximum value of RGB components represents the maximum value of one of the R component, G component, and B component of a pixel;

[0089] a determining unit, configured to determine a reference maximum value of the image to be processed according to the first ratio, the first RGB component maximum value, the second ratio, and the second RGB component maximum value; and to adjust a maximum value among the RGB component maximum values ​​of the multiple pixels according to the reference maximum value and a plurality of preset grading intervals to determine a corrected maximum value of the image to be processed, wherein each grading interval in the plurality of grading intervals corresponds to a value range of the reference maximum value;

[0090] An adjustment unit is used to adjust the dynamic range of the image to be processed according to the corrected maximum value of the image to be processed.

[0091] In a possible implementation, the image information also includes an average of the maximum values ​​of the RGB components of the multiple pixels, and the determination unit is specifically used to determine the reference maximum value based on the first ratio, the first RGB component maximum value, the second ratio and the second RGB component maximum value, the maximum value among the RGB component maximum values ​​of the multiple pixels, and the average of the RGB component maximum values ​​of the multiple pixels.

[0092] In a possible implementation manner, the determining unit is specifically configured to determine the reference maximum value MAX by using the following formula:

[0093]

[0094] in, The maximum_maxrgb represents the maximum value among the maximum values ​​of the RGB components of the multiple pixels, the average_maxrgb represents the average value of the maximum values ​​of the RGB components of the multiple pixels, the K1 represents the first ratio, represents the maximum value of the first RGB component, K2 represents the second ratio, represents the maximum value of the second RGB component, F() represents a preset function, B, K1 and K2 are preset values, 0 <B<1,K1-K2≥0.5,0<K1<1,0<K2<1。

[0095] In a possible implementation manner, the determining unit is specifically configured to determine the reference maximum value MAX by using the following formula:

[0096]

[0097] Wherein, K1 represents the first ratio, represents the maximum value of the first RGB component, K2 represents the second ratio, Indicates the maximum value of the second RGB component. A, K1, and K2 are preset values, where 0 < A < 1, 0 < K1 < 1, and 0 < K2 < 1.

[0098] In a possible implementation, each of the grading intervals corresponds to an expression for calculating the corrected maximum value of the image to be processed. The determining unit is specifically configured to determine the corrected maximum value maximum_maxrgb1 of the image to be processed through the following formula:

[0099]

[0100] where MaxRefDisplay represents the maximum display brightness of the display device for displaying the image to be processed, MIN represents a preset grading threshold, and MAX represents the reference maximum value.

[0101] In a possible implementation, the apparatus further includes a verification unit configured to verify the accuracy of the corrected maximum value based on a third ratio, a third RGB component maximum value, a fourth GRB component maximum value, a fourth ratio, a fifth RGB component maximum value, and a sixth GRB component maximum value. The third ratio represents the ratio of the number of pixels among the multiple pixels whose RGB component maximum value is less than or equal to the third RGB component maximum value to the total number of the multiple pixels. The fourth GRB component maximum value satisfies that the ratio of the number of pixels among the pixels of the processed image whose RGB component maximum value is less than or equal to the fourth RGB component maximum value to the total number of the pixels of the processed image is the third ratio. The fourth ratio represents the ratio of the number of pixels among the multiple pixels whose RGB component maximum value is less than or equal to the fifth RGB component maximum value to the total number of the multiple pixels. The sixth GRB component maximum value satisfies that the ratio of the number of pixels among the pixels of the processed image whose RGB component maximum value is less than or equal to the sixth RGB component maximum value to the total number of the pixels of the processed image is the fourth ratio. The processed image is the image to be processed after dynamic range adjustment.

[0102] In a possible implementation, the verification unit is specifically configured to:

[0103] When and it is determined that the corrected maximum value is accurate, where K3 - K4 < M, M is a preset first threshold, T is a preset second threshold, 0 < T < 2, K3 represents the third ratio, the represents the third RGB component maximum value, P′ K3 represents the fourth RGB component maximum value, K4 represents the fourth ratio, and the represents the maximum value of the fifth RGB component, Indicates the maximum value of the sixth RGB component.

[0104] In a possible implementation manner, the determining unit is further configured to perform at least one of the following steps:

[0105] Determine a maximum value of the first RGB component according to the first ratio and the plurality of pixels;

[0106] Determine a maximum value of the second RGB component according to the second ratio and the plurality of pixels;

[0107] Determine the third RGB component maximum value according to the third ratio and the plurality of pixels;

[0108] Determining the maximum value of the fourth RGB component according to the third ratio and the pixels of the processed image;

[0109] Determine the maximum value of the fifth RGB component according to the fourth ratio and the plurality of pixels; or,

[0110] The sixth RGB component maximum value is determined according to the fourth ratio and the pixels of the processed image.

[0111] In a fifth aspect, an embodiment of the present application further provides an image processing device, the device comprising a processor and a memory, the processor and the memory being coupled, the processor being used to enable the device to execute the methods described in the above aspects or various possible implementations of the aspects.

[0112] In the sixth aspect, an embodiment of the present application also provides a chip device, comprising: an input interface, an output interface, at least one processor, and a memory, wherein the input interface, the output interface, the processor, and the memory communicate with each other through an internal connection path, and the processor is used to execute the code in the memory, and is characterized in that when the processor executes the code, the chip device implements the methods described in the above aspects or various possible implementation methods of each aspect.

[0113] In a seventh aspect, the present application provides a computer-readable storage medium for storing a computer program, characterized in that the computer program includes instructions for implementing the methods described in the above aspects or various possible implementation methods of each aspect.

[0114] In an eighth aspect, the present application provides a computer program product, which includes instructions, characterized in that when the instructions are executed on a computer, the computer implements the methods described in the above aspects or various possible implementations of the aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0115] Figure 1 This is the image of the PQ photoelectric transfer function.

[0116] Figure 2 This is the image of the HLG photoelectric transfer function.

[0117] Figure 3 This is the image of the SLF photoelectric transfer function.

[0118] Figure 4 A schematic diagram of a dynamic range adjustment curve for a high dynamic range image provided in an embodiment of the present application.

[0119] Figure 5 This is an application scenario of image processing provided in the embodiments of the present application.

[0120] Figure 6 A schematic diagram of a method 100 for processing a high dynamic range image provided in an embodiment of the present application.

[0121] Figure 7 A schematic diagram of an image processing device 200 provided in an embodiment of the present application.

[0122] Figure 8 A schematic diagram of an image processing device 300 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0123] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0124] First, a brief introduction is given to the relevant concepts and technologies involved in the embodiments of the present application.

[0125] Dynamic Range is used in many fields to express the ratio of the maximum value to the minimum value of a variable. In digital images, the dynamic range represents the ratio between the maximum brightness value and the minimum brightness value within the displayable range of the image. The dynamic range in nature is very large. For example, the brightness of a night scene under the starry sky is about 0.001cd / m 2 The sun itself has a brightness of 1,000,000,000 cd / m 2 Among them, cd / m 2 (Candela per square meter) is the SI derived unit for measuring brightness. Thus, the dynamic range of nature reaches 1000,000,000 / 0.001=10 13 order of magnitude.

[0126] However, in real scenes in nature, the brightness of the sun and the brightness of the stars are not obtained at the same time. For natural scenes in the real world, the dynamic range is 10 -3to 10 6 Since this is a very large dynamic range, we usually call it High Dynamic Range (HDR). Compared with the high dynamic range, the dynamic range on ordinary pictures is called Low Dynamic Range (LDR). From this, we can understand that the imaging process of a digital camera is actually a mapping from the high dynamic range of the real world to the low dynamic range of the photo.

[0127] The larger the dynamic range of an image, the more scene details the image displays, the richer the brightness levels, and the more realistic the visual effect. Traditional digital images generally use one byte, that is, 8 bits of space to store a pixel value, while high dynamic range uses floating point numbers with multiple bytes to store a pixel value, so it can represent the high dynamic range of natural scenes.

[0128] 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 save it in the form of a digital image. The purpose of image display is to reproduce the real scene described by a digital image through a display device. The ultimate goal of both is to enable users to obtain the same visual perception as they directly observe the real scene.

[0129] The brightness level of the real scene that can be displayed by light radiation (light signal) is almost linear, so the light signal is also called a linear signal. However, in the process of converting light signals into electrical signals in optical digital imaging, not every light signal corresponds to an electrical signal, and the converted electrical signal is nonlinear. Therefore, the electrical signal is also called a nonlinear signal.

[0130] Optical Electro Transfer Function (OETF) represents the conversion relationship between linear signals and nonlinear signals of image pixels. With the continuous upgrading of display devices, the dynamic range that can be displayed by current display devices is increasing compared with traditional display devices. The existing consumer-grade HDR display can reach 600cd / m 2 , high-end HDR displays can reach 2000cd / m 2, which has far exceeded the display range of traditional SDR display devices. Therefore, the optoelectronic transfer function adapted to traditional SDR display devices in the International Telecommunications Union-RadioCommunications Sector (ITU-R) BT.1886 standard protocol can no longer well express the display performance of current HDR display devices. Therefore, it is necessary to improve the optoelectronic transfer function to adapt to the upgrade of HDR display devices.

[0131] In the embodiment of the present application, there are mainly three types of HDR optoelectronic transfer functions OETF: Perceptual Quantizer (PQ) optoelectronic transfer function, Hybrid Log-Gamma (HLG) optoelectronic transfer function and Scene Luminance Fidelity (SLF) optoelectronic transfer function. These three optoelectronic transfer functions are optoelectronic transfer functions specified by the Audio Video Coding Standard (AVS).

[0132] The PQ photoelectric transfer function is a perceptual quantization photoelectric transfer function proposed based on the brightness perception model of the human eye. Figure 1 , Figure 1 This is the image of the PQ photoelectric transfer function.

[0133] The PQ photoelectric transfer function represents the conversion relationship between the linear signal value of the image pixel and the nonlinear signal value in the PQ domain. The PQ photoelectric transfer function can be expressed as formula (1):

[0134]

[0135] The calculation of each parameter in formula (1) is as follows:

[0136]

[0137] Wherein, L represents the linear signal value, and its value is normalized to [0, 1]; L′ represents the nonlinear signal value, and its value range is [0, 1]; m1, m2, c1, c2, and c3 are PQ photoelectric transfer coefficients.

[0138] The HLG photoelectric transfer function is improved based on the traditional Gamma curve. Figure 2 , Figure 2 This is the image of the HLG photoelectric transfer function.

[0139] The HLG photoelectric transfer function uses the traditional Gamma curve in the low segment and supplements the log curve in the high segment. The HLG photoelectric transfer function represents the conversion relationship from the linear signal value of the image pixel to the nonlinear signal value of the HLG domain. The HLG photoelectric transfer function can be expressed as formula (2):

[0140]

[0141] Wherein, L represents the linear signal value, and its value range is [0, 12], L′ represents the nonlinear signal value, and its value range is [0, 1], a, b, c are HLG photoelectric transfer coefficients, a=0.17883277, b=0.28466892, c=0.55991073.

[0142] The SLF photoelectric transfer function is the optimal curve obtained based on the brightness distribution of the HDR scene while satisfying the optical characteristics of the human eye. Figure 3 , Figure 3 This is the image of the SLF photoelectric transfer function.

[0143] The SLF photoelectric transfer curve represents the conversion relationship between the linear signal value of the image pixel and the nonlinear signal value in the SLF domain. The conversion relationship between the linear signal value of the image pixel and the nonlinear signal value in the SLF domain is shown in formula (3):

[0144]

[0145] Among them, the SLF photoelectric transfer function can be expressed as formula (4):

[0146]

[0147] Wherein, L represents the linear signal value, and its value is normalized to [0,1]; L′ represents the nonlinear signal value, and its value range is [0,1]; p, m, a, and b are SLF photoelectric transfer coefficients, p = 2.3, m = 0.14, a = 1.12762, and b = -0.12762.

[0148] Since the dynamic range that existing display devices can display is limited, it is impossible to directly display a high dynamic range image (such as: the maximum brightness reaches 1000nits or 10000nits, etc.). In addition, different display devices have different display capabilities. Therefore, generally, a dynamic range adjustment algorithm is used to adjust the dynamic range of the high dynamic range image according to the display capability of the display device. In other words, the dynamic range of the HDR image is adjusted to the dynamic range that the display device can display for display. Here, nits is the unit of brightness, which is equivalent to candela per square meter (cd / m 2 ).

[0149] However, the prior art only uses parameters such as the maximum value of image content statistics, the minimum value of image content statistics, and the maximum and minimum brightness values ​​that the display device can display. The brightness levels of the HDR image adjusted in this way will be lost, resulting in poor display effects after adjustment.

[0150] To this end, the present application provides a method for processing an HDR image, calculating a corrected maximum value of the HDR image through image information of the HDR image, wherein the image information includes a first percentage, a maximum value of an RGB component of a first pixel corresponding to the first percentage, a second percentage, and a maximum value of an RGB component of a second pixel corresponding to the second percentage, the first percentage and the second percentage being greater than 0 and less than 1, the corrected maximum value being used to correct a maximum value among maximum values ​​of RGB components of multiple pixels included in the HDR image, and then adjusting the dynamic range of the HDR image according to the corrected maximum value, thereby improving the display effect of the HDR image.

[0151] It should be noted that the HDR image described in the embodiment of the present application may be an optical signal or an electrical signal, and the embodiment of the present application is not limited to this.

[0152] It should also be noted that when the HDR image is a light signal, the light signal can be converted into an electrical signal through the above three photoelectric conversion functions.

[0153] Figure 4 A schematic diagram showing a dynamic range adjustment curve for an HDR image. Figure 4 , the horizontal axis in the figure represents the brightness of the HDR image before dynamic range adjustment, and the vertical axis represents the brightness of the image after dynamic range adjustment. Curves 1 to 5 are examples of several different adjustment curves. The shapes of these curves are all "S"-shaped, and the slope of the curve first rises and then falls. Use a smooth "S" shape to connect the two endpoints (L1, L'1) and (L2, L'2). Using such a curve to adjust the dynamic range of the HDR image, the HDR image is adjusted from one dynamic range [L1, L2] to another dynamic range [L'1, L'2]. Among them, L1 generally uses the maximum brightness of the display content of the image, which is the real maximum value obtained by statistics of the image content of the HDR image, such as OETF (10000nits), and L2 generally uses the minimum brightness of the display content of the image, which is the minimum value obtained by statistics of the image content of the HDR image, such as 0. L'1 is the maximum value that the display device can display, such as OETF (100nits), and L'2 is the minimum value that the display device can display, such as OETF (0.005nits).

[0154] For example, taking curve 5 as an example, the two endpoints (L1, L′1) and (L2, L′2) are specifically A(x1, y1) and B(x2, y2). After C(x3, y3) and D(x4, y4) are connected by a smooth S-shaped curve, this curve (i.e., curve 5) represents the adjustment of the dynamic range of the HDR image from 0 to 10000 (nits) to 0.005 (nits) to 100 (nits). Thus, the display device corresponding to the brightness range can display the compressed image with a dynamic range of 0.005 (nits) to 100 (nits).

[0155] From the above-described process of adjusting the dynamic range of the HDR image, it can be seen that the dynamic range of the HDR image is adjusted using the maximum brightness L1 of the display content of the HDR image. In many natural scenes, if only a few pixels, such as noise points, have brightness close to or equal to L1, and the brightness of most of the remaining pixels is significantly different from L1, the adjusted image will be displayed on the display device as a whole, resulting in poor visual effects.

[0156] To address this issue, an embodiment of the present application further provides a method for calculating a corrected maximum value of an HDR image, where the corrected maximum value is used to correct the maximum value among the maximum values ​​of RGB components of multiple pixels in the HDR image, and the corrected maximum value of the HDR image calculated according to the method is applied to the dynamic range adjustment of the HDR image, which can further enhance the visual effect of the HDR image displayed on a display device.

[0157] Figure 5 This is an application scenario of the method for processing HDR images provided in the embodiment of the present application. Figure 5 After the image processing device obtains the HDR image to be processed, it adjusts the dynamic range of the HDR image to be processed and outputs the adjusted HDR image.

[0158] Figure 6 A schematic flow chart of a method 100 for processing an HDR image provided in an embodiment of the present application, wherein the method 100 is applicable to Figure 5 The application scenarios provided in and by e.g. Figure 5 The image processing apparatus shown in FIG. Figure 6 , method 100 includes the following S110~S140.

[0159] S110. Obtain image information of an HDR image to be processed, the HDR image comprising a plurality of pixels, and the image information comprising a first percentage, a maximum RGB component value of a first pixel corresponding to the first percentage, a second percentage, and a maximum RGB component value of a second pixel corresponding to the second percentage.

[0160] Optionally, the first percentage may be a first ratio, and the second percentage may be a second ratio.

[0161] Among them, the first percentage represents the percentage of at least one pixel among the multiple pixels whose maximum RGB component value is less than or equal to the maximum RGB component value of the first pixel, and the second percentage represents the percentage of at least one pixel among the multiple pixels whose maximum RGB component value is less than or equal to the maximum RGB component value of the second pixel, and the maximum RGB component value represents the maximum value among the R component, the G component and the B component of a pixel, and the first percentage and the second percentage are both greater than 0 and less than 1.

[0162] For example, taking an HDR image consisting of 4 pixels, the maximum value of the RGB component of the first pixel is 80, the maximum value of the RGB component of the second pixel is 30, the maximum value of the RGB component of the third pixel is 60, and the maximum value of the fourth pixel is 55. Then, 25% corresponds to the second pixel, 50% corresponds to the fourth pixel, 75% corresponds to the third pixel, and 100 corresponds to the first pixel.

[0163] That is to say, among the 4 pixels, the pixel whose maximum value of the RGB component is less than or equal to 30 (the 2nd pixel) accounts for 25% of the 4 pixels, the pixels whose maximum value of the RGB component is less than or equal to 55 (the 2nd and 4th pixels) account for 50% of the 4 pixels, the pixels whose maximum value of the RGB component is less than or equal to 60 (the 2nd, 4th and 3rd pixels) account for 75% of the 4 pixels, and the pixels whose maximum value of the RGB component is less than or equal to 80 (the 2nd, 4th, 3rd and 1st pixels) account for 100% of the 4 pixels.

[0164] It should be noted that the multiple pixels included in the above-mentioned HDR image can be understood as the multiple pixels included in the effective display area of ​​the HDR image, and the effective display area can be a partial area or the entire area of ​​the HDR image.

[0165] For example, the effective display area of ​​the HDR image may be a rectangular area determined by a display horizontal size and a display vertical size.

[0166] Optionally, in S110, the image processing device may obtain image information of the HDR image in a variety of ways, which is not limited in this embodiment of the present application.

[0167] In a possible implementation, the image processing device may calculate the HDR image using an existing method to obtain the image information.

[0168] In another possible implementation manner, the image processing device may obtain the image information through metadata carried by the HDR image.

[0169] S120. Determine a reference maximum value of the HDR image according to the first percentage, the maximum value of the RGB components of the first pixel corresponding to the first percentage, the second percentage, and the maximum value of the RGB components of the second pixel corresponding to the second percentage.

[0170] Optionally, the image processing device may determine the reference maximum value of the HDR image in a variety of ways based on the first percentage, the maximum value of the RGB component of the first pixel corresponding to the first percentage, the second percentage, and the maximum value of the RGB component of the second pixel corresponding to the second percentage. This is not limited to the embodiments of the present application.

[0171] In a possible implementation, the image processing device may determine the reference maximum value MAX by the following formula (5):

[0172]

[0173] Wherein, K1 represents the first percentage, represents the maximum value of the RGB components of the first pixel, K2 represents the second percentage, Indicates the maximum value of the RGB components of the second pixel, A, K1 and K2 are preset values, 0 <A<1,0<K1<1,0<K2<1。

[0174] Using the method for processing HDR images provided in the embodiment of the present application, due to the above and These are two pixels in the HDR image except for the maximum brightness and minimum brightness of the displayed content. The reference maximum value is calculated through these two pixels, and the maximum value of the RGB component maximum values ​​of the HDR image is finally adjusted according to the reference maximum value. This can avoid the situation in the prior art where the adjusted image is too dark when the maximum brightness adjustment is used.

[0175] Optionally, the image information also includes an average of the maximum values ​​of the RGB components of the multiple pixels, and the image processing device can determine the reference maximum value based on the first percentage, the maximum value of the RGB component of the first pixel, the second percentage and the maximum value of the RGB component of the second pixel, the maximum value of the RGB component of the multiple pixels, and the average of the maximum values ​​of the RGB component of the multiple pixels.

[0176] In another possible implementation, the image processing device may determine the reference maximum value MAX by the following formula (6):

[0177]

[0178] in, The maximum_maxrgb represents the maximum value among the maximum values ​​of the RGB components of the multiple pixels, the average_maxrgb represents the average value among the maximum values ​​of the RGB components of the multiple pixels, the K1 represents the first percentage, and the represents the maximum value of the RGB components of the first pixel, K2 represents the second percentage, represents the maximum value of the RGB components of the second pixel, F() represents a preset function, B, K1 and K2 are preset values, 0 <B<1,K1-K2≥0.5,0<K1<1,0<K2<1。

[0179] Optionally, the above F() function may be a constant function or an increasing function, which is not limited in the embodiment of the present application.

[0180] For example, F(x) = x, or F(x) = x N , or F(x)=logx, or F(x)=ax+b, where a and b are constants.

[0181] For another example, in formula (6), B can be taken as 1 / 3.

[0182] In the method for processing an HDR image provided by an embodiment of the present application, maximum_maxrgb is the maximum value of the RGB component of the pixel corresponding to 100%, 2×average_maxrgb is the maximum value of the RGB component of the pixel corresponding to 100%, K1-K2≥0.5 is the maximum value of the RGB component of the pixel corresponding to more than 50%, and by setting different weights for these three dimensions, the final reference maximum value is obtained, and the maximum value of the maximum values ​​of the RGB components of the HDR image is finally adjusted according to the reference maximum value, which can avoid the situation in the prior art where the adjusted image is too dark when the maximum brightness adjustment is used.

[0183] S130. Determine a corrected maximum value of the HDR image based on the reference maximum value and a plurality of preset grading intervals, wherein the grading interval is used to grade the reference maximum value, each of the plurality of grading intervals corresponds to a value range of the reference maximum value, and the corrected maximum value is used to correct the maximum value among the RGB component maximum values ​​of the plurality of pixels included in the HDR image.

[0184] It should be noted that grading a parameter (e.g., a reference maximum value) (also referred to as parameter grading) means dividing the parameter into different levels according to different value ranges. Different values ​​of the parameter may fall within different value ranges, and values ​​falling within different value ranges are said to belong to different levels (or grades). The concept of parameter grading can also be referred to in the prior art, and will not be described in detail here.

[0185] Optionally, each grading interval corresponds to an expression, and the expression is used to calculate the corrected maximum value of the HDR. S130 may be: the image processing device determines a first grading interval to which the reference maximum value belongs from the multiple grading intervals, and the first grading interval corresponds to a first expression; and determines the corrected maximum value according to the first expression.

[0186] Optionally, the multiple grading intervals and the expressions corresponding to each grading interval may be set in a variety of ways, which are not limited in the embodiments of the present application.

[0187] In a possible implementation, when the multiple classification intervals include three classification intervals, the modified maximum value maximum_maxrgb1 can be determined by the following formula (7):

[0188]

[0189] Among them, the MaxRefDisplay represents the maximum display brightness of the display device used to display the HDR image to be processed, the MIN represents a preset grading threshold, and the MAX represents the reference maximum value.

[0190] Optionally, the MaxRefDisplay may be obtained through metadata carried by the HDR image.

[0191] In another possible implementation, when the multiple classification intervals include two classification intervals, the modified maximum value maximum_maxrgb1 may be determined by the following formula (8):

[0192]

[0193] Among them, the maximum_maxrgb represents the maximum value among the maximum values ​​of the RGB components of the multiple pixels, the MAX represents the reference maximum value, the A represents a preset grading threshold, min() represents the operation of taking the minimum value, and f() represents a nonlinear function or a linear function.

[0194] For example, the preset grading threshold may be the maximum display brightness of the display device.

[0195] It should be noted that formula (7) and formula (8) only exemplify the case where the reference maximum value is divided into 2 classification intervals and 3 classification intervals, and the corresponding relationship between each classification and the expression. The embodiment of the present application can also classify the reference maximum value into other number of classification intervals, and set an expression corresponding to each classification interval, which is not limited in the embodiment of the present application.

[0196] Therefore, based on the image information of the HDR image to be processed, the reference maximum value of the HDR image is calculated, and based on the grading interval to which the reference maximum value belongs, the corrected maximum value of the HDR image is calculated, and the corrected maximum value is used as the maximum value of the RGB component maximum values ​​when adjusting the dynamic range of the HDR image to be processed.

[0197] S140: Adjust the dynamic range of the HDR image according to the corrected maximum value.

[0198] It should be noted that the specific process of adjusting the dynamic range of the HDR image according to the modified maximum value can be found in the previous article. Figure 4 To avoid repetition, the descriptions made in will not be repeated here.

[0199] The method for processing HDR images provided in the embodiment of the present application can improve the grading accuracy of HDR images with different levels of dynamic ranges by grading the reference maximum value and calculating the corrected maximum value of the HDR image based on the reference maximum value. Therefore, applying the corrected maximum value to the adjustment of the dynamic range of the HDR image can improve the display effect of the HDR image.

[0200] Optionally, the embodiment of the present application also provides a method for verifying the accuracy of the corrected maximum value of the HDR image.

[0201] It should be noted that the accuracy of the corrected maximum value can also be understood as the grading accuracy of the HDR image.

[0202] Optionally, the verification method of the corrected maximum value includes: the image processing device verifies the accuracy of the corrected maximum value based on a third percentage, the maximum RGB component value of a third pixel corresponding to the third percentage in the HDR image, the maximum GRB component value of a fourth pixel corresponding to the third percentage in the output image, a fourth percentage, the maximum RGB component value of a fifth pixel corresponding to the fourth percentage in the HDR image, and the maximum GRB component value of a sixth pixel corresponding to the fourth percentage in the output HDR image, and the output image is an image of the HDR image after dynamic range adjustment.

[0203] In one possible implementation, when and When this is the case, the image processing device can determine that the corrected maximum value is accurate, where K3 - K4 < M, M is a preset first threshold, T is a preset second threshold, 0 < T < 2, K3 represents the third percentage, and represents the maximum value of the RGB components of the third pixel, represents the maximum value of the RGB components of the fourth pixel, K4 represents the fourth percentage, and represents the maximum value of the RGB components of the fifth pixel, represents the maximum value of the RGB components of the sixth pixel.

[0204] For example, taking K3 = 100% and K4 = 99% as an example, in the HDR image before adjustment, P 100 ≠P 99 , indicating that the pixel corresponding to K3 is not equal to the pixel corresponding to K4; then in the HDR image after adjustment, the pixel corresponding to K3 should also not be equal to the pixel corresponding to K4, that is, P′ 100 -P′ 99 >T.

[0205] Correspondingly, when and this is the case, the image processing device can determine that the corrected maximum value is inaccurate.

[0206] Optionally, the image processing device can calibrate the corrected maximum value according to the following formula (9) to obtain the calibrated corrected maximum value maximum_maxrgb1′:

[0207]

[0208] where maximum_maxrgb1 is the corrected maximum value, offset is a preset offset value, and 0 < offset < 1.

[0209] As described above in combination with Figures 1 to 6 the method for processing HDR images provided by the embodiments of the present application is introduced. Next, the image processing device and image processing equipment provided by the embodiments of the present application will be introduced in combination with Figure 7 and Figure 8 shown in the figure.

[0210] Figure 7 FIG. shows a schematic block diagram of a device 200 for processing HDR images provided by an embodiment of the present application. The device 200 includes:

[0211] An acquisition unit 210 is configured to acquire image information of a high dynamic range (HDR) image to be processed, the HDR image comprising a plurality of pixels, the image information comprising a first percentage, a maximum RGB component value of a first pixel corresponding to the first percentage, a second percentage, and a maximum RGB component value of a second pixel corresponding to the second percentage, the first percentage indicating a percentage of at least one pixel among the plurality of pixels whose maximum RGB component value is less than or equal to a maximum RGB component value of the first pixel, the second percentage indicating a percentage of at least one pixel among the plurality of pixels whose maximum RGB component value is less than or equal to a maximum RGB component value of the second pixel, the maximum RGB component value indicating a maximum value among an R component, a G component, and a B component of a pixel, the first percentage and the second percentage being greater than 0 and less than 1;

[0212] A determination unit 220 is configured to determine a reference maximum value of the HDR image according to the first percentage, a maximum value of the RGB components of a first pixel corresponding to the first percentage, the second percentage, and a maximum value of the RGB components of a second pixel corresponding to the second percentage; and determine a corrected maximum value of the HDR image according to the reference maximum value and a plurality of preset grading intervals, wherein the grading interval is used to grade the reference maximum value, each of the plurality of grading intervals corresponds to a value range of the reference maximum value, and the corrected maximum value is used to correct a maximum value among the maximum values ​​of the RGB components of the plurality of pixels included in the HDR image;

[0213] The adjustment unit 230 is configured to adjust the dynamic range of the HDR image according to the corrected maximum value of the HDR image.

[0214] In a possible implementation, the image information also includes an average of the maximum values ​​of the RGB components of the multiple pixels, and the determination unit 220 is specifically used to determine the reference maximum value based on the first percentage, the maximum value of the RGB component of the first pixel, the second percentage and the maximum value of the RGB component of the second pixel, the maximum value of the RGB component of the multiple pixels, and the average of the maximum values ​​of the RGB component of the multiple pixels.

[0215] In a possible implementation manner, the determining unit 220 is specifically configured to: determine the reference maximum value MAX by using the above formula (6).

[0216] In a possible implementation manner, the determining unit 220 is specifically configured to determine the reference maximum value MAX by using the above formula (5).

[0217] In a possible implementation, each of the hierarchical intervals corresponds to an expression for calculating the corrected maximum value of the HDR. The determining unit 220 is specifically configured to: determine, from the multiple hierarchical intervals, a first hierarchical interval to which the reference maximum value belongs, where the first hierarchical interval corresponds to a first expression; and determine the corrected maximum value according to the first expression.

[0218] In a possible implementation, the determining unit 220 is specifically configured to: determine the corrected maximum value maximum_maxrgb1 of the HDR image through the above formula (7).

[0219] In a possible implementation, the apparatus further includes: a verification unit 240, configured to verify the accuracy of the corrected maximum value according to a third percentage, the maximum value of the RGB components of a third pixel corresponding to the third percentage in the HDR image, the maximum value of the GRB components of a fourth pixel corresponding to the third percentage in the output image, a fourth percentage, the maximum value of the RGB components of a fifth pixel corresponding to the fourth percentage in the HDR image, and the maximum value of the GRB components of a sixth pixel corresponding to the fourth percentage in the output HDR image, where the output image is an image obtained by performing dynamic range adjustment on the HDR image.

[0220] In a possible implementation, the verification unit 240 is specifically configured to:

[0221] When and , determine that the corrected maximum value is accurate, where K3 - K4 < M, M is a preset first threshold, T is a preset second threshold, 0 < T < 2, K3 represents the third percentage, the represents the maximum value of the RGB components of the third pixel, represents the maximum value of the RGB components of the fourth pixel, K4 represents the fourth percentage, the represents the maximum value of the RGB components of the fifth pixel, represents the maximum value of the RGB components of the sixth pixel.

[0222] It should be understood that the device 200 here is embodied in the form of a functional unit. The term "unit" here may refer to an ASIC, an electronic circuit, a processor (such as a shared processor, a dedicated processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art may understand that the device 200 may be specifically an image processing device in the above-mentioned method 100 embodiment, and the device 200 may be used to execute the various processes and / or steps corresponding to the image processing device in the above-mentioned method 100 embodiment, and to avoid repetition, it will not be repeated here.

[0223] Figure 8 The image processing device 300 provided in the embodiment of the present application is shown. The device 300 may include Figure 7 The apparatus 200 described in, or the device 300 may be Figure 7 The device 200 described in the embodiment of the present invention can be used as follows: Figure 8 The hardware architecture shown in FIG. 300 may include a processor 310 , a transceiver 320 , and a memory 330 , wherein the processor 310 , the transceiver 320 , and the memory 330 communicate with each other via an internal connection path. Figure 7 The related functions implemented by the determination unit 220, the adjustment unit 230 and the verification unit 240 can be implemented by the processor 310, and the related functions implemented by the acquisition unit 210 can be implemented by the processor 310 controlling the transceiver 320.

[0224] The processor 310 may include one or more processors, for example, one or more central processing units (CPUs). When the processor is a CPU, the CPU may be a single-core CPU or a multi-core CPU.

[0225] The transceiver 320 is used to send and receive data and / or information, and receive data and / or information. The transceiver may include a transmitter and a receiver, the transmitter is used to send data and / or signals, and the receiver is used to receive data and / or signals.

[0226] The memory 330 includes but is not limited to random access memory (RAM), read-only memory (ROM), erasable programmable readonly memory (EPROM), and compact disc read-only memory (CD-ROM). The memory 330 is used to store relevant instructions and data.

[0227] The memory 330 is used to store program codes and data of the device, and may be a separate device or integrated in the processor 310 .

[0228] Specifically, the processor 310 is used to control the transceiver to communicate with the device or equipment that generates or sends the HDR image. For details, please refer to the description in the method embodiment, which will not be repeated here.

[0229] Understandably, Figure 8 Only a simplified design of the device 300 is shown. In practical applications, the device 300 may also include other necessary components, including but not limited to any number of transceivers, processors, controllers, memories, etc., and all devices that can implement the present application are within the protection scope of the present application.

[0230] In a possible design, the device 300 can be replaced by a chip device, for example, a communication chip that can be used in the device to implement the relevant functions of the processor in the device. The chip device can be a field programmable gate array, a dedicated integrated chip, a system chip, a central processing unit, a network processor, a digital signal processing circuit, a microcontroller, and a programmable controller or other integrated chip that implements the relevant functions. The chip can optionally include one or more memories for storing program codes, and when the code is executed, the processor implements the corresponding function.

[0231] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0232] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0233] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0234] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0235] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0236] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0237] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk.

[0238] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for processing a high dynamic range image, characterized in that: The method comprises: Acquire image information of a high dynamic range HDR image to be processed, the HDR image comprising a plurality of pixels, the image information comprising a first percentage, a maximum RGB component value of a first pixel corresponding to the first percentage, a second percentage, and a maximum RGB component value of a second pixel corresponding to the second percentage, the first percentage indicating the percentage of at least one pixel among the plurality of pixels whose maximum RGB component value is less than or equal to the maximum RGB component value of the first pixel among the plurality of pixels, the second percentage indicating the percentage of at least one pixel among the plurality of pixels whose maximum RGB component value is less than or equal to the maximum RGB component value of the second pixel among the plurality of pixels, the maximum RGB component value indicating the maximum value among an R component, a G component, and a B component of a pixel, and the first percentage and the second percentage are both greater than 0 and less than 1; Determine a reference maximum value of the HDR image according to the first percentage, the maximum value of the RGB components of the first pixel corresponding to the first percentage, the second percentage, and the maximum value of the RGB components of the second pixel corresponding to the second percentage; Determine a corrected maximum value of the HDR image according to the reference maximum value and a plurality of preset grading intervals, wherein the grading interval is used to grade the reference maximum value, each grading interval in the plurality of grading intervals corresponds to a value range of the reference maximum value, and the corrected maximum value is used to correct a maximum value among the maximum values ​​of the RGB components of the plurality of pixels included in the HDR image; The dynamic range of the HDR image is adjusted according to the corrected maximum value of the HDR image.

2. The method according to claim 1, characterized in that The image information further includes an average value of the maximum values ​​of the RGB components of the plurality of pixels, and determining the reference maximum value of the HDR image according to the first percentage, the maximum value of the RGB component of the first pixel corresponding to the first percentage, the second percentage, and the maximum value of the RGB component of the second pixel corresponding to the second percentage includes: The reference maximum value is determined according to the first percentage, the maximum value of the RGB components of the first pixel, the second percentage and the maximum value of the RGB components of the second pixel, the maximum value among the maximum values ​​of the RGB components of the multiple pixels, and the average value among the maximum values ​​of the RGB components of the multiple pixels.

3. The method according to claim 2, characterized in that The determining the reference maximum value according to the first percentage, the maximum value of the RGB component of the first pixel, the second percentage and the maximum value of the RGB component of the second pixel, the maximum value among the maximum values ​​of the RGB components of the multiple pixels, and the average value among the maximum values ​​of the RGB components of the multiple pixels comprises: determining the reference maximum value MAX by the following formula: in, The maximum_maxrgb represents the maximum value among the maximum values ​​of the RGB components of the multiple pixels, the average_maxrgb represents the average value among the maximum values ​​of the RGB components of the multiple pixels, the K1 represents the first percentage, and the represents the maximum value of the RGB components of the first pixel, K2 represents the second percentage, represents the maximum value of the RGB components of the second pixel, F() represents a preset function, B, K1 and K2 are preset values, 0 <B<1,K1-K2≥0.5,0<K1<1,0<K2<1。 4. The method according to claim 1, characterized in that: The determining the reference maximum value of the HDR image according to the first percentage, the maximum value of the RGB component of the first pixel corresponding to the first percentage, the second percentage, and the maximum value of the RGB component of the second pixel corresponding to the second percentage includes: determining the reference maximum value MAX by the following formula: Wherein, K1 represents the first percentage, represents the maximum value of the RGB components of the first pixel, K2 represents the second percentage, Indicates the maximum value of the RGB components of the second pixel, A, K1 and K2 are preset values, 0 <A<1,0<K1<1,0<K2<1。 5. The method according to any one of claims 1 to 4, characterized in that Each grading interval corresponds to an expression, and the expression is used to calculate the corrected maximum value of the HDR. The corrected maximum value of the HDR image is determined according to the reference maximum value and a plurality of preset grading intervals, including: Determine a first classification interval to which the reference maximum value belongs from the multiple classification intervals, wherein the first classification interval corresponds to a first expression; The modified maximum value is determined according to the first expression.

6. The method according to any one of claims 1 to 5, characterized in that The determining the corrected maximum value of the HDR image according to the reference maximum value includes: determining the corrected maximum value maximum_maxrgb1 of the HDR image by the following formula: Among them, the MaxRefDisplay represents the maximum display brightness of the display device used to display the HDR image to be processed, the MIN represents a preset grading threshold, and the MAX represents the reference maximum value.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: The accuracy of the corrected maximum value is verified based on the third percentage, the maximum value of the RGB component of the third pixel corresponding to the third percentage in the HDR image, the maximum value of the GRB component of the fourth pixel corresponding to the third percentage in the processed image, the fourth percentage, the maximum value of the RGB component of the fifth pixel corresponding to the fourth percentage in the HDR image, and the maximum value of the GRB component of the sixth pixel corresponding to the fourth percentage in the processed HDR image, and the processed image is an image after the dynamic range of the HDR image is adjusted.

8. The method according to claim 7, characterized in that Verifying the accuracy of the corrected maximum value according to the third percentage, the maximum value of the RGB component of the third pixel corresponding to the third percentage in the HDR image, the maximum value of the GRB component of the fourth pixel corresponding to the third percentage in the output image, the fourth percentage, the maximum value of the RGB component of the fifth pixel corresponding to the fourth percentage in the HDR image, and the maximum value of the GRB component of the sixth pixel corresponding to the fourth percentage in the output HDR image, comprises: When and At this time, it is determined that the corrected maximum value is accurate, where K3 - K4 < M, M is a preset first threshold, T is a preset second threshold, 0 < T < 2, K3 represents the third percentage, the represents the maximum value of the RGB components of the third pixel, represents the maximum value of the RGB components of the fourth pixel, K4 represents the fourth percentage, the represents the maximum value of the RGB components of the fifth pixel, represents the maximum value of the RGB components of the sixth pixel.

9. An image processing method, characterized in that: The method comprises: Acquire image information of an image to be processed, the image to be processed comprising a plurality of pixels, the image information comprising a first ratio, a first RGB component maximum value, a second ratio, and a second RGB component maximum value, the first ratio representing a ratio of the number of pixels whose RGB component maximum value is less than or equal to the first RGB component maximum value among the plurality of pixels to the number of the plurality of pixels, the second ratio representing a ratio of the number of pixels whose RGB component maximum value is less than or equal to the second RGB component maximum value among the plurality of pixels to the number of the plurality of pixels, the RGB component maximum value representing a maximum value of one of the R component, the G component, and the B component of a pixel; Determine a reference maximum value of the image to be processed according to the first ratio, the maximum value of the first RGB component, the second ratio, and the maximum value of the second RGB component; According to the reference maximum value and a plurality of preset grading intervals, adjusting the maximum value among the maximum values ​​of the RGB components of the plurality of pixels to determine a corrected maximum value of the image to be processed, wherein each grading interval in the plurality of grading intervals corresponds to a value range of the reference maximum value; The dynamic range of the image to be processed is adjusted according to the corrected maximum value of the image to be processed.

10. The method according to claim 9, characterized in that The image information further includes an average value of the maximum values ​​of the RGB components of the plurality of pixels, and determining the reference maximum value of the image to be processed according to the first ratio, the maximum value of the first RGB component, the second ratio, and the maximum value of the second RGB component includes: The reference maximum value is determined according to the first ratio, the first RGB component maximum value, the second ratio and the second RGB component maximum value, the maximum value among the RGB component maximum values ​​of the multiple pixels, and the average value of the RGB component maximum values ​​of the multiple pixels.

11. The method according to claim 10, characterized in that The reference maximum value MAX is determined by the following formula: in, The maximum_maxrgb represents the maximum value among the maximum values ​​of the RGB components of the multiple pixels, the average_maxrgb represents the average value of the maximum values ​​of the RGB components of the multiple pixels, the K1 represents the first ratio, represents the maximum value of the first RGB component, K2 represents the second ratio, represents the maximum value of the second RGB component, F() represents a preset function, B, K1 and K2 are preset values, 0 <B<1,K1-K2≥0.5,0<K1<1,0<K2<1。 12. The method according to claim 9, characterized in that The reference maximum value MAX is determined by the following formula: Wherein, K1 represents the first ratio, represents the maximum value of the first RGB component, K2 represents the second ratio, Indicates the maximum value of the second RGB component. A, K1 and K2 are preset values. 0 <A<1,0<K1<1,0<K2<1。 13. The method according to any one of claims 9 to 12, characterized in that Each of the grading intervals corresponds to an expression, and the expression is used to calculate the corrected maximum value of the image to be processed. The corrected maximum value maximum_maxrgb1 of the image to be processed is determined by the following formula: Wherein, the MaxRefDisplay represents the maximum display brightness of the display device used to display the image to be processed, the MIN represents a preset grading threshold, and the MAX represents the reference maximum value.

14. The method according to any one of claims 9 to 13, characterized in that The method further comprises: The accuracy of the corrected maximum value is verified according to the third ratio, the third RGB component maximum value, the fourth GRB component maximum value, the fourth ratio, the fifth RGB component maximum value and the sixth GRB component maximum value, wherein the third ratio represents the ratio of the number of pixels whose RGB component maximum value is less than or equal to the third RGB component maximum value among the multiple pixels to the number of the multiple pixels, the fourth GRB component maximum value satisfies the third ratio for the ratio of the number of pixels whose RGB component maximum value is less than or equal to the fourth RGB component maximum value among the pixels of the processed image to the number of pixels of the processed image, the fourth ratio represents the ratio of the number of pixels whose RGB component maximum value is less than or equal to the fifth RGB component maximum value among the multiple pixels to the number of the multiple pixels, the sixth GRB component maximum value satisfies the fourth ratio for the ratio of the number of pixels whose RGB component maximum value is less than or equal to the sixth RGB component maximum value among the pixels of the processed image to the number of pixels of the processed image, and the processed image is the image after the dynamic range of the image to be processed is adjusted.

15. The method according to claim 14, characterized in that The verifying the accuracy of the corrected maximum value according to the third ratio, the third RGB component maximum value, the fourth GRB component maximum value, the fourth ratio, the fifth RGB component maximum value and the sixth GRB component maximum value comprises: When and , it is determined that the corrected maximum value is accurate, where K3 - K4 < M, M is a preset first threshold, T is a preset second threshold, 0 < T < 2, K3 represents the third ratio, the represents the maximum value of the third RGB component, P' K3 represents the maximum value of the fourth RGB component, K4 represents the fourth ratio, the represents the maximum value of the fifth RGB component, represents the maximum value of the sixth RGB component.

16. The method according to claim 14 or 15, characterized in that The method further comprises at least one of the following steps: Determine a maximum value of the first RGB component according to the first ratio and the plurality of pixels; Determine a maximum value of the second RGB component according to the second ratio and the plurality of pixels; Determine the third RGB component maximum value according to the third ratio and the plurality of pixels; Determining the maximum value of the fourth RGB component according to the third ratio and the pixels of the processed image; Determine the maximum value of the fifth RGB component according to the fourth ratio and the plurality of pixels; or, The sixth RGB component maximum value is determined according to the fourth ratio and the pixels of the processed image.

17. A device for processing high dynamic range images, characterized in that: include: an acquisition unit, configured to acquire image information of a high dynamic range (HDR) image to be processed, the HDR image comprising a plurality of pixels, the image information comprising a first percentage, a maximum RGB component value of a first pixel corresponding to the first percentage, a second percentage, and a maximum RGB component value of a second pixel corresponding to the second percentage, the first percentage indicating a percentage of at least one pixel among the plurality of pixels whose maximum RGB component value is less than or equal to a maximum RGB component value of the first pixel, the second percentage indicating a percentage of at least one pixel among the plurality of pixels whose maximum RGB component value is less than or equal to a maximum RGB component value of the second pixel, the maximum RGB component value indicating a maximum value among an R component, a G component, and a B component of a pixel, and the first percentage and the second percentage being both greater than 0 and less than 1; a determining unit, configured to determine a reference maximum value of the HDR image according to the first percentage, a maximum value of the RGB components of a first pixel corresponding to the first percentage, the second percentage, and a maximum value of the RGB components of a second pixel corresponding to the second percentage; and to determine a corrected maximum value of the HDR image according to the reference maximum value and a plurality of preset grading intervals, wherein the grading interval is used to grade the reference maximum value, each of the plurality of grading intervals corresponds to a value range of the reference maximum value, and the corrected maximum value is used to correct a maximum value among the maximum values ​​of the RGB components of the plurality of pixels included in the HDR image; An adjustment unit is used to adjust the dynamic range of the HDR image according to the corrected maximum value of the HDR image.

18. The device according to claim 17, characterized in that The image information further includes an average value of the maximum values ​​of the RGB components of the plurality of pixels, and the determining unit is specifically configured to: The reference maximum value is determined according to the first percentage, the maximum value of the RGB components of the first pixel, the second percentage and the maximum value of the RGB components of the second pixel, the maximum value among the maximum values ​​of the RGB components of the multiple pixels, and the average value among the maximum values ​​of the RGB components of the multiple pixels.

19. The device according to claim 18, characterized in that The determining unit is specifically configured to determine the reference maximum value MAX by the following formula: in, The maximum_maxrgb represents the maximum value among the maximum values ​​of the RGB components of the multiple pixels, the average_maxrgb represents the average value among the maximum values ​​of the RGB components of the multiple pixels, the K1 represents the first percentage, and the represents the maximum value of the RGB components of the first pixel, K2 represents the second percentage, represents the maximum value of the RGB components of the second pixel, F() represents a preset function, B, K1 and K2 are preset values, 0 <B<1,K1-K2≥0.5,0<K1<1,0<K2<1。 20. The device according to claim 19, characterized in that The determining unit is specifically configured to determine the reference maximum value MAX by the following formula: Wherein, K1 represents the first percentage, represents the maximum value of the RGB components of the first pixel, K2 represents the second percentage, Indicates the maximum value of the RGB components of the second pixel, A, K1 and K2 are preset values, 0 <A<1,0<K1<1,0<K2<1。 21. The device according to any one of claims 17 to 20, characterized in that Each grading interval corresponds to an expression, and the expression is used to calculate the modified maximum value of the HDR, and the determination unit is specifically used to: Determine a first classification interval to which the reference maximum value belongs from the multiple classification intervals, wherein the first classification interval corresponds to a first expression; The modified maximum value is determined according to the first expression.

22. The device according to any one of claims 17 to 21, characterized in that The determining unit is specifically used to determine the modified maximum value maximum_maxrgb1 of the HDR image by the following formula: Among them, the MaxRefDisplay represents the maximum display brightness of the display device used to display the HDR image to be processed, the MIN represents a preset grading threshold, and the MAX represents the reference maximum value.

23. The device according to any one of claims 17 to 22, characterized in that The device further comprises: a verification unit, The verification unit is used to verify the accuracy of the corrected maximum value according to the third percentage, the maximum value of the RGB component of the third pixel corresponding to the third percentage in the HDR image, the maximum value of the GRB component of the fourth pixel corresponding to the third percentage in the output image, the fourth percentage, the maximum value of the RGB component of the fifth pixel corresponding to the fourth percentage in the HDR image, and the maximum value of the GRB component of the sixth pixel corresponding to the fourth percentage in the output HDR image, and the output image is the image after the dynamic range of the HDR image is adjusted.

24. The device according to claim 23, characterized in that The verification unit is specifically used for: When and , it is determined that the corrected maximum value is accurate, where K3 - K4 < M, M is a preset first threshold, T is a preset second threshold, 0 < T < 2, K3 represents the third percentage, the represents the maximum value of the RGB components of the third pixel, represents the maximum value of the RGB components of the fourth pixel, K4 represents the fourth percentage, the represents the maximum value of the RGB components of the fifth pixel, represents the maximum value of the RGB components of the sixth pixel.

25. An image processing device, characterized in that: include: an acquisition unit, configured to acquire image information of an image to be processed, the image to be processed comprising a plurality of pixels, the image information comprising a first ratio, a first RGB component maximum value, a second ratio, and a second RGB component maximum value, the first ratio representing a ratio of the number of pixels whose RGB component maximum value is less than or equal to the first RGB component maximum value among the plurality of pixels to the number of the plurality of pixels, the second ratio representing a ratio of the number of pixels whose RGB component maximum value is less than or equal to the second RGB component maximum value among the plurality of pixels to the number of the plurality of pixels, the RGB component maximum value representing a maximum value of one of the R component, the G component, and the B component of a pixel; a determining unit, configured to determine a reference maximum value of the image to be processed according to the first ratio, the maximum value of the first RGB component, the second ratio and the maximum value of the second RGB component; According to the reference maximum value and a plurality of preset grading intervals, adjusting the maximum value among the maximum values ​​of the RGB components of the plurality of pixels to determine a corrected maximum value of the image to be processed, wherein each grading interval in the plurality of grading intervals corresponds to a value range of the reference maximum value; An adjustment unit is used to adjust the dynamic range of the image to be processed according to the corrected maximum value of the image to be processed.

26. The device according to claim 25, characterized in that The image information further includes an average value of the maximum values ​​of the RGB components of the plurality of pixels, and the determining unit is specifically configured to: The reference maximum value is determined according to the first ratio, the first RGB component maximum value, the second ratio and the second RGB component maximum value, the maximum value among the RGB component maximum values ​​of the multiple pixels, and the average value of the RGB component maximum values ​​of the multiple pixels.

27. The device according to claim 26, characterized in that The determining unit is specifically configured to determine the reference maximum value MAX by the following formula: in, The maximum_maxrgb represents the maximum value among the maximum values ​​of the RGB components of the multiple pixels, the average_maxrgb represents the average value of the maximum values ​​of the RGB components of the multiple pixels, the K1 represents the first ratio, represents the maximum value of the first RGB component, K2 represents the second ratio, represents the maximum value of the second RGB component, F() represents a preset function, B, K1 and K2 are preset values, 0 <B<1,K1-K2≥0.5,0<K1<1,0<K2<1。 28. The device according to claim 25, characterized in that The determining unit is specifically configured to determine the reference maximum value MAX by the following formula: Wherein, K1 represents the first ratio, represents the maximum value of the first RGB component, K2 represents the second ratio, Indicates the maximum value of the second RGB component. A, K1 and K2 are preset values. 0 <A<1,0<K1<1,0<K2<1。 29. The device according to any one of claims 25 to 28, characterized in that Each of the classification intervals corresponds to an expression, and the expression is used to calculate the corrected maximum value of the image to be processed. The determination unit is specifically used to determine the corrected maximum value maximum_maxrgb1 of the image to be processed by the following formula: Wherein, the MaxRefDisplay represents the maximum display brightness of the display device used to display the image to be processed, the MIN represents a preset grading threshold, and the MAX represents the reference maximum value.

30. The device according to any one of claims 25 to 29, characterized in that The device further comprises a verification unit, wherein the verification unit is used to: The accuracy of the corrected maximum value is verified according to the third ratio, the third RGB component maximum value, the fourth GRB component maximum value, the fourth ratio, the fifth RGB component maximum value and the sixth GRB component maximum value, wherein the third ratio represents the ratio of the number of pixels whose RGB component maximum value is less than or equal to the third RGB component maximum value among the multiple pixels to the number of the multiple pixels, the fourth GRB component maximum value satisfies the third ratio for the ratio of the number of pixels whose RGB component maximum value is less than or equal to the fourth RGB component maximum value among the pixels of the processed image to the number of pixels of the processed image, the fourth ratio represents the ratio of the number of pixels whose RGB component maximum value is less than or equal to the fifth RGB component maximum value among the multiple pixels to the number of the multiple pixels, the sixth GRB component maximum value satisfies the fourth ratio for the ratio of the number of pixels whose RGB component maximum value is less than or equal to the sixth RGB component maximum value among the pixels of the processed image to the number of pixels of the processed image, and the processed image is the image after the dynamic range of the image to be processed is adjusted.

31. The device according to claim 30, characterized in that The verification unit is specifically used for: When and When, it is determined that the corrected maximum value is accurate, where K3 - K4 < M, M is a preset first threshold, T is a preset second threshold, 0 < T < 2, K3 represents the third ratio, the represents the maximum value of the third RGB component, P’ K3 represents the maximum value of the fourth RGB component, K4 represents the fourth ratio, the represents the maximum value of the fifth RGB component, represents the maximum value of the sixth RGB component.

32. The method according to claim 30 or 31, characterized in that The determining unit is further configured to perform at least one of the following steps: Determine a maximum value of the first RGB component according to the first ratio and the plurality of pixels; Determine a maximum value of the second RGB component according to the second ratio and the plurality of pixels; Determine the third RGB component maximum value according to the third ratio and the plurality of pixels; Determining the maximum value of the fourth RGB component according to the third ratio and the pixels of the processed image; Determine the maximum value of the fifth RGB component according to the fourth ratio and the plurality of pixels; or, The sixth RGB component maximum value is determined according to the fourth ratio and the pixels of the processed image.

33. An image processing device, characterized in that: The device comprises a processor and a memory, wherein the processor and the memory are coupled, and the processor is used to cause the device to execute the method according to any one of claims 1 to 16.

34. A chip device comprising: An input interface, an output interface, at least one processor, and a memory, wherein the input interface, the output interface, the processor, and the memory communicate with each other via an internal connection path, and the processor is used to execute the code in the memory, wherein when the processor executes the code, the chip device implements the method described in any one of claims 1 to 16.

35. A computer-readable storage medium for storing a computer program, characterized in that: The computer program comprises instructions for implementing the method of any one of claims 1 to 16 above.

36. A computer program product, comprising instructions, characterized in that: When the instructions are executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 16.

Citation Information

Cited By

  • Method and apparatus for processing high dynamic range image

    WO2021073209A1