Image brightness adjusting method and device

By fitting the brightness curve based on the brightness value of SDR and HDR images in electronic devices, adjusting the image brightness value, the storage pressure problem when displaying HDR images on devices that only support SDR images is solved, and efficient image brightness adjustment is achieved .

CN119479528AActive Publication Date: 2025-02-18VIVO MOBILE COMM CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411862497.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-02-18
Estimated Expiration
2044-12-17

Smart Images

  • Figure CN119479528A_ABST
    Figure CN119479528A_ABST
Patent Text Reader

Abstract

The invention discloses an image brightness adjusting method and device, and belongs to the technical field of image processing. The method comprises the steps of obtaining a first residual image based on brightness values of an SDR image and an HDR image, the first residual image comprising a brightness residual value between the SDR image and the HDR image; based on the first residual image and the first image, a first brightness curve is obtained through fitting, the first brightness curve represents the mapping relation between the brightness value of the first image and the brightness residual value in the first residual image, and the first image is an SDR image or an HDR image; and based on the at least three key points in the first brightness curve and the first image, performing fitting to obtain a second brightness curve, and adjusting the brightness value of the first image through the second brightness curve.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and specifically relates to an image brightness adjustment method and a device thereof. Background Art

[0002] With the development of electronic technology, most electronic devices can support the display of High Dynamic Range (HDR) images, but there are still a small number of electronic devices that only support the display of Standard Dynamic Range (SDR) images.

[0003] In the prior art, in order to display an HDR image on an electronic device that only supports SDR images, the electronic device can obtain an SDR image and an HDR image corresponding to the SDR image, and then obtain a gain image corresponding to the SDR image through the SDR image and the HDR image; thereby, when displaying the image, the electronic device adjusts the brightness value of each pixel in the SDR image according to the gain image, so as to achieve the purpose of displaying the HDR image on an electronic device that only supports SDR images.

[0004] However, in the above method, since the electronic device needs to adjust the brightness value of the SDR image through the gain image, and the image occupies a large storage space in the electronic device, the image file stored in the electronic device is large in size, resulting in greater storage pressure on the electronic device. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide an image brightness adjustment method and device thereof, which can reduce the storage pressure of an electronic device when displaying an HDR image.

[0006] In a first aspect, an embodiment of the present application provides an image brightness adjustment method, which includes: based on the brightness values ​​of an SDR image and an HDR image, obtaining a first residual map, the first residual map including brightness residual values ​​between the SDR image and the HDR image; based on the first residual map and the first image, fitting a first brightness curve, the first brightness curve characterizing a mapping relationship between brightness values ​​of the first image and brightness residual values ​​in the first residual map, the first image being an SDR image or an HDR image; based on at least three key points in the first brightness curve and the first image, fitting a second brightness curve, and adjusting the brightness value of the first image through the second brightness curve.

[0007] In a second aspect, an embodiment of the present application provides an image brightness adjustment device, which includes: an acquisition module, a fitting module, and a processing module. The acquisition module is used to acquire a first residual map based on the brightness values ​​of the SDR image and the HDR image, and the first residual map includes the brightness residual values ​​between the SDR image and the HDR image. The fitting module is used to fit a first brightness curve based on the first residual map and the first image acquired by the acquisition module, and the first brightness curve represents the mapping relationship between the brightness value of the first image and the brightness residual value in the first residual map, and the first image is an SDR image or an HDR image. The processing module is used to fit a second brightness curve based on at least three key points in the first brightness curve obtained by the fitting module and the first image, and adjust the brightness value of the first image through the second brightness curve.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0011] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.

[0012] In an embodiment of the present application, a first residual map can be obtained based on the brightness values ​​of the SDR image and the HDR image, and the first residual map includes the brightness residual values ​​between the SDR image and the HDR image; then, based on the first residual map and the first image, a first brightness curve is fitted, and the first brightness curve represents the mapping relationship between the brightness value of the first image and the brightness residual value in the first residual map, and the first image is an SDR image or an HDR image; finally, based on at least three key points in the first brightness curve and the first image, a second brightness curve is fitted, and the brightness value of the first image is adjusted through the second brightness curve. In the present solution, since the first residual map can characterize the brightness difference between the SDR image and the HDR image, the first brightness curve obtained by fitting the first residual map and the first image by the electronic device can be used to characterize the gain image. Then, the second brightness curve obtained by fitting at least three key points in the first brightness curve and the first image can also characterize the gain image, so that the HDR image can be displayed on an electronic device that only supports SDR images; moreover, the electronic device only needs the first image and at least three key points to fit the second brightness curve, and adjust the brightness value of the first image through the second brightness curve, so compared with the gain image, the size of the stored file is reduced, thereby reducing the memory and performance pressure of the electronic device; in this way, the electronic device can display the HDR image on an electronic device that only supports SDR images while reducing the storage pressure of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is one of the flow charts of an image brightness adjustment method provided in an embodiment of the present application;

[0014] Figure 2 This is the second flowchart of an image brightness adjustment method provided in an embodiment of the present application;

[0015] Figure 3 This is a flowchart of a method for adjusting image brightness provided in an embodiment of the present application;

[0016] Figure 4 is a schematic diagram of an example of a brightness curve provided in an embodiment of the present application;

[0017] Figure 5 This is a fourth flowchart of an image brightness adjustment method provided in an embodiment of the present application;

[0018] Figure 6 This is a fifth flowchart of an image brightness adjustment method provided in an embodiment of the present application;

[0019] Figure 7 This is a sixth flowchart of an image brightness adjustment method provided in an embodiment of the present application;

[0020] Figure 8 This is the seventh flowchart of an image brightness adjustment method provided in an embodiment of the present application;

[0021] Fig. 9 This is a flowchart of an image brightness adjustment method provided in an embodiment of the present application;

[0022] Fig.10 This is a ninth flowchart of a method for adjusting image brightness provided in an embodiment of the present application;

[0023] Fig.11 This is one of the example schematic diagrams of an image display effect provided by an embodiment of the present application;

[0024] Fig.12 This is a second example schematic diagram of an image display effect provided by an embodiment of the present application;

[0025] Fig.13 This is a third example schematic diagram of an image display effect provided by an embodiment of the present application;

[0026] Fig.14 is a structural schematic diagram of an image brightness adjustment device provided in an embodiment of the present application;

[0027] Fig.15 This is one of the hardware structure diagrams of an electronic device provided in an embodiment of the present application;

[0028] Fig.16 This is the second schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0030] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0031] The terms "at least one (item)", "at least one of" and the like in the specification and claims of the present application refer to any one, any two or a combination of more than two of the objects included therein. For example, at least one (item) of a, b, and c can be represented by: "a", "b", "c", "a and b", "a and c", "b and c" and "a, b and c", where a, b, and c can be single or multiple. Similarly, "at least two (items)" refers to two or more, and its meaning is similar to that of "at least one (item)".

[0032] The following is a detailed explanation of the professional terms involved in the image brightness adjustment method, device, electronic device, storage medium and program product provided in the embodiments of the present application.

[0033] HDR image: HDR image refers to high dynamic range imaging image. HDR file is a special graphic file format. In addition to the ordinary red (Red, R), green (Green, G), and blue (Blue, B) pixel information, each pixel in the HDR image also includes the actual brightness information of each pixel, which can provide more dynamic range and image details. Compared with ordinary images, HDR images can provide a wider color range and image details, improve the image light and dark contrast, greatly restore the real environment, and present extremely high image quality.

[0034] SDR image: SDR image refers to standard dynamic range imaging image. SDR file is a special graphic file format. In addition to the ordinary RGB pixel information, each pixel in the SDR image also includes the actual brightness information of each pixel. Compared with HDR images, SDR images do not have more comprehensive details and do not have a wider color range. When an SDR image is overexposed, the information of the brighter part of the image will be lost; similarly, when an SDR image is underexposed, the information of the darker part of the image will also be lost.

[0035] Histogram: Also known as a bar graph, it is a two-dimensional statistical chart whose two coordinates are the statistical sample and the measurement of a certain attribute corresponding to the sample. For this application, the horizontal coordinate of the histogram is the non-repeated brightness value of each pixel in the image, and the vertical coordinate of the histogram is the number of non-repeated brightness values ​​of each pixel in the image.

[0036] Reference diffuse white brightness: Reference diffuse white brightness usually refers to the brightness level of light reflected from the surface of an object under standard lighting conditions. It is used to describe and measure the whiteness of the surface of an object. Reference diffuse white brightness can be measured by specific instruments, such as whiteness meters. These instruments usually emit light within a certain wavelength range and measure the intensity of light reflected from the surface of an object. By comparing the measured value with a known standard value, the white brightness of the surface of the object can be obtained.

[0037] The image brightness adjustment method, device, electronic device, storage medium and program product provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0038] The image brightness adjustment method and device provided in the embodiments of the present application can be applied in the scene of displaying HDR images, for example, displaying the HDR image corresponding to the edited SDR image, and displaying the HDR image corresponding to the captured SDR image.

[0039] Scenario 1: The user may trigger the electronic device to perform image editing on the SDR image in the editing application, for example, adding a filter or adding a new image element to obtain an edited SDR image; then, the electronic device may perform HDR image reconstruction on the edited SDR image to obtain an HDR image; then, the electronic device may calculate the brightness ratio between the brightness value of each pixel in the edited SDR image and the brightness value of each pixel in the HDR image through the image processing end to obtain a first residual map; then, the image processing end in the electronic device may input each brightness residual value in the first residual map and the brightness value of each pixel in the SDR image into a cubic spline function to fit the image. A first brightness curve is obtained; when displaying an image, an image processing end in the electronic device can transmit the SDR image and at least three key points in the first brightness curve to a display end in the electronic device, and the display end can input at least three key points into a cubic spline function to fit a second brightness curve, and input the brightness value of each pixel of the SDR image into the second brightness curve to obtain a brightness residual value corresponding to each pixel of the SDR image, and multiply the brightness value of each pixel of the SDR image by the brightness residual value corresponding to each pixel of the SDR image to adjust the brightness value of the SDR image, so that the electronic device can display an HDR image on an electronic device that only supports SDR images.

[0040] In scenario 2, a user may trigger an electronic device to capture an SDR image, and the electronic device may perform HDR image reconstruction on the SDR image to obtain an HDR image. Then, the electronic device may calculate the brightness ratio between the brightness value of each pixel in the SDR image and the brightness value of each pixel in the HDR image through the image processing end to obtain a first residual map. Then, the image processing end in the electronic device may input each brightness residual value in the first residual map and the brightness value of each pixel in the SDR image into a cubic spline function to fit a first brightness curve. When displaying the image, the image processing end in the electronic device may transmit the SDR image and at least three key points in the first brightness curve to a display end in the electronic device, and the display end may input at least three key points into a cubic spline function to fit a second brightness curve, and input the brightness value of each pixel in the SDR image into the second brightness curve to obtain a brightness residual value corresponding to each pixel in the SDR image, and multiply the brightness value of each pixel in the SDR image by the brightness residual value corresponding to each pixel in the SDR image to adjust the brightness value of the SDR image. In this way, the electronic device may display an HDR image on an electronic device that only supports SDR images.

[0041] It should be noted that the above scenarios are merely illustrative examples of some scenarios in which the embodiments of the present application may be applied. In actual implementation, the embodiments of the present application can also be applied to any possible scenarios such as image transcoding scenarios and video playback scenarios, and the embodiments of the present application are not limited here.

[0042] In the image brightness adjustment method and device provided in the embodiments of the present application, since the first residual map can characterize the brightness difference between the SDR image and the HDR image, the electronic device can use the first brightness curve obtained by fitting the first residual map and the first image to characterize the gain image, and the second brightness curve obtained by fitting at least three key points in the first brightness curve and the first image can also characterize the gain image, so that the HDR image can be displayed on an electronic device that only supports SDR images; moreover, the electronic device only needs to fit the first image and at least three key points to fit the second brightness curve, and adjust the brightness value of the first image through the second brightness curve, so compared with the gain image, the size of the file stored on the display end is reduced, thereby reducing the memory and performance pressure of the electronic device; in this way, the electronic device can display the HDR image on an electronic device that only supports SDR images while reducing the storage pressure of the electronic device.

[0043] The execution subject of the image brightness adjustment method provided in the embodiment of the present application may be an image brightness adjustment device, and the image brightness adjustment device may be an electronic device, or a functional module in an electronic device. The technical solution provided in the embodiment of the present application is described below using an electronic device as an example.

[0044] The present application provides a method for adjusting image brightness. Figure 1 FIG. 2 shows a flow chart of an image brightness adjustment method provided by an embodiment of the present application. Figure 1 As shown, the image brightness adjustment method provided in the embodiment of the present application may include the following steps 201 to 203.

[0045] Step 201: The electronic device obtains a first residual image based on brightness values ​​of the SDR image and the HDR image.

[0046] In an embodiment of the present application, the first residual image includes a brightness residual value between the SDR image and the HDR image.

[0047] Optionally, in an embodiment of the present application, the electronic device may obtain an SDR image and an HDR image through an image processing end in the electronic device, and obtain a first residual image based on brightness values ​​of the SDR image and the HDR image.

[0048] Optionally, in the embodiment of the present application, the image processing end may be a shooting application, an image editing application, or a video playing application in the electronic device, etc. The specific application may be determined according to actual use requirements, and the embodiment of the present application does not limit this.

[0049] In an embodiment of the present application, the above-mentioned SDR image and HDR image may be images of the same shooting scene.

[0050] Optionally, in an embodiment of the present application, the SDR image and the HDR image may be images of different bit sizes.

[0051] Exemplarily, the SDR image may be an 8-bit SDR image, and the HDR image may be a 10-bit HDR image.

[0052] Optionally, in an embodiment of the present application, the SDR image and the HDR image may be images with different frame rates.

[0053] Exemplarily, the SDR image may be a 30-frame SDR image, and the HDR image may be a 60-frame HDR image.

[0054] Optionally, in an embodiment of the present application, the above-mentioned SDR image and HDR image may be images encoded in different ways.

[0055] Exemplarily, the SDR image may be an image encoded in a Gamma encoding mode, and the HDR image may be an image encoded in a product quantization (PQ) encoding mode.

[0056] Optionally, in the embodiment of the present application, the SDR image and the HDR image may be images input by a user; or, the SDR image and the HDR image may be images acquired by the electronic device through a third-party application; or, the SDR image and the HDR image may be images captured by the electronic device. The specifics may be determined according to actual usage requirements, and the embodiment of the present application does not limit them.

[0057] Optionally, in an embodiment of the present application, the electronic device can obtain an SDR image by photographing a camera application, and then obtain an HDR image corresponding to the SDR image through an HDR reconstruction algorithm.

[0058] In an embodiment of the present application, the electronic device can calculate the brightness ratio between the brightness value of each pixel in the SDR image and the brightness ratio of each corresponding pixel in the HDR image to obtain the above-mentioned first residual image.

[0059] In the embodiment of the present application, the above-mentioned SDR image, HDR image and the first residual image have the same image size.

[0060] Exemplarily, if the image size of the SDR image is 3×3, the image sizes of the HDR image and the first residual image are also 3×3.

[0061] Optionally, in the embodiment of the present application, combined with Figure 1 ,like Figure 2 As shown, the above step 201 can be specifically implemented through the following steps 201a and 201d.

[0062] Step 201a: The electronic device performs linear domain conversion on the HDR image to obtain a converted HDR image.

[0063] In the embodiment of the present application, the electronic device can convert the HDR image into the linear domain through the PQ encoding and decoding formula, which can be specifically implemented by the following formula (1).

[0064] P Base_Linear =EOTF PQ (P Base / 1023) (1)

[0065] Among them, P Base_Linear is the converted HDR image, P Base is the HDR image, and 1023 is the bit size of the HDR image.

[0066] Step 201b: The electronic device performs linear domain conversion on the SDR image to obtain a converted SDR image, and aligns the brightness of the converted SDR image with the reference diffuse white brightness to obtain a brightness-aligned SDR image.

[0067] In an embodiment of the present application, the electronic device can convert the SDR image to the linear domain through the Gamma encoding and decoding formula, and align the converted SDR image with the reference diffuse white brightness through the standard recommended value of 203nit to obtain a brightness-aligned SDR image, which can be specifically achieved through the following formula (2).

[0068] P Alter_Linear =EOTF Gamma (P Alter / 255)*0.0203 (2)

[0069] Among them, P Alter_Linear is the SDR image after brightness alignment, P Alter is the SDR image, and 255 is the bit size of the SDR image.

[0070] Step 201c: The electronic device performs brightness extraction processing on the converted HDR image to obtain a first brightness map, and performs brightness extraction processing on the brightness aligned SDR image to obtain a second brightness map.

[0071] In the embodiment of the present application, the electronic device can extract the first brightness map through the R, G, and B channels of the converted HDR image, which can be specifically implemented by the following formula (3).

[0072] P Luma_Base =0.8*max(R,G,B)+0.05*R+0.1*G+0.05*B (3)

[0073] Among them, P Luma_Base is the first brightness image, R is the pixel value of the red channel in the converted HDR image, G is the pixel value of the green channel in the converted HDR image, and B is the pixel value of the blue channel in the converted HDR image.

[0074] In the embodiment of the present application, the electronic device can extract the second brightness map through the R, G, and B channels of the SDR image after brightness alignment, which can be specifically achieved through the following formula (4).

[0075] P Luma_Alter =0.8*max(R,G,B)+0.05*R+0.1*G+0.05*B (4)

[0076] Among them, P Luma_Alter is the second brightness map, R is the pixel value of the red channel in the SDR image after brightness alignment, G is the pixel value of the green channel in the SDR image after brightness alignment, and B is the pixel value of the blue channel in the SDR image after brightness alignment.

[0077] Step 201d: The electronic device calculates a first residual image based on the brightness value of each pixel in the first brightness image and the brightness value of each pixel in the second brightness image.

[0078] In an embodiment of the present application, the electronic device can calculate the ratio between the brightness value of each pixel in the first brightness map and the brightness value of each pixel in the second brightness map, thereby obtaining a first residual map, which can be specifically implemented by the following formula (5).

[0079] P Residul =(P Luma_Base / P Luma_Alter ) (5)

[0080] Among them, P Residul is the first residual, P Luma_Base is the first brightness image, P Luma_Alter is the second brightness map.

[0081] Optionally, in an embodiment of the present application, after calculating the ratio between the brightness value of each pixel in the first brightness map and the brightness value of each pixel in the second brightness map, the electronic device may perform a log2 operation to obtain the above-mentioned first residual map, which may be specifically implemented by the following formula (6).

[0082] P Residul =log2(P Luma_Base / P Luma_Alter ) (6)

[0083] Among them, P Residul is the first residual, P Luma_Base is the first brightness image, P Luma_Alter is the second brightness map.

[0084] In the embodiment of the present application, the first residual map obtained by the electronic device through log2 operation can make the brightness residual value contained in the first residual map more consistent with the intensity change perceived by the human eye.

[0085] Step 202: The electronic device obtains a first brightness curve by fitting based on the first residual map and the first image.

[0086] In an embodiment of the present application, the above-mentioned first brightness curve represents a mapping relationship between a brightness value of a first image and a brightness residual value in a first residual image, and the first image is an SDR image or an HDR image.

[0087] Exemplarily, the first image may be a reference image.

[0088] Optionally, in the embodiment of the present application, the selection of the first image may be preset by the electronic device, or customized by the user, or determined by the electronic device according to the display capability of the electronic device. The specific selection may be determined according to actual use requirements, and the embodiment of the present application does not limit this.

[0089] In the embodiment of the present application, the electronic device can obtain the first brightness curve by fitting the brightness residual value in the first residual map and the brightness value in the first image. For details, please refer to the following embodiment, which will not be described here to avoid repetition.

[0090] Optionally, in the embodiment of the present application, combined with Figure 1 ,like Figure 3 As shown, the above step 202 can be specifically implemented through the following steps 202a to 202d.

[0091] Step 202a: The electronic device samples the brightness residual values ​​in the first residual image to obtain at least one brightness residual value, and samples the brightness values ​​of the pixels corresponding to the at least one brightness residual value in the first image to obtain at least one brightness value.

[0092] Optionally, in the embodiment of the present application, the electronic device may sample the brightness residual values ​​in the first residual map by using a cumulative histogram to obtain at least one brightness residual value.

[0093] Exemplarily, the electronic device can obtain a first full-image histogram corresponding to the first residual image through the following formula (7), and then, through the following formula (8), sample the full-image histogram at an equal frequency every 10% of the image size to obtain a first cumulative histogram, wherein the brightness residual value included in the first cumulative histogram is the at least one brightness residual value mentioned above.

[0094] H Global_Residual =f Hist (P Residual ) (7)

[0095] Among them, H Global_Residual is the first full-image histogram corresponding to the first residual image, P Residual is the first residual graph.

[0096] CH Global_Residual =f CDF (H Global_Residual ) (8)

[0097] Among them, CH Global_Residual is the first cumulative histogram corresponding to the first residual graph, H Global_Residual is the first full-image histogram corresponding to the first residual image.

[0098] Optionally, in the embodiment of the present application, the electronic device may perform grid sampling on the first residual image at intervals of every 10% of the image size to obtain the at least one brightness residual value.

[0099] Optionally, in the embodiment of the present application, the electronic device may perform pixel merging of the first residual map at every 10% of the image size to obtain the at least one brightness residual value.

[0100] Optionally, in an embodiment of the present application, the electronic device may sample the brightness values ​​in the first image by means of a cumulative histogram to obtain at least one brightness value.

[0101] Exemplarily, the electronic device can obtain a second full-image histogram corresponding to the first image through the following formula (9), and then, through the following formula (10), sample the full-image histogram at an equal frequency every 10% of the image size to obtain a second cumulative histogram, wherein the brightness value included in the second cumulative histogram is at least one of the above brightness values.

[0102] H Global_Base =f Hist (P Luma_Base ) (9)

[0103] Among them, H Global_Base is the second full-image histogram corresponding to the first image, P Luma_Base is the brightness map corresponding to the first image.

[0104] CH Global_Base =f CDF (H Global_Base ) (10)

[0105] Among them, CH Global_Base is the second cumulative histogram corresponding to the first image, H Global_Base is the second full-image histogram corresponding to the first image.

[0106] Optionally, in an embodiment of the present application, the electronic device may perform grid sampling on a brightness map corresponding to the first image, that is, the first brightness map, at intervals of every 10% of the image size to obtain the at least one brightness value.

[0107] Optionally, in an embodiment of the present application, the electronic device may perform pixel merging of the first brightness map at every 10% of the image size to obtain the at least one brightness value mentioned above.

[0108] Step 202b: The electronic device obtains a third brightness curve by fitting based on at least one brightness residual value and at least one brightness value.

[0109] In the embodiment of the present application, the at least one brightness residual value corresponds to at least one brightness value.

[0110] Optionally, in an embodiment of the present application, the electronic device may input at least one brightness residual value and at least one brightness value into a curve model, and the model may determine the best fitting parameters through a least squares algorithm, and fill the best fitting parameters into the polynomial to obtain the third brightness curve mentioned above.

[0111] Optionally, in the embodiment of the present application, the curve model may be any one of the following: a polynomial model, an exponential model, or a logarithmic function model, etc. The specific model may be determined according to actual use requirements, and the embodiment of the present application does not limit the model.

[0112] Optionally, in an embodiment of the present application, the electronic device may calculate the ratio between each brightness residual value in at least one brightness residual value and each brightness value in at least one brightness value to obtain at least one third brightness residual value, which may be specifically implemented by the following formula (11); then, the at least one brightness residual value and the at least one brightness value are input into a curve model to obtain the above-mentioned third brightness curve.

[0113] R Global[i] =CH Global_Residual[i] / CH Global_Base[i] (11)

[0114] Among them, R Global[i] is at least one third brightness residual value, CH Global_Residual[i] is at least one brightness residual value, CH Global_Base[i] is at least one brightness value.

[0115] For example, Figure 4 As shown, the electronic device can obtain 7 key points through the above-mentioned polynomial model, the horizontal coordinate of each of the 7 key points is the brightness value, and the vertical coordinate of each of the 7 key points is the brightness residual value; then, the electronic device can obtain the best fitting parameters according to the least squares method, so that the electronic device can fill the best fitting parameters into the polynomial in the polynomial model to obtain the third brightness curve.

[0116] Step 202c: the electronic device performs image division on the first residual image to obtain N first pixel units, and performs image division on the brightness image of the first image to obtain N second pixel units, where N is an integer greater than 1.

[0117] In the embodiment of the present application, the area of ​​each of the N first pixel units is the same.

[0118] Optionally, in the embodiment of the present application, the electronic device may adjust the area size of each pixel unit in the N first pixel units according to the screen transition requirements.

[0119] It should be noted that the adjusted area size of each first pixel unit is the same.

[0120] Optionally, in the embodiment of the present application, each of the N first pixel units may overlap.

[0121] Optionally, in an embodiment of the present application, the electronic device may perform image division on the first residual image according to a preset size to obtain N first pixel units.

[0122] Exemplarily, the electronic device may divide the first residual image into image segments at intervals of every 10% of the image size to obtain N first pixel units.

[0123] In the embodiment of the present application, the area of ​​each of the N second pixel units is the same.

[0124] Optionally, in the embodiment of the present application, the electronic device may adjust the area size of each pixel unit in the N second pixel units according to the screen transition requirements.

[0125] It should be noted that the adjusted area size of each second pixel unit is the same.

[0126] Optionally, in the embodiment of the present application, each of the N second pixel units may overlap.

[0127] Optionally, in an embodiment of the present application, the electronic device may perform image division on the first residual image according to a preset size to obtain N first pixel units.

[0128] Exemplarily, the electronic device may divide the brightness map of the first image, that is, the first brightness map, into N first pixel units at intervals of every 10% of the image size.

[0129] Step 202d: The electronic device obtains a first brightness curve by fitting based on the N first pixel units, the N second pixel units and the third brightness curve.

[0130] In the embodiment of the present application, the electronic device can obtain the first brightness curve by fitting the brightness residual value of each first pixel unit in the N first pixel units, the brightness value of each second pixel unit in the N second pixel units, and the third brightness curve. For details, please refer to the following embodiment, which will not be repeated here to avoid repetition.

[0131] In the embodiment of the present application, the electronic device can characterize the gain image through the first brightness curve. Without the gain image, the electronic device can also adjust the brightness value of the first image through the first brightness curve, thereby improving the flexibility of the electronic device in adjusting the image brightness.

[0132] Optionally, in the embodiment of the present application, combined with Figure 3 ,like Figure 5 As shown, the above step 202d can be specifically implemented through the following steps 301 and 302.

[0133] Step 301: The electronic device calculates a first brightness residual value corresponding to the i-th second pixel unit based on the brightness residual value of the i-th first pixel unit and the brightness value of the i-th second pixel unit, i∈[1,N].

[0134] In an embodiment of the present application, the electronic device can calculate the ratio between the brightness residual value of each first pixel unit in the N first pixel units and the brightness value of each second pixel unit in the N second pixel units to obtain N first brightness residual values ​​corresponding to each second pixel unit in the N second pixel units.

[0135] In the embodiment of the present application, the N second pixel units correspond one-to-one to the N first brightness residual values.

[0136] Exemplarily, the electronic device may calculate the ratio between the brightness residual value of the i-th first pixel unit and the brightness value of the i-th second pixel unit to obtain the first brightness residual value corresponding to the i-th second pixel unit, and then the electronic device may calculate the ratio between the brightness residual value of the i+1-th first pixel unit and the brightness value of the i+1-th second pixel unit to obtain the first brightness residual value corresponding to the i+1-th second pixel unit; and so on, until finally, the electronic device calculates the ratio between the brightness residual value of the N-th first pixel unit and the brightness value of the N-th second pixel unit to obtain the first brightness residual value corresponding to the N-th second pixel unit, so as to obtain the first brightness residual values ​​corresponding to the N second pixel units.

[0137] Step 302: The electronic device interpolates the third brightness curve based on the brightness values ​​of the N second pixel units and the first brightness residual values ​​corresponding to the N second pixel units to obtain the first brightness curve.

[0138] In the embodiment of the present application, the electronic device can interpolate the third brightness curve through the brightness value of each second pixel unit in the brightness values ​​of the N second pixel units and the N first brightness residual values ​​corresponding to the N second pixel units to obtain the first brightness curve. It should be noted that the specific process can be detailed in the following embodiment, and will not be repeated here to avoid repetition.

[0139] In the embodiments of the present application, the electronic device interpolates the third luminance curve based on the luminance values of the N second pixel units and the first luminance residual values corresponding to the N second pixel units, so as to obtain the first luminance curve, which can make the first luminance curve more comprehensively represent the residual characteristics, thereby improving the accuracy of adjusting the image luminance value through the first luminance curve.

[0140] Optionally, in the embodiments of the present application, in combination with Figure 5 , as Figure 6 shown, the above step 302 can be specifically implemented by the following steps 302a to 302c.

[0141] Step 302a: The electronic device determines, based on the luminance value of the i-th second pixel unit, the luminance interval and the second luminance residual value corresponding to the luminance value of the i-th second pixel unit from the third luminance curve.

[0142] In the embodiments of the present application, the electronic device can obtain the luminance value of the i-th second pixel unit, and compare the luminance value of the i-th second pixel unit with the luminance values included in the third luminance curve to obtain the luminance interval corresponding to the luminance value of the i-th second pixel unit; and input the luminance value of the i-th second pixel unit into the third luminance curve to obtain the second residual value corresponding to the i-th second pixel unit.

[0143] Exemplarily, assume that the luminance value of the i-th second pixel unit is a, and this luminance value a corresponds to the luminance interval from b to c (b < c) in the third luminance curve, that is, b < a < c. Then, the luminance value a is input into the third luminance curve to obtain the second luminance residual value corresponding to the luminance value a, which can be specifically implemented by the following formula (12).

[0144] R Global_a =(c - a) / (c - b)*R Global_b +(a - b) / (c - b)*R Global_c (12)

[0145] Wherein, R Global_a is the second residual value corresponding to the i-th second pixel unit, c and b are the luminance intervals, R Global_b is the luminance residual value corresponding to the luminance value b, and R Global_c is the luminance residual value corresponding to the luminance value c.

[0146] Step 302b: The electronic device calculates the mean value of the i-th second luminance residual value and the i-th first luminance residual value to obtain the i-th third luminance residual value.

[0147] In an embodiment of the present application, the electronic device can calculate the average of the i-th second brightness residual value and the i-th first brightness residual value to obtain the i-th third brightness residual value; then, the electronic device can calculate the average of the i+1-th second brightness residual value and the i+1-th first brightness residual value to obtain the i+1-th third brightness residual value; and so on, until the electronic device can calculate the average of the N-th second brightness residual value and the N-th first brightness residual value to obtain the N-th third brightness residual value, so as to obtain N third brightness residual values.

[0148] Exemplarily, the electronic device may calculate the average of the i-th second brightness residual value and the i-th first brightness residual value by using the following formula (13) to obtain the i-th third brightness residual value.

[0149] C Residual_a =(R Global_a +R Global[i]_a ) / 2 (13)

[0150] Among them, C Residual_a is the third brightness residual value of the ith Global_a is the second brightness residual value corresponding to the i-th second pixel unit, R Global[i]_a is the first brightness residual value corresponding to the i-th second pixel unit.

[0151] Optionally, in an embodiment of the present application, the electronic device can calculate the weighted average of the i-th second brightness residual value and the i-th first brightness residual value to obtain the i-th third brightness residual value, and so on to obtain the N-th third brightness residual value, so as to obtain N third brightness residual values.

[0152] Step 302c: The electronic device interpolates a corresponding brightness interval in the third brightness curve based on each third brightness residual value in the N third brightness residual values ​​to obtain a first brightness curve.

[0153] Optionally, in an embodiment of the present application, the electronic device can linearly interpolate each third brightness residual value of the N third brightness residual values ​​in the brightness interval corresponding to the brightness value of each second pixel unit of the N second pixel units in the third brightness curve to obtain a first brightness curve.

[0154] In an embodiment of the present application, the electronic device interpolates the third brightness curve through the brightness values ​​of N second pixel units and the first brightness residual values ​​corresponding to the N second pixel units to obtain the first brightness curve, so that the first brightness curve can more comprehensively characterize the residual characteristics, thereby improving the accuracy of adjusting the image brightness value through the first brightness curve.

[0155] Step 203: The electronic device obtains a second brightness curve by fitting based on at least three key points in the first brightness curve and the first image, and adjusts the brightness value of the first image by using the second brightness curve.

[0156] Optionally, in an embodiment of the present application, an image processing end in the electronic device can transmit at least three key points in the first brightness curve and the first image to a display end in the electronic device, and then, through the display end, fit a second brightness curve based on at least three key points in the first brightness curve and the first image, and adjust the brightness value of the first image through the second brightness curve.

[0157] In an embodiment of the present application, the electronic device may screen the key points in the first brightness curve to obtain at least three key points, and then transmit the first image and the at least three key points to a display end in the electronic device.

[0158] Optionally, in an embodiment of the present application, the electronic device can calculate the slope between each adjacent two of the at least three key points by using the brightness residual value between each adjacent two of the at least three key points to obtain the slope corresponding to each of the at least three key points. Then, the electronic device can transmit the first image, at least three key points and the slope corresponding to each of the at least three key points to a display end in the electronic device.

[0159] Optionally, in an embodiment of the present application, after obtaining at least three key points and the slope corresponding to each of the at least three key points, the electronic device may add the at least three key points and the slope corresponding to each of the at least three key points to an extension file or a header file in the first image.

[0160] Optionally, in an embodiment of the present application, the electronic device may add at least three key points and a slope corresponding to each of the at least three key points to an extension file or a header file in the first image in a first order.

[0161] Optionally, in an embodiment of the present application, the above-mentioned first order may be preset by the electronic device; or customized by the user.

[0162] Exemplarily, the electronic device may add at least three key points and the slope corresponding to each of the at least three key points to the extended file in the first image according to Table 1 below.

[0163] Table 1

[0164]

[0165]

[0166] Among them, PLuma_Base[i] is the pixel value of each pixel in the first image, Res_max is the second key point as follows, C Residual[i] is the brightness residual value corresponding to each of the at least three key points, and slope[i] is the slope corresponding to each of the at least three key points.

[0167] Optionally, in an embodiment of the present application, the electronic device can also adaptively display and map images of multiple different dynamic contents on the browsing interface through the above embodiment, thereby ensuring that the creator's creative intent and artistic expression are restored to the greatest extent possible while maintaining the unity of the overall page effect.

[0168] In the image brightness adjustment method provided in an embodiment of the present application, the electronic device can obtain a first residual map based on the brightness values ​​of a standard dynamic range SDR image and a high dynamic range HDR image, and the first residual map includes brightness residual values ​​between the SDR image and the HDR image; then, based on the first residual map and the first image, a first brightness curve is fitted, and the first brightness curve represents a mapping relationship between the brightness value of the first image and the brightness residual value in the first residual map, and the first image is an SDR image or an HDR image; finally, based on at least three key points in the first brightness curve and the first image, a second brightness curve is fitted, and the brightness value of the first image is adjusted through the second brightness curve. In this scheme, since the first residual map can characterize the brightness difference between the SDR image and the HDR image, the first brightness curve obtained by fitting the first residual map and the first image can be used to characterize the gain image, and the second brightness curve obtained by fitting at least three key points in the first brightness curve and the first image can also characterize the gain image, so that the HDR image can be displayed on an electronic device that only supports SDR images; moreover, the electronic device only needs to fit the first image and at least three key points to fit the second brightness curve, and adjust the brightness value of the first image through the second brightness curve, so compared with the gain image, the size of the file stored on the display end is reduced, thereby reducing the memory and performance pressure of the electronic device; in this way, the electronic device ensures that the HDR image can be displayed on an electronic device that only supports SDR images while reducing the storage pressure of the electronic device.

[0169] Optionally, in the embodiment of the present application, combined with Figure 1 ,like Figure 7 As shown, before the above step 203, the image brightness adjustment method provided in the embodiment of the present application also includes the following steps 401 and 402.

[0170] Step 401: The electronic device performs gradient processing on the first brightness curve, removes key points in the first brightness curve whose gradient is less than or equal to 0, and obtains a fourth brightness curve.

[0171] In an embodiment of the present application, the electronic device can differentiate the first brightness curve to obtain the derived first brightness curve, and then input the brightness residual value of each key point in the first brightness curve into the derived first brightness curve to obtain the gradient corresponding to each key point in the first brightness curve; then compare the gradient corresponding to each key point in the first brightness curve with 0, thereby eliminating the key points in the first brightness curve whose gradient is less than or equal to 0 to obtain a fourth brightness curve.

[0172] Optionally, in an embodiment of the present application, the electronic device may calculate the partial derivative of the first brightness curve to obtain the first brightness curve after partial derivative, and then input the brightness residual value of each key point in the first brightness curve into the first brightness curve after partial derivative to obtain the gradient corresponding to each key point in the first brightness curve; then compare the gradient corresponding to each key point in the first brightness curve with 0, thereby eliminating the key points in the first brightness curve whose gradient is less than or equal to 0 to obtain a fourth brightness curve.

[0173] Step 402: The electronic device removes the first key point that meets the first condition in the fourth brightness curve based on the brightness value corresponding to each key point in the fourth brightness curve, and obtains at least three key points.

[0174] In the embodiment of the present application, the above-mentioned first condition is that the brightness difference between the brightness values ​​corresponding to two adjacent key points is less than or equal to a preset brightness threshold, and the above-mentioned first key point is the second key point of the two adjacent key points that meet the first condition.

[0175] In an embodiment of the present application, the electronic device can calculate the brightness difference between the brightness values ​​corresponding to each two adjacent key points in the fourth brightness curve, and then compare the brightness difference between the brightness values ​​corresponding to each two adjacent key points with a preset brightness threshold, so that when the brightness difference is less than or equal to the preset brightness threshold, the second key point among every two adjacent key points is eliminated to obtain the above-mentioned at least three key points.

[0176] For example, taking the fourth brightness curve including 5 key points as an example, the electronic device can calculate the brightness difference between the first key point and the second key point among the 5 key points to obtain the brightness difference a, compare the brightness difference a with the preset brightness threshold b, and when the brightness difference a is less than the preset brightness threshold b, the electronic device can eliminate the second key point; then the electronic device can calculate the brightness difference between the first key point and the third key point to obtain the brightness difference c, compare the brightness difference c with the preset brightness threshold b, and when the brightness difference c is less than the preset brightness threshold b, the electronic device can eliminate the second key point. Except for the third key point; then, the electronic device can calculate the brightness difference between the first key point and the fourth key point to obtain the brightness difference d, and compare the brightness difference d with the preset brightness threshold b. When the brightness difference d is greater than the preset brightness threshold b, the electronic device can retain the fourth key point; finally, the electronic device can calculate the brightness difference between the fourth key point and the fifth key point to obtain the brightness difference e, and compare the brightness difference e with the preset brightness threshold b. When the brightness difference e is greater than the preset brightness threshold b, the electronic device can retain the fifth key point to obtain 3 key points.

[0177] It should be noted that when eliminating key points in the fourth brightness curve, the electronic device needs to retain the last set of sampling points of the fourth brightness curve, that is, retain the brightness residual value corresponding to the maximum brightness value in the first brightness image, so as to limit the maximum range of the brightness residual value corresponding to the first brightness curve.

[0178] It can be understood that the electronic device needs to retain the last set of sampling points of the fourth brightness curve, which can be understood as: even if the brightness difference between the last set of sampling points of the fourth brightness curve is less than or equal to the preset brightness threshold, the electronic device will not eliminate the last key point in the fourth brightness curve.

[0179] In the embodiment of the present application, the electronic device checks the first brightness curve by gradient and removes key points whose gradient is less than or equal to 0, so as to ensure that the first brightness curve is monotonically increasing and avoid brightness reversal. By checking the brightness difference between every two adjacent points in the first brightness curve and removing key points whose brightness difference is less than a preset brightness threshold, the fault problem caused by uneven brightness transition can be avoided.

[0180] Optionally, in the embodiment of the present application, combined with Figure 1 ,like Figure 8 As shown, the "fitting to obtain the second brightness curve based on at least three key points in the first brightness curve and the first image" in the above step 203 can be specifically implemented through the following step 203a.

[0181] Step 203a, when the first ratio is less than the brightness value corresponding to the second key point, the electronic device fits a second brightness curve based on the brightness residual value of each key point in at least three key points, the slope corresponding to each key point in at least three key points, and the brightness value of the first image.

[0182] In the embodiment of the present application, the above-mentioned first ratio is the ratio between the peak brightness of the screen in the electronic device and the reference diffuse white brightness, and the above-mentioned second key point is the key point with the largest corresponding brightness value among the at least three key points.

[0183] In the embodiment of the present application, the electronic device can use a cubic spline function of the form F(x)=C3*x^3+C2*x^2+C1*x+C0 to fit the second brightness curve.

[0184] Exemplarily, the electronic device can obtain the specific numerical value of each parameter in the above-mentioned cubic spline function based on the brightness residual value of each key point among at least three key points, the slope corresponding to each key point among at least three key points and the brightness value of the first image to obtain the above-mentioned second brightness curve, which can be specifically implemented by the following formula (14).

[0185]

[0186] Among them, slope1 and slope2 are slopes corresponding to every two adjacent key points among at least three key points, y1 and y2 are brightness residual values ​​corresponding to every two adjacent key points among at least three key points, and x1 and x2 are brightness values ​​corresponding to every two adjacent key points in the first image.

[0187] Optionally, in an embodiment of the present application, when the first ratio is greater than or equal to the brightness value corresponding to the second key point and the first image is an HDR image, the electronic device can directly display the first image.

[0188] Optionally, in an embodiment of the present application, when the first ratio is greater than or equal to the brightness value corresponding to the second key point and the first image is an SDR image, the electronic device may adjust the brightness value of the SDR image according to the above embodiment, and then display the adjusted SDR image.

[0189] Optionally, in an embodiment of the present application, the electronic device may extract the brightness value of the first image through RGB. The specific implementation process can be found in the above embodiment, and will not be described again here to avoid repetition.

[0190] In an embodiment of the present application, the electronic device can ensure the quality of the mapped content under different screen capabilities and display requirements, and only increase the file size very slightly, thereby reducing memory and performance pressure while ensuring rendering quality.

[0191] Optionally, in the embodiment of the present application, combined with Figure 1 ,like Fig. 9 As shown, the “adjusting the brightness value of the first image by using the second brightness curve” in the above step 203 can be specifically implemented through the following steps 501 to 504 .

[0192] Step 501: The electronic device calculates a second residual map based on the brightness value of the first image and the second brightness curve.

[0193] In an embodiment of the present application, the electronic device can input the brightness value of each pixel in the first image into the second brightness curve to obtain a brightness residual value corresponding to each pixel in the first image; then, according to the position information of each pixel in the first image, the brightness residual value corresponding to each pixel in the first image is filled in the corresponding position to obtain a second residual map.

[0194] It can be understood that the image size of the second residual image is the same as the image size of the first image.

[0195] Step 502: The electronic device calculates a scaling factor based on the first ratio, the second ratio, and the second key point.

[0196] In the embodiment of the present application, the second key point is the key point having the largest corresponding brightness value among the at least three key points.

[0197] In the embodiment of the present application, the electronic device can calculate the scaling factor by the following formula (15), where formula (15) is specifically:

[0198] W = sign(H Alter -H Base )*clip((H- H Base ) / (H Alter -H Base ),0,1) (15)

[0199] Where W is the scaling factor, H Alter is the second key point, H Base is the second ratio, and H is the first ratio.

[0200] Step 503: The electronic device calculates the product of the scaling factor and the second residual image to obtain a scaled second residual image.

[0201] In an embodiment of the present application, the electronic device may multiply the scaling factor by each brightness residual value in the second residual image to obtain a scaled second residual image, which may be specifically implemented by the following formula (16).

[0202] P Res_Linear = PRes *W (16)

[0203] Among them, P Res_Linear is the scaled second residual map, P Res is the second residual image, and W is the scaling factor.

[0204] Optionally, in an embodiment of the present application, the electronic device may multiply the scaling factor by each brightness residual value in the second residual image, and then perform inverse log2 processing to obtain a scaled second residual image, which can be specifically implemented by the following formula (17).

[0205] P Res_Linear = pow(P Res *W , 2) (17)

[0206] Among them, P Res_Linear is the scaled second residual map, P Res is the second residual image, and W is the scaling factor.

[0207] Step 504: The electronic device calculates the product of the brightness residual value of each pixel in the scaled second residual image and the brightness value of the corresponding pixel in the first image to obtain the first image after brightness adjustment.

[0208] In an embodiment of the present application, the electronic device can multiply the brightness residual value of each pixel point in the scaled second residual image by the brightness value of the corresponding pixel point in the first image to obtain the first image after brightness adjustment, which can be specifically achieved by the following formula (18).

[0209] P Result = P Res_Linear * P Base (18)

[0210] Among them, P Result is the first image after brightness adjustment, P Res_Linear is the scaled second residual map, P Base is the first image.

[0211] Optionally, in an embodiment of the present application, the electronic device may display the first image after brightness adjustment on the screen of the electronic device, so as to display an HDR image on the screen of the electronic device that only supports SDR.

[0212] In the embodiment of the present application, the electronic device can ensure that the first image can be normally displayed on the current screen or match the requirement of displaying a spare image, that is, a non-first image, by scaling and mapping the second residual image.

[0213] The above-mentioned method embodiments, or various possible implementation methods in each method embodiment, can be executed separately, or, under the premise that there is no contradiction, can also be executed in combination with each other. The specific implementation can be determined according to actual usage requirements, and the embodiments of the present application do not limit this.

[0214] For example, Fig.10 As shown, the image brightness adjustment method provided in the embodiment of the present application is specifically explained below through a specific example, which can be specifically implemented through the following steps 20 to 37.

[0215] Step 20: The image processing end in the electronic device obtains the first image and the backup image.

[0216] Optionally, in an embodiment of the present application, the above-mentioned backup image may be an HDR image or an SDR image.

[0217] Optionally, in an embodiment of the present application, the first image may be an HDR image or an SDR image.

[0218] It can be understood that an electronic device can obtain an HDR image and an SDR image, and then, if the electronic device uses the HDR image as the first image, the SDR image is the backup image; or, if the electronic device uses the SDR image as the first image, the HDR image is the backup image.

[0219] Step 21: The image processing end in the electronic device pre-processes the first image.

[0220] In the embodiment of the present application, the electronic device may perform linear domain conversion on the first image, and perform brightness extraction processing on the converted first image to obtain a processed first image.

[0221] Step 22: The image processing end in the electronic device pre-processes the backup image.

[0222] In the embodiment of the present application, the electronic device can perform linear domain conversion on the spare image, and perform brightness extraction processing on the converted spare image to obtain a processed spare image.

[0223] Step 23: The image processing end in the electronic device calculates the log2 coded residual image.

[0224] In an embodiment of the present application, the electronic device may calculate the ratio between the brightness value of each pixel in the processed reference image and the brightness value of each pixel in the processed backup image, and perform a log2 calculation to obtain a residual image.

[0225] Step 24: The image processing end in the electronic device obtains the cumulative histogram of the processed first image and the cumulative histogram of the residual image respectively.

[0226] Step 25: The image processing end in the electronic device calculates the first brightness residual value according to the cumulative histogram of the first image and the cumulative histogram of the residual graph, and obtains a third brightness curve by fitting.

[0227] Step 26: The image processing end in the electronic device performs image segmentation on the first image and the residual image respectively, and calculates the cumulative histogram of the first image after segmentation and the cumulative histogram of the residual image after segmentation respectively, and calculates the second brightness residual value.

[0228] Step 27: The image processing end in the electronic device performs interpolation processing on the third brightness curve based on the first brightness residual value and the second brightness residual value to obtain the first brightness curve.

[0229] Step 28: The image processing end in the electronic device obtains metadata.

[0230] In an embodiment of the present application, the metadata includes: multiple final key points, namely, the at least three key points mentioned above, the maximum brightness residual value, the first image, and the slope corresponding to each key point in the first brightness curve.

[0231] Step 29: The image processing end in the electronic device transmits the metadata to the display end in the electronic device.

[0232] Step 30: The display terminal in the electronic device determines whether to map the display.

[0233] Optionally, in the embodiment of the present application, when the first ratio is greater than or equal to the brightness value corresponding to the maximum brightness residual value, and the first image is an HDR image, the electronic device may execute step 37 to directly display the first image.

[0234] Optionally, in an embodiment of the present application, when the first ratio is greater than or equal to the brightness value corresponding to the maximum brightness residual value, and the first image is an SDR image, the electronic device may perform the following step 31.

[0235] Optionally, in the embodiment of the present application, when the first ratio is less than the brightness value corresponding to the maximum brightness residual value, the electronic device may execute step 31.

[0236] Step 31: The display terminal in the electronic device reads the metadata, and obtains a second brightness curve by fitting based on the metadata.

[0237] Step 32: The display end in the electronic device obtains a second residual image through the second brightness curve.

[0238] Step 33: The display end in the electronic device scales the second residual image by the scaling factor to obtain a scaled second residual image.

[0239] Step 34: The display end in the electronic device performs a linear transformation on the scaled second residual image to obtain a transformed second residual image.

[0240] Step 35: The display end in the electronic device adjusts the brightness of the first image by using the transformed second residual image to obtain a brightness-adjusted first image.

[0241] Step 36: The display terminal in the electronic device displays the first image after the brightness is adjusted.

[0242] Step 37: The display terminal in the electronic device displays the first image.

[0243] It should be noted that the image brightness adjustment method provided in the embodiment of the present application can be executed by an image brightness adjustment device. In the embodiment of the present application, the image brightness adjustment device executing the image brightness adjustment method is taken as an example to illustrate the image brightness adjustment device provided in the embodiment of the present application.

[0244] The following describes in detail the image display effect achieved by the image brightness adjustment method provided in the embodiment of the present application through a specific shooting scene.

[0245] Example 1, such as Fig.11 As shown, the user can trigger the electronic device to capture an SDR image containing the factory building, and the electronic device can perform HDR image reconstruction on the SDR image containing the factory building to obtain an HDR image. Then, the electronic device can calculate the brightness ratio between the brightness value of each pixel in the SDR image and the brightness value of each pixel in the HDR image through the image processing end to obtain a first residual map; then, the image processing end in the electronic device can input each brightness residual value in the first residual map and the brightness value of each pixel in the SDR image into a cubic spline function to fit a first brightness curve; when displaying the image, the image processing end in the electronic device can transmit the SDR image and at least three key points in the first brightness curve to the display in the electronic device. The display end can input at least three key points into the cubic spline function to fit the second brightness curve, and input the brightness value of each pixel of the SDR image into the second brightness curve to obtain the brightness residual value corresponding to each pixel of the SDR image, and multiply the brightness value of each pixel of the SDR image by the brightness residual value corresponding to each pixel of the SDR image to adjust the brightness value of the SDR image. In this way, the electronic device can display an HDR image containing a factory building on an electronic device that only supports SDR images. Compared with the HDR image obtained by mapping a fixed global curve in the prior art, the HDR image obtained by the present application has better image quality, which can ensure that the creator's creative intent and artistic expression are restored to the greatest extent.

[0246] Example 2, such as Fig.12 As shown, the user can trigger the electronic device to capture an SDR image containing a landscape, and the electronic device can perform HDR image reconstruction on the SDR image containing the landscape to obtain an HDR image. Then, the electronic device can calculate the brightness ratio between the brightness value of each pixel in the SDR image and the brightness value of each pixel in the HDR image through the image processing end to obtain a first residual map; then, the image processing end in the electronic device can input each brightness residual value in the first residual map and the brightness value of each pixel in the SDR image into a cubic spline function to fit a first brightness curve; when displaying the image, the image processing end in the electronic device can transmit the SDR image and at least three key points in the first brightness curve to the display in the electronic device. The display end can input at least three key points into the cubic spline function to fit the second brightness curve, and input the brightness value of each pixel of the SDR image into the second brightness curve to obtain the brightness residual value corresponding to each pixel of the SDR image, and multiply the brightness value of each pixel of the SDR image by the brightness residual value corresponding to each pixel of the SDR image to adjust the brightness value of the SDR image. In this way, the electronic device can display an HDR image containing scenery on an electronic device that only supports SDR images. Compared with the HDR image obtained by mapping a fixed global curve in the prior art, the HDR image obtained by the present application has better image quality, which can ensure that the creator's creative intent and artistic expression are restored to the greatest extent.

[0247] Example 3, such as Fig.13As shown, the user can trigger the electronic device to capture an SDR image containing a pipeline, and the electronic device can perform HDR image reconstruction on the SDR image containing the pipeline to obtain an HDR image. Then, the electronic device can calculate the brightness ratio between the brightness value of each pixel in the SDR image and the brightness value of each pixel in the HDR image through the image processing end to obtain a first residual map; then, the image processing end in the electronic device can input each brightness residual value in the first residual map and the brightness value of each pixel in the SDR image into a cubic spline function to fit a first brightness curve; when displaying the image, the image processing end in the electronic device can transmit the SDR image and at least three key points in the first brightness curve to the display in the electronic device. The display end can input at least three key points into the cubic spline function to fit the second brightness curve, and input the brightness value of each pixel of the SDR image into the second brightness curve to obtain the brightness residual value corresponding to each pixel of the SDR image, and multiply the brightness value of each pixel of the SDR image by the brightness residual value corresponding to each pixel of the SDR image to adjust the brightness value of the SDR image. In this way, the electronic device can display the HDR image containing the pipeline on an electronic device that only supports SDR images. Compared with the HDR image obtained by mapping the fixed global curve in the prior art, the HDR image obtained by the present application has better image quality, which can ensure the maximum restoration of the creator's creative intent and artistic expression.

[0248] Fig.14 A possible structural diagram of an image brightness adjustment device involved in an embodiment of the present application is shown. Fig.14 As shown, the image brightness adjustment device 70 may include: an acquisition module 71 , a fitting module 72 and a processing module 73 .

[0249] Among them, the acquisition module 71 is used to acquire a first residual map based on the brightness values ​​of the SDR image and the HDR image, and the first residual map includes the brightness residual values ​​between the SDR image and the HDR image. The fitting module 72 is used to fit a first brightness curve based on the first residual map and the first image acquired by the acquisition module 71, and the first brightness curve represents the mapping relationship between the brightness value of the first image and the brightness residual value in the first residual map, and the first image is an SDR image or an HDR image. The processing module 73 is used to fit a second brightness curve based on at least three key points in the first brightness curve obtained by the fitting module 72 and the first image, and adjust the brightness value of the first image through the second brightness curve.

[0250] In a possible implementation, the processing module 73 is specifically used to sample the brightness residual value in the first residual image acquired by the acquisition module 71 to obtain at least one brightness residual value, and to sample the brightness value of the pixel point corresponding to the at least one brightness residual value in the first image to obtain at least one brightness value. The fitting module 72 is specifically used to fit the third brightness curve based on at least one brightness residual value and at least one brightness value. The processing module 73 is also used to perform image division on the first residual image acquired by the acquisition module 71 to obtain N first pixel units, and to perform image division on the brightness image of the first image to obtain N second pixel units, where N is an integer greater than 1. The fitting module 72 is also used to fit the first brightness curve based on the N first pixel units, the N second pixel units and the third brightness curve.

[0251] In a possible implementation, the fitting module 72 is specifically used to calculate the first brightness residual value corresponding to the i-th second pixel unit based on the brightness residual value of the i-th first pixel unit and the brightness value of the i-th second pixel unit, i∈[1,N]; and interpolate the third brightness curve based on the brightness values ​​of the N second pixel units and the first brightness residual values ​​corresponding to the N second pixel units to obtain the first brightness curve.

[0252] In a possible implementation, the fitting module 72 is specifically used to determine, based on the brightness value of the i-th second pixel unit, a brightness interval and a second brightness residual value corresponding to the brightness value of the i-th second pixel unit from the third brightness curve; and calculate the average of the i-th second brightness residual value and the i-th first brightness residual value to obtain the i-th third brightness residual value; and based on each third brightness residual value of the N third brightness residual values, interpolate in the corresponding brightness interval in the third brightness curve to obtain the first brightness curve.

[0253] In a possible implementation, the processing module 73 is also used to perform gradient processing on the first brightness curve before fitting the second brightness curve based on at least three key points in the first brightness curve, and eliminate key points whose gradients are less than or equal to 0 in the first brightness curve to obtain a fourth brightness curve; and based on the brightness value corresponding to each key point in the fourth brightness curve, eliminate the first key point in the fourth brightness curve that meets the first condition to obtain at least three key points; wherein the first condition is that the brightness difference between the brightness values ​​corresponding to two adjacent key points is less than or equal to a preset brightness threshold, and the first key point is the second key point of the two adjacent key points that meet the first condition.

[0254] An embodiment of the present application provides an image brightness adjustment device. Since the first residual map can characterize the brightness difference between the SDR image and the HDR image, the first brightness curve obtained by fitting the first residual map and the first image of the image brightness adjustment device can be used to characterize the gain image. Then, the second brightness curve obtained by fitting at least three key points in the first brightness curve and the first image can also characterize the gain image, so that the HDR image can be displayed on an electronic device that only supports SDR images; moreover, the image brightness adjustment device only needs to fit the first image and at least three key points to obtain the second brightness curve, and adjust the brightness value of the first image through the second brightness curve, so compared with the gain image, the size of the file stored by the image brightness adjustment device is reduced, thereby reducing the memory and performance pressure of the image brightness adjustment device; in this way, the image brightness adjustment device ensures that the HDR image can be displayed on an electronic device that only supports SDR images while reducing the storage pressure of the image brightness adjustment device.

[0255] The image brightness adjustment device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0256] The image brightness adjustment device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0257] The image brightness adjustment device provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.

[0258] Alternatively, if Fig.15 As shown, an embodiment of the present application further provides an electronic device 90, including a processor 91 and a memory 92, wherein the memory 92 stores programs or instructions that can be executed on the processor 91, and when the program or instructions are executed by the processor 91, the various steps of the above-mentioned image brightness adjustment method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.

[0259] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0260] Fig.16 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0261] The electronic device 100 includes but is not limited to components such as a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110.

[0262] Those skilled in the art will appreciate that the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.16 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0263] Among them, the processor 110 is used to obtain a first residual map based on the brightness values ​​of the SDR image and the HDR image, and the first residual map includes the brightness residual values ​​between the SDR image and the HDR image; and based on the first residual map and the first image, fit a first brightness curve, and the first brightness curve represents the mapping relationship between the brightness value of the first image and the brightness residual value in the first residual map, and the first image is an SDR image or an HDR image; and based on at least three key points in the first brightness curve and the first image, fit a second brightness curve, and adjust the brightness value of the first image through the second brightness curve.

[0264] Optionally, in an embodiment of the present application, the above-mentioned processor 110 is specifically used to sample the brightness residual values ​​in the first residual map to obtain at least one brightness residual value, and sample the brightness values ​​of pixel points corresponding to at least one brightness residual value in the first image to obtain at least one brightness value; based on at least one brightness residual value and at least one brightness value, fit a third brightness curve; perform image division on the first residual map to obtain N first pixel units, and perform image division on the brightness map of the first image to obtain N second pixel units, where N is an integer greater than 1; based on the N first pixel units, the N second pixel units and the third brightness curve, fit a first brightness curve.

[0265] Optionally, in an embodiment of the present application, the above-mentioned processor 110 is specifically used to calculate a first brightness residual value corresponding to the i-th second pixel unit based on the brightness residual value of the i-th first pixel unit and the brightness value of the i-th second pixel unit, i∈[1,N]; and interpolate the third brightness curve based on the brightness values ​​of the N second pixel units and the first brightness residual values ​​corresponding to the N second pixel units to obtain a first brightness curve.

[0266] Optionally, in an embodiment of the present application, the above-mentioned processor 110 is specifically used to determine, based on the brightness value of the i-th second pixel unit, a brightness interval and a second residual value corresponding to the brightness value of the i-th second pixel unit from the third brightness curve; and calculate the average of the i-th second brightness residual value and the i-th first brightness residual value to obtain the i-th third brightness residual value; and based on each third brightness residual value of the N third brightness residual values, interpolate the corresponding brightness interval in the third brightness curve to obtain the first brightness curve.

[0267] Optionally, in an embodiment of the present application, the processor 110 is further used to perform gradient processing on the first brightness curve before fitting the second brightness curve based on at least three key points in the first brightness curve, and eliminate key points whose gradients are less than or equal to 0 in the first brightness curve to obtain a fourth brightness curve; based on the brightness value corresponding to each key point in the fourth brightness curve, eliminate the first key point in the fourth brightness curve that satisfies the first condition to obtain at least three key points; wherein the first condition is that the brightness difference between the brightness values ​​corresponding to two adjacent key points is less than or equal to a preset brightness threshold, and the first key point is the second key point of the two adjacent key points that meet the first condition.

[0268] An embodiment of the present application provides an electronic device. Since the first residual map can characterize the brightness difference between the SDR image and the HDR image, the electronic device can obtain a first brightness curve by fitting the first residual map and the first image, which can be used to characterize the gain image. Then, the second brightness curve obtained by fitting at least three key points in the first brightness curve and the first image can also characterize the gain image, so that the HDR image can be displayed on an electronic device that only supports SDR images; moreover, the electronic device only needs to fit the first image and at least three key points to obtain the second brightness curve, and adjust the brightness value of the first image through the second brightness curve, so compared with the gain image, the size of the file stored in the electronic device is reduced, thereby reducing the memory and performance pressure of the electronic device; in this way, the electronic device can display the HDR image on an electronic device that only supports SDR images while reducing the storage pressure of the electronic device.

[0269] The electronic device provided in the embodiment of the present application can implement each process implemented in the above method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here.

[0270] The beneficial effects of various implementations in this embodiment can be specifically referred to the beneficial effects of the corresponding implementations in the above method embodiment. To avoid repetition, they will not be described again here.

[0271] It should be understood that in the embodiment of the present application, the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0272] The memory 109 can be used to store software programs and various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0273] The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 110.

[0274] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0275] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0276] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0277] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0278] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned image brightness adjustment method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0279] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0280] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0281] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for adjusting image brightness, characterized in that: The method comprises: Based on brightness values ​​of a standard dynamic range (SDR) image and a high dynamic range (HDR) image, obtaining a first residual map, wherein the first residual map includes brightness residual values ​​between the SDR image and the HDR image; Based on the first residual map and the first image, a first brightness curve is fitted, where the first brightness curve represents a mapping relationship between brightness values ​​of the first image and brightness residual values ​​in the first residual map, and the first image is the SDR image or the HDR image; Based on at least three key points in the first brightness curve and the first image, a second brightness curve is fitted, and the brightness value of the first image is adjusted according to the second brightness curve.

2. The method according to claim 1, characterized in that: The fitting to obtain a first brightness curve based on the first residual map and the first image includes: Sampling the brightness residual values ​​in the first residual image to obtain at least one brightness residual value, and sampling the brightness values ​​of the pixels in the first image corresponding to the at least one brightness residual value to obtain at least one brightness value; Based on the at least one brightness residual value and the at least one brightness value, fitting to obtain a third brightness curve; Performing image division on the first residual image to obtain N first pixel units, and performing image division on the brightness image of the first image to obtain N second pixel units, where N is an integer greater than 1; The first brightness curve is obtained by fitting based on the N first pixel units, the N second pixel units and the third brightness curve.

3. The method according to claim 2, characterized in that The fitting of obtaining the first brightness curve based on the N first pixel units, the N second pixel units and the third brightness curve includes: Based on the brightness residual value of the i-th first pixel unit and the brightness value of the i-th second pixel unit, calculate a first brightness residual value corresponding to the i-th second pixel unit, i∈[1,N]; The third brightness curve is interpolated based on the brightness values ​​of the N second pixel units and the first brightness residual values ​​corresponding to the N second pixel units to obtain the first brightness curve.

4. The method according to claim 3, characterized in that The interpolating the third brightness curve based on the brightness values ​​of the N second pixel units and the first residual values ​​corresponding to the N second pixel units to obtain the first brightness curve includes: Based on the brightness value of the i-th second pixel unit, determining a brightness interval and a second residual value corresponding to the brightness value of the i-th second pixel unit from the third brightness curve; Calculate the average of the i-th second brightness residual value and the i-th first brightness residual value to obtain an i-th third brightness residual value; Based on each third brightness residual value of the N third brightness residual values, interpolation is performed on a corresponding brightness interval in the third brightness curve to obtain the first brightness curve.

5. The method according to claim 1, characterized in that Before fitting the second brightness curve based on at least three key points in the first brightness curve, the method further includes: Performing gradient processing on the first brightness curve, removing key points in the first brightness curve where the gradient is less than or equal to 0, to obtain a fourth brightness curve; Based on the brightness value corresponding to each key point in the fourth brightness curve, remove the first key point that meets the first condition in the fourth brightness curve to obtain the at least three key points; Among them, the first condition is that the brightness difference between the brightness values ​​corresponding to two adjacent key points is less than or equal to a preset brightness threshold, and the first key point is the second key point of the two adjacent key points that meet the first condition.

6. An image brightness adjustment device, characterized in that: The image brightness adjustment device comprises: an acquisition module, a fitting module and a processing module; The acquisition module is used to acquire a first residual map based on brightness values ​​of a standard dynamic range SDR image and a high dynamic range HDR image, wherein the first residual map includes brightness residual values ​​between the SDR image and the HDR image; The fitting module is used to fit a first brightness curve based on the first residual map and the first image acquired by the acquisition module, wherein the first brightness curve represents a mapping relationship between brightness values ​​of the first image and brightness residual values ​​in the first residual map, and the first image is the SDR image or the HDR image; The processing module is used to fit a second brightness curve based on at least three key points in the first brightness curve obtained by the fitting module and the first image, and adjust the brightness value of the first image through the second brightness curve.

7. The device according to claim 6, characterized in that The processing module is specifically configured to sample the brightness residual value in the first residual image acquired by the acquisition module to obtain at least one brightness residual value, and sample the brightness value of a pixel point in the first image corresponding to the at least one brightness residual value to obtain at least one brightness value; The fitting module is specifically configured to obtain a third brightness curve by fitting based on the at least one brightness residual value and the at least one brightness value; The processing module is further used to perform image division on the first residual image acquired by the acquisition module to obtain N first pixel units, and perform image division on the brightness image of the first image to obtain N second pixel units, where N is an integer greater than 1; The fitting module is further used to fit the first brightness curve based on the N first pixel units, the N second pixel units and the third brightness curve.

8. The device according to claim 7, characterized in that The fitting module is specifically used to calculate the first brightness residual value corresponding to the i-th second pixel unit based on the brightness residual value of the i-th first pixel unit and the brightness value of the i-th second pixel unit, i∈[1,N]; and interpolate the third brightness curve based on the brightness values ​​of the N second pixel units and the first brightness residual values ​​corresponding to the N second pixel units to obtain the first brightness curve.

9. The device according to claim 8, characterized in that The fitting module is specifically configured to determine, based on the brightness value of the i-th second pixel unit, a brightness interval and a second brightness residual value corresponding to the brightness value of the i-th second pixel unit from the third brightness curve; and calculating the average of the i-th second brightness residual value and the i-th first brightness residual value to obtain the i-th third brightness residual value; And based on each third brightness residual value of the N third brightness residual values, interpolation is performed in a corresponding brightness interval in the third brightness curve to obtain the first brightness curve.

10. The device according to claim 6, characterized in that The processing module is also used to perform gradient processing on the first brightness curve before fitting the second brightness curve based on at least three key points in the first brightness curve, and eliminate key points in the first brightness curve whose gradient is less than or equal to 0 to obtain a fourth brightness curve; and based on the brightness value corresponding to each key point in the fourth brightness curve, eliminate the first key point in the fourth brightness curve that meets the first condition to obtain the at least three key points; wherein the first condition is that the brightness difference between the brightness values ​​corresponding to two adjacent key points is less than or equal to a preset brightness threshold, and the first key point is the second key point of the two adjacent key points that meet the first condition.

Citation Information

Patent Citations

  • Image processing apparatus and image processing method

    CN105794216A

  • Electronic device that dynamically controls standard dynamic range content and high dynamic range content

    CN110867172A

  • Image processing method and device

    CN117499800A

  • Display device

    JP2022079199A

  • Display control apparatus, display control method, and a non-transitory computer-readable medium

    US20210250518A1