Image processing methods, apparatus and equipment
By acquiring the display parameters of SDR images and HDR devices, adjusting brightness and saturation, and using an inverse tone mapping method, SDR images are converted into HDR images, solving the problem of poor display effect of SDR images on HDR devices and achieving better display results.
Patent Information
- Application Number
- CN202211102784.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-09
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-09-09
AI Technical Summary
When SDR images are displayed on HDR devices, dark areas are brightened, resulting in excessive noise, excessive overall brightness, and low saturation, leading to poor display quality.
By acquiring the display parameters of the SDR image and the HDR device, the brightness and saturation of the image are adjusted. The SDR image is then converted into an HDR image using an inverse tone mapping method, including adjustments to brightness and saturation. Image matching is optimized using brightness mapping curves and saturation gain curves.
The display of SDR images on HDR devices has been optimized, improving brightness and saturation, and enhancing image display quality.
Smart Images

Figure CN115457920B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer, and particularly relate to an image processing method, device and equipment. BACKGROUND
[0002] An image can be displayed by a display device (e.g., a television, a computer display screen, a mobile phone, etc.). The display device can be a standard dynamic range (SDR) device or a high dynamic range (HDR) device.
[0003] Compared with the SDR device, the image displayed by the HDR device has the advantages of high brightness, high contrast, a larger color gamut range, etc. Therefore, most display devices are HDR devices. However, most images at present are SDR images, and when these SDR images are displayed on the HDR device, potential problems such as the dark place being brightened to cause excessive noise, the overall brightness of the picture being too high, the saturation of the picture being too low, etc. will occur, resulting in poor display effect of the image. SUMMARY
[0004] Embodiments of the present application provide an image processing method, device and equipment, which optimize the display effect of the SDR image on the HDR device.
[0005] In a first aspect, an image processing method is provided, comprising:
[0006] obtaining a first image and display parameters of a display device, the first image being a standard dynamic range (SDR) image, and the display device being a high dynamic range (HDR) device;
[0007] adjusting brightness and saturation of the first image according to the display parameters to obtain a second image, wherein the display parameters at least include display peak luminance (DPL) and / or backlight percentage.
[0008] In a possible implementation, adjusting brightness and saturation of the first image according to the display parameters to obtain a second image comprises:
[0009] obtaining first brightness and first saturation of each pixel in the first image;
[0010] determining second brightness of each pixel in the first image according to the display parameters and the first brightness of each pixel in the first image;
[0011] determining second saturation of each pixel in the first image according to the first saturation of each pixel in the first image;
[0012] updating the first image according to the second brightness and the second saturation of each pixel in the first image to obtain the second image.
[0013] In a possible implementation, the display parameter at least includes the DPL; for any one pixel in the first image; determining the second brightness of the pixel according to the display parameter and the first brightness of the pixel, includes:
[0014] obtaining a brightness mapping curve between the first brightness and the mapping brightness corresponding to the DPL, the brightness mapping curve being determined according to the DPL;
[0015] determining the first mapping brightness according to the first brightness and the brightness mapping curve;
[0016] determining the second brightness of the pixel according to the first brightness and the first mapping brightness.
[0017] In a possible implementation, the display parameter at least further includes the backlight percentage; determining the second brightness of the pixel according to the first brightness and the first mapping brightness, includes:
[0018] determining the second brightness of the pixel according to the backlight percentage, the first brightness and the first mapping brightness.
[0019] In a possible implementation, for any one pixel in the first image; determining the second saturation of the pixel according to the first saturation of the pixel, includes:
[0020] determining the first gain coefficient of the pixel according to the first brightness and the second brightness of the pixel;
[0021] obtaining a saturation gain curve between the first brightness and the second gain coefficient;
[0022] determining the second gain coefficient of the pixel according to the first brightness of the pixel and the saturation gain curve;
[0023] determining the second saturation of the pixel according to the first saturation, the first gain coefficient and the second gain coefficient.
[0024] In a possible implementation, determining the second saturation of the pixel according to the first saturation, the first gain coefficient and the second gain coefficient, includes:
[0025] determining the product of the first saturation, the first gain coefficient and the second gain coefficient as the second saturation of the pixel.
[0026] In a possible implementation, the updating the first image according to the second lightness and the second saturation of each pixel in the first image to obtain the second image comprises:
[0027] For each pixel in the first image, the lightness of the pixel is updated to the corresponding second lightness, and the saturation of the pixel is updated to the corresponding second saturation to obtain the second image.
[0028] In a second aspect, an embodiment of the present application provides an image processing apparatus, comprising an obtaining module and an adjusting module, wherein,
[0029] The obtaining module is configured to obtain a first image and display parameters of a display device, the first image being a standard dynamic range (SDR) image, and the display device being a high dynamic range (HDR) device.
[0030] The adjusting module is configured to adjust lightness and saturation of the first image according to the display parameters to obtain a second image, wherein the display parameters at least comprise a display peak luminance (DPL) and / or a backlight percentage.
[0031] In a possible implementation, the adjusting module is specifically configured to:
[0032] obtain first lightness and first saturation of each pixel in the first image;
[0033] determine second lightness of each pixel in the first image according to the display parameters and the first lightness of each pixel in the first image;
[0034] determine second saturation of each pixel in the first image according to the first saturation of each pixel in the first image;
[0035] update the first image according to the second lightness and the second saturation of each pixel in the first image to obtain the second image.
[0036] In a possible implementation, the adjusting module is specifically configured to:
[0037] obtain a lightness mapping curve between the first lightness and a mapping lightness corresponding to the DPL, the lightness mapping curve being determined according to the DPL;
[0038] determine a first mapping lightness according to the first lightness and the lightness mapping curve;
[0039] determine the second lightness of the pixel according to the first lightness and the first mapping lightness.
[0040] In a possible implementation, the adjusting module is specifically configured to:
[0041] determine a second lightness of the pixel according to the backlight percentage, the first lightness and the first mapped lightness.
[0042] In a possible implementation, the adjusting module is specifically configured to:
[0043] determine a first gain coefficient of the pixel according to the first lightness and the second lightness of the pixel;
[0044] obtain a saturation gain curve between the first lightness and the second gain coefficient;
[0045] determine a second gain coefficient of the pixel according to the first lightness of the pixel and the saturation gain curve;
[0046] determine a second saturation of the pixel according to the first saturation, the first gain coefficient and the second gain coefficient.
[0047] In a possible implementation, the adjusting module is specifically configured to:
[0048] determine the second saturation of the pixel as a product of the first saturation, the first gain coefficient and the second gain coefficient.
[0049] In a possible implementation, the adjusting module is specifically configured to:
[0050] for each pixel in the first image, update the lightness of the pixel as a corresponding second lightness and update the saturation of the pixel as a corresponding second saturation, to obtain the second image.
[0051] In a third aspect, an embodiment of the present application provides an image processing device, including a processor and a memory;
[0052] The memory is configured to store a computer program.
[0053] The processor is configured to execute the computer program stored in the memory, to implement the method in any one of the first aspect.
[0054] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores computer execution instructions, and when the computer execution instructions are executed by a processor, the computer execution instructions are used to implement the method in any one of the first aspect.
[0055] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the method in any one of the first aspect.
[0056] The image processing method, device and equipment provided by the embodiments of the present application can obtain a first image and display parameters of a display device, the first image is an SDR image, and the display device is an HDR device; obtain first brightness and first saturation of each pixel in the first image; for any one pixel in the first image, adjust the first brightness and the first saturation of the pixel in the first image according to the display parameters, and then obtain second brightness and second saturation of the pixel in the first image, wherein the display parameters at least include display peak luminance DPL and / or backlight percentage; update the first image based on the second brightness and the second saturation of each pixel in the first image, and obtain a second image; and display the second image in the display device. In the above process, the SDR image is converted into an HDR image matched with the HDR device through the inverse tone mapping method based on brightness and saturation adjustment, and the display effect of the SDR image on the HDR device is optimized. BRIEF DESCRIPTION OF DRAWINGS
[0057] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0058] Figure 1 A schematic diagram of an application scenario provided by the embodiments of the present application;
[0059] Figure 2 A flowchart of an image processing method provided by the embodiments of the present application;
[0060] Figure 3 A flowchart of an image processing method provided by the embodiments of the present application;
[0061] Figure 4 A schematic diagram of a segmented brightness mapping curve corresponding to a display device provided by the embodiments of the present application;
[0062] Figure 5 A schematic diagram of a saturation gain curve corresponding to a display device provided by the embodiments of the present application;
[0063] Figure 6 A specific framework diagram of an image processing method provided by the embodiments of the present application;
[0064] Figure 7 A structural diagram of an image processing device provided by the embodiments of the present application;
[0065] Figure 8 A hardware structure diagram of an image processing device provided by the embodiments of the present application.
[0066] The specific embodiments of the present application have been shown through the above drawings, and will be described in more detail hereinafter. These drawings and the written description are not intended to restrict the scope of the present application in any way, but to explain the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0067] To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some, but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0068] Figure 1 The application scenarios of the embodiments of the present application are shown in the following Figure 1 , including an image processing device 101. The image processing device 101 can be provided with a display device, which can be an HDR device, for example, the display device can be a high-definition display screen, etc. Optionally, the image processing device 101 can also be provided with an image acquisition apparatus and an image processing apparatus, for example, the image acquisition apparatus can be a camera; and the image processing apparatus can be an image processing platform.
[0069] The image processing device 101 can acquire an SDR image, and convert the SDR image into a corresponding HDR image through a method of inverse tone mapping based on brightness and saturation adjustment, and display the HDR image on the display device.
[0070] In the related art, compared with an SDR device, an image displayed by an HDR device has the advantages of high brightness, high contrast, a larger color gamut range, etc., therefore, most display devices are HDR devices. However, most images at present are SDR images, and when these SDR images are displayed on an HDR device, potential problems such as the dark part being brightened to cause excessive noise, the overall brightness of the picture being too high, the saturation of the picture being too low, etc. will occur, resulting in poor display effect of the image.
[0071] In the embodiments of the present application, based on the display parameters of the HDR device and the first brightness and the first saturation of each pixel in the SDR image, the SDR image corresponding HDR image and the display of the HDR image on the HDR device can be determined through an image dynamic range conversion manner. In the above process, the SDR image is converted into an HDR image matched with the HDR device through a method of inverse tone mapping based on brightness and saturation adjustment, and the display effect of the SDR image on the HDR device is optimized.
[0072] The method shown in the present application will be described below through specific embodiments. It should be noted that the following embodiments can exist independently or be combined with each other. For the same or similar content, the description will not be repeated in different embodiments.
[0073] Figure 2 A flowchart of an image processing method provided by an embodiment of the present application is shown. Please refer to Figure 2 The method can include:
[0074] S201, obtaining a first image and display parameters of a display device.
[0075] The execution subject of the embodiment of the present application can be an image processing device or an image processing apparatus arranged in the image processing device. The image processing apparatus can be implemented by software or by a combination of software and hardware.
[0076] The first image can be an SDR image, and the format of the SDR image can be an IMG format.
[0077] The first image can be an image generated or captured by a mobile phone, a camera, a desktop computer or the like. Optionally, the format of the first image can also be a Joint Photographic Experts Group (JPEG) format or a Portable Network Graphics (PNG) format or the like. When the format of the first image is a JPG format or a PNG format, the format of the first image needs to be converted to an IMG format.
[0078] The display device can be an HDR device. For example, the display device can be a 4k high-definition display screen or the like.
[0079] The display parameters can include a display peak luminance (DPL) or a backlight percentage of the display device. For one display device, the display parameters DPL can be a fixed value. For example, the DPL can be 5000 cd / m 2 The backlight percentage of the display device can also be a preset fixed parameter value. Generally, the DPL of the display device and the backlight percentage of the display device are inversely proportional, that is, the greater the backlight percentage, the smaller the DPL; the smaller the backlight percentage, the greater the DPL.
[0080] S202, adjusting the brightness and saturation of the first image according to the display parameters to obtain a second image.
[0081] The display parameters can at least include the DPL and / or the backlight percentage of the display device.
[0082] The second image can be an HDR image. The second image corresponding to the first image can be determined as follows: obtain the first brightness and first saturation of each pixel in the first image; determine the second brightness of each pixel in the first image based on the display parameters and the first brightness of each pixel in the first image; determine the second saturation of each pixel in the first image based on the first saturation of each pixel in the first image; update the first image based on the second brightness and second saturation of each pixel in the first image to obtain the second image.
[0083] Optionally, the HSV color model corresponding to the first image can be updated based on the second brightness, second saturation and first hue of each pixel in the first image, and the second image can be obtained based on the updated HSV color model.
[0084] There is a correspondence between the first and second brightness levels of each pixel in the first image. For example, this correspondence can be shown in Table 1:
[0085] Table 1
[0086] pixel first lightness second lightness pixel 1 first lightness 1 second lightness 1 pixel 2 first lightness 2 second lightness 2 pixel 3 first lightness 3 second lightness 3 …… …… …… pixel n first lightness n second lightness n
[0087] According to Table 1, the first image can contain n pixels, where n is a positive integer greater than or equal to 1. There is a one-to-one correspondence between the first brightness and the second brightness of each pixel in the first image; for example, the first brightness of pixel 1 (1) can correspond to the second brightness of that pixel (1).
[0088] Similarly, there is a one-to-one correspondence between the first saturation and the second saturation of each pixel in the first image, which will not be elaborated here.
[0089] The image processing method provided in this application acquires an SDR image and the display parameters of an HDR device, as well as the first brightness and first saturation of each pixel in the SDR image; determines the corresponding HDR image based on the display parameters and the first brightness and first saturation of each pixel in the SDR image; and displays the HDR image on the display device. In the above process, by using an inverse tone mapping method based on brightness and saturation adjustments, the SDR image is converted into an HDR image that matches the HDR device, thus optimizing the display effect of the SDR image on the HDR device.
[0090] Based on any of the above embodiments, the following, in conjunction with Figure 3 This paper describes the detailed process of an image processing method.
[0091] Figure 3 This is a schematic flowchart illustrating an image processing method provided in an embodiment of this application. Please refer to [link / reference]. Figure 3 The method may include:
[0092] S301. Obtain the first image and the display parameters of the display device.
[0093] The first image can be an SDR image, and the display device can be an HDR device.
[0094] It should be noted that the execution process of S301 can be found in the execution process of S201, and will not be repeated here.
[0095] S302. Obtain the first brightness and first saturation of each pixel in the first image.
[0096] The first brightness is the brightness corresponding to each pixel in the SDR image; the first saturation is the saturation corresponding to each pixel in the SDR image. The first image may include multiple pixels, each pixel having its corresponding first brightness and first saturation. The first brightness and first saturation of each pixel in the first image can be obtained as follows: convert the image format of the image from IMG format to HSV color model (Hue, Saturation, Value; HSV) format to obtain the HSV color model corresponding to the first image; based on the obtained HSV color model, determine the brightness and saturation corresponding to each pixel in the first image; normalize the brightness and saturation corresponding to each pixel in the first image to determine the first brightness and first saturation corresponding to each pixel.
[0097] Optionally, the hue corresponding to each pixel in the first image can be obtained based on the HSV color model; the first hue corresponding to each pixel can be determined by normalizing the hue corresponding to each pixel in the first image.
[0098] The first image may include multiple pixels. For any pixel in the first image, the process of determining the second brightness of the pixel is the same. The process of determining the second brightness of any pixel will be explained below with reference to S303 to S305.
[0099] S303. Obtain the lightness mapping curve between the first lightness and the mapped lightness corresponding to DPL.
[0100] The lightness mapping curve can be determined based on DPL, and this lightness mapping curve can reflect the mapping relationship between the first lightness and the mapped lightness.
[0101] Optionally, the brightness mapping curve can be a segmented brightness mapping curve. For a given display device, a segmented brightness mapping curve that achieves the optimal display effect can be created by adjusting the DPL corresponding to that display device in a segmented manner.
[0102] Below, in conjunction with Figure 4 This section explains the segmented brightness mapping curve for a display device.
[0103] Figure 4 This is a schematic diagram of a segmented brightness mapping curve corresponding to a display device provided in an embodiment of this application. Please refer to... Figure 4 The x-axis of this segmented brightness mapping curve is the first brightness V of the pixel. SDR The vertical axis represents the mapped brightness V of the pixel. HDR-tmp .
[0104] As can be seen, this segmented brightness mapping curve consists of two parts: a straight line segment and a Bézier curve segment.
[0105] The starting coordinates of the brightness mapping curve for the straight line segment are the origin (0, 0), and the ending coordinates are (V...). SDR1 V HDR -tmp1). The ordinate of the endpoint can be calculated from the slope of the lightness curve of the straight line segment and the x-coordinate of the endpoint. The calculation process is as follows:
[0106] V HDR-tmp1 =V SDR1 ×k
[0107] Where k is the slope of the brightness mapping curve of the straight line segment.
[0108] In practical applications, a V can be preset according to the DPL of the display device. SDR1 The slope k of the curve mapped from the straight line segment. Typically, the DPL of a display device is related to V. SDR1 There is a corresponding relationship: the larger the DPL value, the higher the V. SDR1 The smaller the value; the smaller the DPL value, the lower the V. SDR1 The larger the value, the more V can be adjusted based on the DPL value of the display device. SDR1 This ensures that the brightness mapping curve of the straight line segment can guarantee, to the greatest extent possible, that the first mapped brightness corresponding to the first brightness is displayed normally in the medium and low brightness range.
[0109] The starting point coordinates (V) of the Bézier curve segment brightness mapping curve SDR1 V HDR-tmp1 ), endpoint coordinates (V) SDR2 V HDR-tmp4 ), and two anchor point coordinates (V SDR3 V HDR-tmp3 ) and (V SDR4 V HDR-tmp4) .
[0110] In practical applications, for the lightness mapping curve of the Bézier curve segment, there can be one or more anchor points. When multiple anchor points are selected, the generated lightness mapping curve of the Bézier curve segment reflects a more accurate mapping relationship.
[0111] Optionally, the segmented brightness mapping curve corresponding to the display device can be obtained by inputting the starting point coordinates (0,0), the slope k of the line segment, and the ending x-coordinate V of the brightness mapping curve into the Python software. SDR1 Generate the corresponding line segment brightness mapping curve; input the starting point coordinates (V) of the Bézier curve into the Python software. SDR1 V HDR-tmp1 ), endpoint coordinates (V) SDR2 V HDR-tmp4 ) and anchor point coordinates (V SDR3 V HDR-tmp3 ), (V SDR4 V HDR-tmp4 This generates the corresponding Bézier curve segment brightness mapping curve.
[0112] Compared to simply mapping curves with straight lines or curves, segmenting the brightness mapping curve using the above method can effectively improve issues such as excessive brightness and excessive noise in dark areas when displaying SDR images on HDR devices. For example, when the primary brightness of pixels in an SDR image is in the low or middle brightness range, a straight line mapping curve can ensure that the primary brightness of these pixels is displayed normally; when the primary brightness of pixels in an SDR image is in the high brightness range, a Bézier curve segment can increase the primary mapped brightness of these pixels, thereby improving the overall contrast of the SDR image.
[0113] S304. Determine the first mapped brightness based on the first brightness and the brightness mapping curve.
[0114] Once the first value is obtained, the corresponding first mapped value can be found on the value mapping curve. For example, when the first value is V... SDR1 At that time, it is possible Figure 4 The first mapped brightness value shown in the brightness mapping curve can be found to be V. HDR-tmp1 .
[0115] S305. Determine the second brightness of the pixel based on the backlight percentage, the first brightness, and the first mapped brightness.
[0116] Optionally, based on the backlight percentage, the first brightness, and the first mapped brightness, the second brightness of a pixel can be determined using the following formula:
[0117] V HDR =P×V HDR-tmp +(1-P)×V SDR
[0118] Among them, V HDR The second brightness of the pixel; V SDR V represents the first brightness of the pixel.HDR-tmp is the first mapped brightness of the pixel; P is the backlight percentage of the display device.
[0119] In the above process, by referencing the backlight percentage of the display device, the first brightness and the first mapped brightness of each pixel of the first image are corrected to obtain their corresponding second brightness. This can effectively improve the situation where the actual display brightness of the image in the display device decreases due to the decrease in the backlight percentage of the display device, and further optimize the display effect of the image in the display device.
[0120] By performing steps S303-S305 on each pixel in the first image, the second brightness of each pixel in the first image can be obtained.
[0121] The first image may include multiple pixels. The process of determining the second saturation of any pixel in the first image is the same. The process of determining the second saturation of any pixel will be explained below with reference to S306 to S309.
[0122] S306. Determine the first gain coefficient of the pixel based on the first brightness and the second brightness of the pixel.
[0123] Based on the first and second brightness of a pixel, the first gain coefficient of the pixel can be calculated using the following formula:
[0124]
[0125] Where g1 is the first gain coefficient of the pixel; V HDR The second brightness of the pixel; V SDR The first brightness of the pixel.
[0126] S307. Obtain the saturation gain curve between the first brightness and the second gain coefficient.
[0127] The saturation gain curve can reflect the mapping relationship between the first brightness and the second gain coefficient.
[0128] In practical applications, for a single display device, the saturation gain curve can be manually adjusted based on the changes in saturation across different brightness ranges to achieve the optimal saturation gain adjustment result. For example, adjusting the saturation gain curve based on the changes in saturation across a low brightness range can avoid color noise issues caused by low initial brightness and high saturation; similarly, adjusting the saturation gain curve based on the changes in saturation across a high brightness range can avoid detail distortion issues caused by both high initial brightness and high saturation.
[0129] Below, in conjunction with Figure 5This section explains the saturation gain curve corresponding to a display device.
[0130] Figure 5 This is a schematic diagram of the saturation gain curve corresponding to a display device provided in an embodiment of this application. Please refer to... Figure 5 The x-axis of the saturation gain curve represents the first brightness, and the y-axis represents the second gain coefficient. The starting coordinates of the saturation gain curve are (0, 0.6), the ending coordinates are (1, 0.8), and the coordinates corresponding to the maximum value of the second gain coefficient are (0.5, 0.95).
[0131] S308. Determine the second gain coefficient of the pixel based on the first brightness and saturation gain curve of the pixel.
[0132] Once the first brightness level is obtained, the corresponding second gain coefficient can be found on the saturation gain curve. For example, when the first brightness level is 0.5, the second gain coefficient can be found on the saturation gain curve. Figure 5 The saturation gain curve shown has a corresponding second gain coefficient of 0.95.
[0133] S309. Determine the second saturation of the pixel based on the first saturation, the first gain coefficient, and the second gain coefficient.
[0134] Optionally, the product of the first saturation, the first gain coefficient, and the second gain coefficient can be used to determine the second saturation of a pixel. For example, the formula for calculating the second saturation of a pixel can be as follows:
[0135] S HDR =S SDR ×g1×g sat
[0136] Among them, S HDR S represents the second saturation of the pixel. SDR g is the first saturation of the pixel; g1 is the first gain coefficient of the pixel; g sat This is the second gain coefficient for the pixel.
[0137] In practical applications, for the first image, a saturation compensation algorithm can be used to adjust the first saturation of each pixel in the first image to obtain the corresponding second saturation. The above calculation formula can be applied to the above saturation compensation algorithm. Through the two corrections of the first gain coefficient and the second gain coefficient, color defects that may occur during the adjustment of the first saturation can be avoided.
[0138] By performing steps S306-S309 on each pixel in the first image, the second saturation of each pixel in the first image can be obtained.
[0139] S310. For each pixel in the first image, update the pixel's brightness to the corresponding second brightness and update the pixel's saturation to the corresponding second saturation to obtain the second image.
[0140] Optionally, the HSV color model corresponding to the second image can be obtained based on the first hue of each pixel in the first image, as well as the updated second brightness and second saturation, and the second image can be obtained based on the HSV color model corresponding to the second image.
[0141] S311. Display the second image on the display device.
[0142] Optionally, the second image can be displayed on a display device after it is obtained. It is understood that, since the second image is an HDR image, it has better compatibility with HDR devices, and therefore, compared to the first image, the second image can present a superior display effect on the display device.
[0143] The image processing method provided in this application acquires an SDR image and the display parameters of an HDR device, as well as the first brightness and first saturation of each pixel in the SDR image; determines the corresponding HDR image based on the display parameters and the first brightness and first saturation of each pixel in the SDR image; and displays the HDR image on the display device. In the above process, by using an inverse tone mapping method based on brightness and saturation adjustments, the SDR image is converted into an HDR image that matches the HDR device, thus optimizing the display effect of the SDR image on the HDR device.
[0144] Based on any of the above embodiments, the following, in conjunction with Figure 6 The image processing method shown in the embodiments of this application will be described in detail through specific examples.
[0145] Figure 6 This is a schematic diagram illustrating the specific framework of an image processing method provided in an embodiment of this application. Please refer to... Figure 6A first image can be input into a display device, which can be an HDR device, and the first image can be an SDR image. Based on the HSV color model corresponding to the first image, the first brightness, first saturation, and first hue of the first image are obtained. According to the DPL of the display device, a segmented brightness mapping curve corresponding to the display device is obtained. Based on the first brightness of each pixel in the first image, the first mapped brightness corresponding to that pixel is found in the segmented brightness mapping curve. Based on the backlight percentage of the display device and the first brightness and first mapped brightness of each pixel in the first image obtained in the above steps, the second brightness corresponding to each pixel in the first image can be obtained through the brightness mapping module. Based on the first brightness and second brightness corresponding to each pixel in the first image, the first gain coefficient corresponding to each pixel is obtained. The saturation gain curve corresponding to the display device is obtained; based on the saturation gain curve, the second gain coefficient corresponding to the first brightness of each pixel in the first image can be obtained. Based on the first saturation, first gain coefficient, and second gain coefficient corresponding to each pixel in the first image, the second saturation corresponding to each pixel in the first image can be obtained through the saturation mapping module. Based on the second brightness, second saturation, and first hue in the first image, a second image is output in the image processing device. The second image can be an HDR image.
[0146] It should be noted that the execution process of the brightness mapping module can be found in this application. Figure 3 The execution process of step S305 in the illustrated embodiment will not be described in detail here.
[0147] It should be noted that the execution process of the saturation mapping module can be found in this application. Figure 3 The process described in step S309 of the illustrated embodiment will not be repeated here.
[0148] In this embodiment, based on the display parameters of the HDR device and the first brightness, first saturation, and first hue of each pixel in the SDR image, an inverse tone mapping method with brightness and saturation adjustments can be used to determine the corresponding HDR image and display the HDR image. In this process, by using the inverse tone mapping method based on brightness and saturation adjustments, the SDR image is converted into an HDR image that matches the HDR device, thus optimizing the display effect of the SDR image on the HDR device.
[0149] Figure 7 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application. Please refer to... Figure 7 The image processing device 10 includes an acquisition module 11 and an adjustment module 12, wherein,
[0150] The acquisition module 11 is used to acquire a first image and display parameters of a display device, wherein the first image is a standard dynamic range (SDR) image and the display device is a high dynamic range (HDR) device.
[0151] The adjustment module 12 is used to adjust the brightness and saturation of the first image according to the display parameters to obtain the second image, wherein the display parameters include at least: display peak brightness (DPL) and / or backlight percentage.
[0152] The image processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0153] In one possible implementation, the adjustment module 12 is specifically used for:
[0154] Obtain the first brightness and first saturation of each pixel in the first image;
[0155] Based on the display parameters and the first brightness of each pixel in the first image, determine the second brightness of each pixel in the first image;
[0156] Based on the first saturation of each pixel in the first image, determine the second saturation of each pixel in the first image;
[0157] The first image is updated based on the second brightness and second saturation of each pixel in the first image to obtain the second image.
[0158] In one possible implementation, the adjustment module 12 is specifically used for:
[0159] Obtain the lightness mapping curve between the first lightness and the mapped lightness corresponding to the DPL, wherein the lightness mapping curve is determined based on the DPL;
[0160] The first mapped brightness is determined based on the first brightness and the brightness mapping curve;
[0161] The second brightness of the pixel is determined based on the first brightness and the first mapped brightness.
[0162] In one possible implementation, the adjustment module 12 is specifically used for:
[0163] The second brightness of the pixel is determined based on the backlight percentage, the first brightness, and the first mapped brightness.
[0164] In one possible implementation, the adjustment module 12 is specifically used for:
[0165] The first gain coefficient of the pixel is determined based on the first brightness and the second brightness of the pixel;
[0166] Obtain the saturation gain curve between the first brightness and the second gain coefficient;
[0167] The second gain coefficient of the pixel is determined based on the first brightness of the pixel and the saturation gain curve;
[0168] The second saturation of the pixel is determined based on the first saturation, the first gain coefficient, and the second gain coefficient.
[0169] In one possible implementation, the adjustment module 12 is specifically used for:
[0170] The product of the first saturation, the first gain coefficient, and the second gain coefficient is determined as the second saturation of the pixel.
[0171] In one possible implementation, the adjustment module 12 is specifically used for:
[0172] For each pixel in the first image, the brightness of the pixel is updated to the corresponding second brightness, and the saturation of the pixel is updated to the corresponding second saturation to obtain the second image.
[0173] Figure 8 This is a schematic diagram of the hardware structure of the image processing device provided in an embodiment of this application. Please refer to... Figure 8 The image processing device 20 may include a processor 21 and a memory 22. The processor 21 and the memory 22 can communicate; for example, the processor 21 and the memory 22 communicate via a communication bus 23.
[0174] The memory 22 is used to store computer-executed instructions;
[0175] The processor 21 is used to execute computer execution instructions stored in the memory 22, causing the processor 21 to perform the image processing method as shown in the above method embodiment.
[0176] Optionally, the image processing device 20 may also include a communication interface, which may include a transmitter and / or a receiver.
[0177] Optionally, the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0178] This application provides a readable storage medium storing a computer program; the computer program is used to implement the image processing method as described in any of the above embodiments.
[0179] This application provides a computer program product, which includes instructions that, when executed, cause a computer to perform the above-described image processing method.
[0180] All or part of the steps in the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.
[0181] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0182] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.
[0183] In this application, the term "comprising" and its variations can refer to non-limiting inclusion; the term "or" and its variations can refer to "and / or". The terms "first", "second", etc., in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0184] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.
Claims
1. An image processing method, characterized by, The method comprises: obtaining a first image and display parameters of a display device, the first image being a standard dynamic range (SDR) image, and the display device being a high dynamic range (HDR) device; adjusting luminance and saturation of the first image according to the display parameters to obtain a second image, wherein the display parameters at least comprise display peak luminance (DPL) and / or backlight percentage; adjusting luminance and saturation of the first image according to the display parameters to obtain a second image comprises: obtaining first luminance and first saturation of each pixel in the first image; determining second luminance of each pixel in the first image according to the display parameters and the first luminance of each pixel in the first image; determining second saturation of each pixel in the first image according to the first saturation of each pixel in the first image; updating the first image according to the second luminance and the second saturation of each pixel in the first image to obtain the second image; for any one pixel in the first image, determining second saturation of the pixel according to first saturation of the pixel comprises: determining a first gain coefficient of the pixel according to the first luminance and the second luminance of the pixel, the first gain coefficient being a ratio of the second luminance to the first luminance; obtaining a saturation gain curve between the first luminance and the second gain coefficient; determining a second gain coefficient of the pixel according to the first luminance of the pixel and the saturation gain curve; determining the second saturation of the pixel as a product of the first saturation, the first gain coefficient and the second gain coefficient; the saturation gain curve is used to reflect a mapping relationship between the first luminance and the second gain coefficient, and the saturation gain curve is obtained by manual adjustment according to a change of saturation corresponding to a luminance range of the display device.
2. The method of claim 1, wherein, the display parameters at least comprise the DPL; for any one pixel in the first image, determining second luminance of the pixel according to the display parameters and the first luminance of the pixel comprises: obtaining a luminance mapping curve between the first luminance and a mapping luminance corresponding to the DPL, the luminance mapping curve being determined according to the DPL; determining a first mapping luminance according to the first luminance and the luminance mapping curve; determining the second luminance of the pixel according to the first luminance and the first mapping luminance.
3. The method of claim 2, wherein, the display parameters at least further comprise the backlight percentage; determining the second luminance of the pixel according to the first luminance and the first mapping luminance comprises: determining the second luminance of the pixel according to the backlight percentage, the first luminance and the first mapping luminance.
4. The method according to claim 2 or 3, characterized in that, updating the first image according to the second luminance and the second saturation of each pixel in the first image to obtain the second image comprises: for each pixel in the first image, updating luminance of the pixel to corresponding second luminance and updating saturation of the pixel to corresponding second saturation to obtain the second image.
5. An image processing apparatus characterized by comprising: The method comprises obtaining a first image and display parameters of a display device, the first image being a standard dynamic range (SDR) image, and the display device being a high dynamic range (HDR) device; The acquisition module is configured to acquire a first image and display parameters of a display device, the first image being a standard dynamic range (SDR) image, and the display device being a high dynamic range (HDR) device. The adjustment module is configured to adjust luminance and saturation of the first image according to the display parameters to obtain a second image, wherein the display parameters at least include a display peak luminance (DPL) and / or a backlight percentage. The adjustment module is specifically configured to: acquire first luminance and first saturation of each pixel in the first image; determine second luminance of each pixel in the first image according to the display parameters and the first luminance of each pixel in the first image; determine second saturation of each pixel in the first image according to the first saturation of each pixel in the first image; update the first image according to the second luminance and the second saturation of each pixel in the first image to obtain the second image; The adjustment module is specifically configured to: for any one pixel in the first image, determine a first gain coefficient of the pixel according to the first luminance and the second luminance of the pixel, the first gain coefficient being a ratio of the second luminance to the first luminance; acquire a saturation gain curve between the first luminance and the second gain coefficient; determine a second gain coefficient of the pixel according to the first luminance of the pixel and the saturation gain curve; determine the second saturation of the pixel as a product of the first saturation, the first gain coefficient and the second gain coefficient. The saturation gain curve is used to reflect a mapping relationship between the first luminance and the second gain coefficient, and the saturation gain curve is obtained by manually adjusting a change of saturation corresponding to a luminance range of the display device.
6. An image processing apparatus characterized by comprising: comprise: a processor and a memory; the memory is configured to store a computer program; the processor is configured to execute the computer program stored in the memory to implement the method in any one of claims 1 to 4.
7. A computer readable storage medium characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are configured to implement the method in any one of claims 1 to 4 when executed by the processor.
8. A computer program product, characterised in that, The computer program is configured to implement the method in any one of claims 1 to 4 when executed by the processor.
Citation Information
Patent Citations
Electronic device performing image conversion, and method thereof
US20180232867A1