Image processing method and device, equipment, storage medium and program product
By generating the target HDR data stream and obtaining the SDR data stream and gain images, the problem that the image display device can only output a single format is solved, and the image display effect is compatible with HDR and SDR formats on different devices is achieved.
Patent Information
- Application Number
- CN202510453657.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, the image display device can only output images in a single format (HDR or SDR), resulting in poor image display effect when the display device does not match the output image format.
By generating the target HDR data stream, the SDR data stream and gain image are obtained. The gain image is related to the difference information of the target HDR data stream and SDR data stream, and image rendering is performed according to the image display format supported by the target device to achieve output compatible with HDR and SDR formats.
It realizes the output of HDR and SDR format images compatible with different display devices, improving the display effect of the image.
Smart Images

Figure CN120339435A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technologies, and in particular, to an image processing method, apparatus, device, storage medium, and program product. Background Art
[0002] Currently, the dynamic range of images mainly has two formats: Standard Dynamic Range (SDR) and High Dynamic Range (HDR). Although HDR has higher brightness, color depth, and a wider color space compared to SDR, SDR is more widely used due to its more mature technology.
[0003] In the prior art, most are single-format image outputs, that is, only HDR images or only SDR images can be output. When the display device does not match the output image format, the display effect of the image is poor.
[0004] Therefore, there is an urgent need for an image processing method that can be compatible with HDR format and SDR format image outputs to improve the display effect of images. Summary of the Invention
[0005] Based on this, in view of the above technical problems, it is necessary to provide an image processing method, apparatus, device, storage medium, and program product that can be compatible with HDR format and SDR format image outputs.
[0006] In a first aspect, this application provides an image processing method, including:
[0007] Generating a target HDR data stream based on the original image;
[0008] Obtaining an SDR data stream and a gain image based on the target HDR data stream, where the gain image is related to the difference information between the target HDR data stream and the SDR data stream;
[0009] Obtaining the image display format supported by the target device, where the image display format includes HDR format or SDR format;
[0010] According to the image display format supported by the target device, performing image rendering processing based on the SDR data stream and / or the gain image, and displaying the rendered image on the target device.
[0011] In a second aspect, this application also provides an image processing apparatus, including:
[0012] A generating module, configured to generate a target HDR data stream based on the original image;
[0013] A first execution module, configured to obtain an SDR data stream and a gain image based on a target HDR data stream, where the gain image is related to the difference information between the target HDR data stream and the SDR data stream;
[0014] An acquisition module, configured to acquire an image display format supported by a target device, where the image display format includes an HDR format or an SDR format;
[0015] A second execution module, configured to perform image rendering processing based on the SDR data stream and / or the gain image according to the image display format supported by the target device, and display the rendered image on the target device.
[0016] In a third aspect, the present application further provides an electronic device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in any one of the embodiments in the first aspect are implemented.
[0017] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in any one of the embodiments in the first aspect are implemented.
[0018] In a fifth aspect, the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the embodiments in the first aspect are implemented.
[0019] For the above image processing method, apparatus, device, storage medium, and program product, first, a target HDR data stream is generated based on an original image, and based on the target HDR data stream, an SDR data stream and a gain image are obtained, where the gain image is related to the difference information between the target HDR data stream and the SDR data stream. Then, an image display format supported by the target device is obtained, where the image display format includes an HDR format or an SDR format. Then, according to the image display format supported by the target device, image rendering processing is performed based on the SDR data stream and / or the gain image, and the rendered image is displayed on the target device. In the image processing method provided by the present application, since the SDR data stream and the gain image are obtained based on the target HDR data stream, and the gain image is related to the difference information between the target data stream and the SDR data stream, when performing image rendering, it is possible to perform rendering based on the SDR data stream according to the image display format supported by the target device, output an image in the SDR format, or perform rendering processing based on the SDR data stream and the gain image, output an image in the HDR format, thereby realizing the output of images in both HDR format and SDR format and improving the display effect of the images. Description of the Drawings
[0020] To more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the accompanying drawings required for the description of the embodiments of the present application or the related art. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0021] Figure 1 It is a schematic flowchart of an image processing method in an embodiment;
[0022] Figure 2 It is a schematic flowchart of obtaining the image display formats supported by a target device in an embodiment;
[0023] Figure 3 It is a schematic flowchart of determining the image display formats supported by a target device in an embodiment;
[0024] Figure 4 It is a schematic flowchart of performing image rendering processing in an embodiment;
[0025] Figure 5 It is a schematic flowchart of generating a target HDR data stream in an embodiment;
[0026] Figure 6 It is a schematic flowchart of obtaining a target HDR data stream in an embodiment;
[0027] Figure 7 It is a structural block diagram of an image processing device in an embodiment;
[0028] Figure 8 It is an internal structural diagram of an electronic device in an embodiment. Detailed implementation manners
[0029] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0030] The dynamic range of an image refers to the luminance difference between the brightest and darkest parts of the image, which reflects the ability of the image to present details and levels from extremely dark to extremely bright. Currently, the dynamic range of images mainly has two formats: Standard Dynamic Range (SDR) and High Dynamic Range (HDR).
[0031] HDR is a technology developed to overcome the limitations of SDR. Compared with SDR, HDR has higher brightness, color depth, and a wider color space. However, due to its more mature technology, SDR is more widely used.
[0032] In the prior art, most are single-format image outputs, that is, only HDR images or only SDR images can be output. When the display device does not match the output image format, the display effect of the image is poor.
[0033] Therefore, there is an urgent need for an image processing method that can be compatible with HDR format and SDR format image outputs to improve the display effect of images.
[0034] In view of this, the present application provides an image processing method, device, equipment, storage medium, and program product. In the image processing method, first, a target HDR data stream is generated based on the original image, and based on the target HDR data stream, an SDR data stream and a gain image are obtained. The gain image is related to the difference information between the target HDR data stream and the SDR data stream. Then, the image display format supported by the target device is obtained. The image display format includes HDR format or SDR format. Then, according to the image display format supported by the target device, image rendering processing is performed based on the SDR data stream and / or the gain image, and the rendered image is displayed on the target device. In the image processing method provided by the present application, since the SDR data stream and the gain image are obtained based on the target HDR data stream, and the gain image is related to the difference information between the target data stream and the SDR data stream, when performing image rendering, according to the image display format supported by the target device, rendering can be performed based on the SDR data stream to output an SDR format image, or rendering processing can be performed based on the SDR data stream and the gain image to output an HDR format image, thereby realizing the compatibility of HDR format and SDR format image outputs and improving the display effect of images.
[0035] In an exemplary embodiment, as Figure 1 shown, an image processing method is provided. Taking the method applied to an electronic device as an example for illustration, where the electronic device can be a device with image processing capabilities. On this basis, the electronic device can also be a device with image display capabilities. Optionally, the electronic device can be a laptop, smartphone, tablet computer, Internet of Things device, and portable wearable device, etc. Among them, the Internet of Things device can be a smart TV, smart vehicle-mounted device, projection device, etc., and the portable wearable device can be a smart watch, smart bracelet, head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, augmented reality (AR) device, smart glasses, etc. As Figure 1As shown, the image processing method may include the following steps:
[0036] Step 101: Generate a target HDR data stream based on the original image.
[0037] In an alternative embodiment of the present application, the original image may be captured by an electronic device or sent to the electronic device by another device. Optionally, the original image may be captured in real time by the electronic device or captured and stored in the electronic device historically. For example, if the electronic device is a smartphone with a camera function, the electronic device may capture the original image and execute the image processing method; or, if the electronic device is a smart TV, another device may send the original image to the smart TV, and the smart TV executes the image processing method.
[0038] In an alternative embodiment of the present application, the original image may be an image generated by an image sensor receiving an optical signal during image capture. That is, the image sensor may be disposed in the electronic device or in another device. Optionally, the original image may be a RAW image, and the image sensor may be a Complementary Metal-Oxide-Semiconductor (CMOS).
[0039] Each pixel unit of the CMOS image sensor integrates a photodiode and some transistors. When light irradiates the photodiode, the photodiode generates charge based on the photoelectric effect. The amount of charge generated is proportional to the intensity of the incident light. The transistors can control the timing and amount of charge reading. Near each pixel unit, a charge-to-voltage conversion is first performed to convert the generated charge signal into a voltage signal to achieve a preliminary conversion from an optical signal to an electrical signal.
[0040] Then, the voltage signals of each pixel unit are selectively read out through a row and column selection circuit, and the analog voltage signals are converted into digital signals through analog-to-digital conversion. These digital signals are combined together in a specific arrangement and coding manner to generate the original image.
[0041] In an alternative embodiment of the present application, the target HDR data stream may be used for rendering and displaying on a display device that supports the HDR image display format. For the obtained original image, the original image may be input into a pre-trained HDR data stream generation model to obtain the target HDR data stream output by the HDR data stream generation model.
[0042] Step 102: Obtain an SDR data stream and a gain image based on the target HDR data stream.
[0043] Among them, the gain image is related to the difference information between the target HDR data stream and the SDR data stream. The difference information can be used to characterize the differences in attributes such as brightness and color of the target HDR data stream and the SDR data stream at each pixel.
[0044] In an alternative embodiment of the present application, the SDR data stream can be used for rendering and displaying on a display device that supports the SDR image display format. In practical applications, there can be various ways to convert the HDR data stream into an SDR data stream. For example, analyze the brightness information in the target HDR data stream to determine its brightness range, and then proportionally compress the brightness values that exceed the SDR range, mapping the high brightness range in the target HDR data stream to the limited brightness interval of the SDR to obtain the SDR data stream. Another example is to layer the target HDR data stream according to brightness or color characteristics. For the highlight layer data, perform a large degree of compression, for the middle layer data, make moderate adjustments, and for the shadow layer data, appropriately increase the brightness. Finally, recombine the processed data of each layer to generate the SDR data stream.
[0045] Then, after converting the target HDR data stream into an SDR data stream, the brightness values can be compared pixel by pixel. For example, if the brightness value of a certain pixel in the target HDR data stream is 220 and the brightness value of the corresponding pixel in the SDR data stream is 120, then the brightness difference between the two pixels can be determined to be 100. Then, traverse all pixels and repeat the above steps. After calculating the brightness differences of all pixels, combine these differences according to the pixel positions to form the first gain image.
[0046] Next, the colors can be compared pixel by pixel. For example, if the RGB value of a certain pixel in the target HDR data stream is (200, 180, 160) and the RGB value of the corresponding pixel in the SDR data stream is (160, 140, 120), then it can be determined that the difference in the R channel between the two pixels is 40, the difference in the G channel is 40, and the difference in the B channel is 40. Then, traverse all pixels and repeat the above steps. After calculating the RGB differences of all pixels, combine these differences according to the pixel positions to form the second gain image. Then, perform a fusion process on the first gain image and the second gain image to obtain a gain image that reflects the difference information between the target HDR data stream and the SDR data stream.
[0047] In another alternative embodiment of the present invention, in practical applications, an adjustable parameter HDR2SDR algorithm can also be adopted to generate an SDR data stream based on the target HDR data stream. The adjustable parameter HDR2SDR algorithm can be used to adjust information such as the dynamic range and color of the target HDR data stream. That is to say, the HDR2SDR algorithm can include multiple adjustable parameters, such as a brightness compression parameter and a color mapping parameter. Among them, the brightness compression parameter can be used to control the compression degree of the high-brightness area in the target HDR data stream. The color mapping parameter can be used to adjust the mapping method of the color in the target HDR data stream to the SDR color space.
[0048] Next, after adopting the adjustable parameter HDR2SDR algorithm to generate an SDR data stream based on the target HDR data stream, a gain image can also be generated according to gain image = f(target HDR data stream, SDR data stream), where f can be a specific functional relationship that takes the target HDR data stream and the SDR data stream as input parameters, and obtains the gain value at each pixel position by comparing and calculating the information of the corresponding pixels in the target HDR data stream and the SDR data stream to form a gain image.
[0049] Step 103: Obtain the image display format supported by the target device.
[0050] In an alternative embodiment of the present application, the image display format refers to a standard used to indicate the encoding, storage, and display methods of image data. Optionally, the image display format can include the HDR format or the SDR format.
[0051] In a possible implementation manner, in practical applications, the operating system of the target device usually provides an interface for querying the image display format supported by the device. For example, a Windows computer provides an application programming interface, and the image display format can be obtained through the interface.
[0052] In another possible implementation manner, the image display format supported by the target device can also be obtained through the Extended Display Identification Data (EDID) of the target device.
[0053] Step 104: Based on the image display format supported by the target device, perform image rendering processing on the SDR data stream and / or the gain image, and display the rendered image on the target device.
[0054] In an alternative embodiment of the present application, image rendering processing is used to convert an SDR data stream and / or a gain image into a visual image that can be presented on a target device. As described above, the image display formats supported by the target device include the HDR format and the SDR format. In other words, when performing image rendering processing, it is either rendered as an HDR image or an SDR image. Therefore, according to the image display format supported by the target device, it is possible to select to perform image rendering processing based on the SDR data stream, or select to perform image rendering processing based on the SDR data stream and the gain image.
[0055] As described above, since the gain image is related to the difference information between the target HDR data stream and the SDR data stream, and the difference information can be used to characterize the differences in attributes such as brightness and color of the target HDR data stream and the SDR data stream at each pixel. Therefore, after determining the image display format supported by the target device, at least one of the SDR data stream and the gain image can be selected for image rendering processing according to the image display format, and the rendered image can be displayed on the target device.
[0056] The image processing method provided in this embodiment first generates a target HDR data stream based on the original image, and based on the target HDR data stream, obtains the SDR data stream and the gain image. The gain image is related to the difference information between the target HDR data stream and the SDR data stream. Then, it obtains the image display format supported by the target device. The image display format includes the HDR format or the SDR format. Then, according to the image display format supported by the target device, image rendering processing is performed based on the SDR data stream and / or the gain image, and the rendered image is displayed on the target device. In the image processing method provided in the present application, since the SDR data stream and the gain image are obtained based on the target HDR data stream, and the gain image is related to the difference information between the target data stream and the SDR data stream, when performing image rendering, it is possible to render based on the SDR data stream according to the image display format supported by the target device and output an SDR format image, or perform rendering processing based on the SDR data stream and the gain image and output an HDR format image, thereby realizing the output of images in both HDR format and SDR format and improving the display effect of the images.
[0057] Please refer to Figure 2 , in an alternative embodiment of the present application, an alternative technical process for obtaining the image display format supported by the target device is provided. As Figure 2 shown, the technical process includes the following steps:
[0058] Step 201, obtain the brightness display capability information of the target device.
[0059] In an alternative embodiment of the present application, the brightness display capability information may be used to indicate the information about the performance that the target device can achieve in terms of brightness when displaying an image. Optionally, the brightness display capability information may include maximum brightness, minimum brightness, brightness uniformity, brightness dynamic range, brightness adjustment accuracy, etc.
[0060] Step 202: Determine the image display format supported by the target device according to the brightness display capability information.
[0061] In an alternative embodiment of the present application, since the image display format includes the HDR format and the SDR format, and the HDR format has a wider brightness range and can present brighter highlight details and darker shadow details, that is, the target device needs to have a higher brightness display capability to display an HDR format image. Therefore, the image display format supported by the target device can be determined according to the brightness display capability information of the target device.
[0062] In a possible implementation manner, if it is determined according to the brightness display capability information that the brightness display value of the target device is greater than a preset threshold, it can be determined that the image display format supported by the target device is the HDR format; if it is determined according to the brightness display capability information that the brightness display value of the target device is less than or equal to the preset threshold, it can be determined that the image display format supported by the target device is the SDR format.
[0063] Among them, the preset threshold can be set in advance by those skilled in the art, and the embodiments of the present application do not specifically limit this.
[0064] In the embodiments of the present application, the brightness display capability information of the target device is first obtained, and then the image display format supported by the target device is determined according to the brightness display capability information. Since the brightness display capability information of the target device is related to the image display format, the accuracy of determining the image display format can be improved.
[0065] Please refer to Figure 3 , in an alternative embodiment of the present application, an alternative technical process for determining the image display format supported by the target device according to the brightness display capability information is provided. As Figure 3 shown, the technical process includes the following steps:
[0066] Step 301: If the brightness display capability information indicates that the display brightness supported by the target device is less than or equal to the minimum HDR excitation multiple, determine that the image display format supported by the target device is the SDR format.
[0067] In an alternative embodiment of the present application, the minimum HDR excitation multiple refers to the minimum multiple that the target device needs to reach relative to the maximum brightness when displaying an SDR image when displaying the bright part of an HDR image. That is, only when the target device can increase the brightness of the bright area in the HDR image above this minimum multiple of the maximum brightness of the SDR image is it possible to better display the high dynamic range effect of the HDR image.
[0068] For example, when the target device displays an SDR image, the brightness is 200 nits. If the specified minimum HDR excitation multiple is 3 times, then if the target device is to support the display of an HDR image, when displaying the bright part of the HDR image, the brightness must be at least 600 nits.
[0069] In a possible implementation manner, the display brightness supported by the target device can be determined according to the brightness display capability information of the target device. If the brightness display capability information indicates that the display brightness supported by the target device is less than or equal to the minimum HDR excitation multiple, it is determined that the image display format supported by the target device is the SDR format.
[0070] Among them, the minimum HDR excitation multiple is preset by those skilled in the art, such as 1, 2, 5, etc., and the embodiments of the present application do not specifically limit this.
[0071] Step 302: If the brightness display capability information indicates that the display brightness supported by the target device is greater than the minimum HDR excitation multiple, it is determined that the image display format supported by the target device is the HDR format.
[0072] In an alternative embodiment of the present application, in a possible implementation manner, if the brightness display capability information indicates that the display brightness supported by the target device is greater than the minimum HDR excitation multiple, it is determined that the image display format supported by the target device is the HDR format.
[0073] For example, when the target device displays an SDR image, the brightness is 200 nits. If the minimum HDR excitation multiple is 2, then when it is determined according to the brightness display capability information that the display brightness supported by the target device is 500 nits, that is, it can be determined that the display brightness supported by the target device is greater than the minimum HDR excitation multiple, and it is determined that the image display format supported by the target device is the HDR format.
[0074] In the embodiments of the present application, if the brightness display capability information indicates that the display brightness supported by the target device is less than or equal to the minimum HDR excitation multiple, it is determined that the image display format supported by the target device is the SDR format; if the brightness display capability information indicates that the display brightness supported by the target device is greater than the minimum HDR excitation multiple, it is determined that the image display format supported by the target device is the HDR format. The image display format supported by the target device is determined based on the display brightness supported by the target device and the minimum HDR excitation multiple. Since the minimum HDR excitation multiple can be used as a criterion for defining whether the target device has the basic brightness capability required for displaying HDR images, the accuracy of determining the image display format supported by the target device can be effectively improved.
[0075] Please refer to Figure 4 , in an alternative embodiment of the present application, an alternative technical process for image rendering processing based on the SDR data stream and / or the gain image according to the image display format supported by the target device is provided. As Figure 4 shown, the technical process includes the following steps:
[0076] Step 401, if the image display format supported by the target device is the SDR format, perform image rendering processing based on the SDR data stream.
[0077] In an alternative embodiment of the present application, the image display format supported by the target device can be determined first. If it is determined according to the brightness display capability information that the image display format supported by the target device is the SDR format, directly perform image rendering processing based on the SDR data stream, and display the rendered SDR image on the target device.
[0078] Step 402, if the image display format supported by the target device is the HDR format, perform image rendering processing based on the SDR data stream and the gain image.
[0079] In an alternative embodiment of the present application, if it is determined according to the brightness display capability information that the image display format supported by the target device is the HDR format, first perform image rendering processing based on the SDR data stream, and then, adjust the SDR image obtained through the image rendering processing based on the gain image. For example, the gain image is made to correspond one by one to the pixel positions of the SDR image obtained through the image rendering processing. Since it is related to the difference information between the target HDR data stream and the SDR data stream, and the difference information can be used to represent the differences in attributes such as brightness and color of the target HDR data stream and the SDR data stream at each pixel, that is, the gain image indicates the degree of enhancement required for each pixel point, therefore, the gain value of the gain image can be applied to the SDR image pixel by pixel.
[0080] For each pixel, its original luminance value can be multiplied by the gain coefficient at the corresponding position in the gain image, which can effectively enhance the luminance dynamic range of the image, enabling the originally darker or brighter parts in the SDR image to be reasonably displayed. After performing the above steps on all pixels, an HDR image can be obtained and displayed on the target device.
[0081] In the embodiments of the present application, if the image display format supported by the target device is the SDR format, image rendering processing is performed based on the SDR data stream. If the image display format supported by the target device is the HDR format, the method of performing image rendering processing based on the SDR data stream and the gain image can, during image rendering, render based on the SDR data stream according to the image display format supported by the target device and output an SDR format image, or perform rendering processing based on the SDR data stream and the gain image and output an HDR format image, thereby achieving the output of images compatible with both HDR format and SDR format and improving the display effect of the images.
[0082] In an exemplary embodiment, performing image rendering processing based on the SDR data stream and the gain image includes: according to the luminance display capability information, using a tone mapping algorithm and the gain image to adjust the SDR data stream, and performing image rendering processing based on the adjusted SDR data stream.
[0083] In an alternative embodiment of the present application, as described above, as long as the luminance display capability information indicates that the display luminance supported by the target device is greater than the minimum HDR excitation multiple, it is determined that the image display format supported by the target device is the HDR format. Therefore, the target device can be a standard HDR device for displaying HDR format images or an ordinary device that uses its maximum performance to display HDR image effects. Therefore, in the case where it is determined that the image display format supported by the target device is the HDR format, it is also necessary to use a tone mapping algorithm to adjust the SDR data stream and the gain image according to the luminance display capability information to achieve the following purposes:
[0084] 1. For standard HDR devices, although they have the ability to display HDR images, there are still differences in aspects such as luminance range, color gamut coverage, and contrast performance among different HDR devices. Therefore, the SDR data stream can be adjusted through a tone mapping algorithm to optimize the display effect of the image and make it match the characteristics of the target device. For example, if the peak luminance of the HDR device is relatively high, based on the tone mapping algorithm, the expressiveness of the highlight part in the image can be enhanced to optimize the display effect of the HDR image. Another example is that if the color gamut of the HDR device is relatively wide, based on the tone mapping algorithm, the color information of the image can be accurately mapped to optimize the display effect of the HDR image.
[0085] 2. For ordinary devices, since the hardware performance may not be sufficient to present all the effects of HDR images, the SDR data stream can be adjusted through a tone mapping algorithm so that it can simulate the HDR effect as much as possible within its capabilities. For example, if the brightness dynamic range of an ordinary device is limited, based on the tone mapping algorithm, the highlight area can be compressed and the brightness of the dark area can be increased to present an image closer to the HDR effect. Moreover, the tone mapping algorithm can also optimize the contrast of the image and enhance the sense of hierarchy of the image, so that ordinary devices can also have a good visual effect when displaying HDR images.
[0086] In a possible implementation, the maximum brightness value and the minimum brightness value of the target device can be determined first according to the brightness display capability information. Then, the SDR data stream is preliminarily adjusted based on the gain image. Then, the scaling factor is determined according to the brightness range of the target device and the brightness range of the pixels in the SDR data stream, and the brightness values of the pixels in the SDR data stream are linearly mapped to the brightness range of the target device based on the scaling factor. For example, if the brightness range of the target device is 0-1000 nits and the brightness range of the pixels in the SDR data stream is 10-100 nits, the scaling factor can be 1000 / (100-10). Then, the brightness value of each pixel in the SDR data stream is multiplied by this scaling factor to obtain the adjusted SDR data stream, and then the image rendering process is performed based on the adjusted SDR data stream.
[0087] In the embodiments of the present application, the method of adjusting the SDR data stream by using the tone mapping algorithm and the gain image according to the brightness display capability information and performing the image rendering process based on the adjusted SDR data stream can greatly retain the key features of the HDR image and effectively improve the display effect of the image when the ordinary device performs the image rendering process.
[0088] Please refer to Figure 5 , in an alternative embodiment of the present application, an alternative technical process for generating a target HDR data stream based on the original image is provided, as Figure 5 shown. The technical process includes the following steps:
[0089] Step 501: Obtain multiple original images with different exposure values.
[0090] In an alternative embodiment of the present application, the exposure value (EV) can be a value used to measure the exposure degree during the image shooting process. Optionally, the exposure value can be determined by the aperture, shutter speed, and sensitivity.
[0091] Step 502: Perform linear fusion processing on the multiple original images to obtain a linear image.
[0092] In an alternative embodiment of the present application, linear fusion processing refers to the fusion processing performed in the linear domain, and the linear domain refers to the case where the linear proportional relationship between the image pixel values and the actual light intensity is maintained. Optionally, the linear image is a high-bit high-dynamic range image.
[0093] In a possible implementation manner, all the original images can be first converted to the same color space, and the sizes of all the original images can be unified. Then, scaling algorithms such as bilinear interpolation are used to adjust each original image to the reference size, and noise interference in each original image is removed through noise reduction algorithms such as Gaussian filtering, so as to improve the image quality and data consistency.
[0094] Next, exposure compensation is performed on all the original images, that is, the average brightness value of each original image is determined, and then the brightness value of each original image is adjusted based on the average brightness value. For example, the original image with a low brightness value is brightened, and the original image with a high brightness value is darkened. Then, the weight of each original image is calculated based on quality indicators such as the sharpness and contrast of each original image. Finally, weighted pixel value calculation and synthesis are performed to obtain a linear image. For example, there are n original images, the (x, y) pixel value Pi(x, y) of the i-th original image, the weight wi, and the weighted pixel value is wiPi(x, y). Then, the weighted pixel values of all the original images are added together. Among them, the pixel values of the synthesized linear image can be calculated based on the following formula:
[0095] .
[0096] Step 503: Perform HDR preprocessing on the linear image to obtain a target HDR data stream.
[0097] In an alternative embodiment of the present application, HDR preprocessing can be used to convert a linear image into an HDR data stream. Optionally, HDR preprocessing can include non-linear processing, color space conversion processing, and HDR encoding processing.
[0098] In a possible implementation manner, the linear image can be input into a pre-trained HDR preprocessing model to obtain the target HDR data stream output by the HDR preprocessing model.
[0099] In the embodiments of the present application, first, multiple original images with different exposure values are acquired. Then, the multiple original images are directly subjected to linear fusion processing to obtain a linear image. Next, HDR preprocessing is performed on the linear image to obtain a target HDR data stream. Since the linear image is directly synthesized after acquiring multiple original images with different exposure values, it avoids the problem of poor display effect of the image caused by the dynamic range compression resulting from traditional preprocessing before synthesis. Moreover, traditional synthesis requires multiple gamma corrections and non-linear domain operations, while the present application directly completes the synthesis in the linear domain and then performs preprocessing on the high-quality linear image, avoiding information loss caused by non-linear domain processing.
[0100] Please refer to Figure 6 , in an alternative embodiment of the present application, an alternative technical process for performing HDR preprocessing on a linear image to obtain a target HDR data stream is provided. As Figure 6 shown, the technical process includes the following steps:
[0101] Step 601: Perform HDR preprocessing on the linear image to obtain an initial HDR data stream.
[0102] In an exemplary embodiment, the HDR preprocessing includes at least one of the following processing methods: non-linear processing, color space conversion processing, and HDR encoding processing.
[0103] In an alternative embodiment of the present application, non-linear processing can be performed on the linear image based on the gamma correction algorithm. Optionally, the gamma correction algorithm can be used to adjust the brightness and contrast of the linear image and simulate the non-linear perception of brightness by the human eye.
[0104] In practical applications, the brightness values of the linear image are linearly stored, while the human eye's perception of brightness is non-linear. Therefore, non-linear processing can be performed on the linear image through the gamma correction algorithm to make the display effect of the image conform to visual characteristics. For example, the linear image can be first normalized so that the pixel values of the linear image are normalized to the range of 0-1. Then, the normalized pixel values are corrected based on the gamma correction algorithm to determine the corrected pixel values. Next, the corrected pixel values are denormalized from the range of 0-1 to the original pixel value range. After that, the pixel values after gamma correction are recombined into an image.
[0105] In an alternative embodiment of the present application, color space conversion processing can be performed on the image after non-linear processing based on a color conversion matrix, and then HDR encoding processing is performed on the image after color space conversion processing based on HDR encoding to obtain an initial HDR data stream.
[0106] Among them, the color conversion matrix and HDR encoding can be preset by technicians, and the embodiments of the present application do not specifically limit this.
[0107] Step 602: Obtain the image display attribute information of the target device.
[0108] Among them, the image display attribute information includes color space information and / or pixel bit number information.
[0109] In an alternative embodiment of the present application, the color space information may include RGB and YUV. RGB refers to a color space based on the three primary colors, and YUV refers to a color space that separates luminance and chrominance. Optionally, the pixel bit number information refers to the information about the number of binary digits occupied by each pixel in the image.
[0110] In practical applications, a pixel is the smallest unit that makes up an image, and each pixel needs to be represented by a certain number of binary digits to represent its color, luminance, etc. The pixel bit number refers to the number of binary digits occupied by each pixel. Common pixel bit numbers are 10 bits, 12 bits, 16 bits, etc.
[0111] For example, when the pixel bit number information indicates that the pixel bit number is 10 bits, each pixel can be represented by 10 - bit binary numbers, and each pixel can represent 1024 different states. When the pixel bit number information indicates that the pixel bit number is 16 bits, each pixel can be represented by 16 - bit binary numbers, and each pixel can represent 65536 different states.
[0112] Step 603: Adjust the initial HDR data stream according to the image display attribute information to obtain the target HDR data stream.
[0113] In an alternative embodiment of the present application, the color space information and / or pixel bit number information can be determined according to the image display attribute information of the target device, and then the initial HDR data stream is adjusted according to the color space information and / or pixel bit number information to obtain the target HDR data stream.
[0114] In an exemplary embodiment, adjusting the initial HDR data stream according to the image display attribute information to obtain the target HDR data stream includes: adjusting the color space of the initial HDR data stream to the target color space indicated by the color space information, and adjusting the pixel bit number of the initial HDR data stream to the target pixel bit number indicated by the pixel bit number information, so as to obtain the target HDR data stream.
[0115] In an alternative embodiment of the present application, color space information and / or pixel bit number information may be determined based on the image display attribute information of the target device, and then the color space of the initial HDR data stream is adjusted to the target color space indicated by the color space information, and the pixel bit number of the initial HDR data stream is adjusted to the target pixel bit number indicated by the pixel bit number information, so as to obtain the target HDR data stream. Optionally, the target pixel bit number indicated by the pixel bit number information is a high bit number, such as 10 bits or 16 bits.
[0116] For ease of understanding, a complete embodiment will be used below to illustrate the image processing method provided by the embodiments of the present application.
[0117] Obtain multiple original images with different exposure values, and perform linear fusion processing on the multiple original images to obtain a linear image.
[0118] Perform HDR preprocessing on the linear image to obtain an initial HDR data stream. The HDR preprocessing includes at least one of the following processing methods: non-linear processing, color space conversion processing, and HDR encoding processing.
[0119] Obtain the image display attribute information of the target device. The image display attribute information includes color space information and / or pixel bit number information; adjust the color space of the initial HDR data stream to the target color space indicated by the color space information, and adjust the pixel bit number of the initial HDR data stream to the target pixel bit number indicated by the pixel bit number information, so as to obtain the target HDR data stream.
[0120] Based on the target HDR data stream, obtain an SDR data stream and a gain image. The gain image is related to the difference information between the target HDR data stream and the SDR data stream; obtain the brightness display capability information of the target device; if the brightness display capability information indicates that the display brightness supported by the target device is less than or equal to the minimum HDR excitation multiple, it is determined that the image display format supported by the target device is the SDR format; if the brightness display capability information indicates that the display brightness supported by the target device is greater than the minimum HDR excitation multiple, it is determined that the image display format supported by the target device is the HDR format.
[0121] If the image display format supported by the target device is the SDR format, perform image rendering processing based on the SDR data stream, and display the rendered image on the target device; if the image display format supported by the target device is the HDR format, according to the brightness display capability information, use a tone mapping algorithm and the gain image to adjust the SDR data stream, and perform image rendering processing based on the adjusted SDR data stream, and display the rendered image on the target device.
[0122] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the indications of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0123] Based on the same inventive concept, an embodiment of the present application also provides an image processing apparatus for implementing the above-mentioned image processing method. The solution provided by the apparatus for solving the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the following image processing apparatus can refer to the limitations on the image processing method in the above text, and will not be repeated here.
[0124] In an exemplary embodiment, as Figure 7 shown, an image processing apparatus 700 is provided, including: a generation module 701, a first execution module 702, an acquisition module 703, and a second execution module 704, where:
[0125] The generation module 701 is configured to generate a target HDR data stream based on the original image;
[0126] The first execution module 702 is configured to obtain an SDR data stream and a gain image based on the target HDR data stream, and the gain image is related to the difference information between the target HDR data stream and the SDR data stream;
[0127] The acquisition module 703 is configured to obtain an image display format supported by the target device, and the image display format includes an HDR format or an SDR format;
[0128] The second execution module 704 is configured to perform image rendering processing based on the SDR data stream and / or the gain image according to the image display format supported by the target device, and display the rendered image on the target device.
[0129] In an alternative embodiment of the present application, the acquisition module 703 is specifically configured to: obtain the brightness display capability information of the target device; determine the image display format supported by the target device according to the brightness display capability information.
[0130] In an alternative embodiment of the present application, the obtaining module 703 is specifically configured to: if the brightness display capability information indicates that the display brightness supported by the target device is less than or equal to the minimum HDR excitation multiple, determine that the image display format supported by the target device is the SDR format; if the brightness display capability information indicates that the display brightness supported by the target device is greater than the minimum HDR excitation multiple, determine that the image display format supported by the target device is the HDR format.
[0131] In an alternative embodiment of the present application, the second execution module 704 is specifically configured to: if the image display format supported by the target device is the SDR format, perform image rendering processing based on the SDR data stream; if the image display format supported by the target device is the HDR format, perform image rendering processing based on the SDR data stream and the gain image.
[0132] In an alternative embodiment of the present application, the second execution module 704 is specifically configured to: according to the brightness display capability information, adjust the SDR data stream by using a tone mapping algorithm and the gain image, and perform image rendering processing based on the adjusted SDR data stream.
[0133] In an alternative embodiment of the present application, the generating module 701 is specifically configured to: obtain multiple original images with different exposure values; perform linear fusion processing on the multiple original images to obtain a linear image; perform HDR preprocessing on the linear image to obtain a target HDR data stream.
[0134] In an alternative embodiment of the present application, the HDR preprocessing includes at least one of the following processing methods: non-linear processing, color space conversion processing, and HDR encoding processing.
[0135] In an alternative embodiment of the present application, the generating module 701 is specifically configured to: perform HDR preprocessing on the linear image to obtain an initial HDR data stream; obtain the image display attribute information of the target device, where the image display attribute information includes color space information and / or pixel bit number information; adjust the initial HDR data stream according to the image display attribute information to obtain a target HDR data stream.
[0136] In an alternative embodiment of the present application, the generating module 701 is specifically configured to: adjust the color space of the initial HDR data stream to the target color space indicated by the color space information, and adjust the pixel bit number of the initial HDR data stream to the target pixel bit number indicated by the pixel bit number information to obtain a target HDR data stream.
[0137] Each module in the above image processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0138] In an exemplary embodiment, an electronic device is provided, and its internal structure diagram can be as Figure 8 shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and external devices. The communication interface of the electronic device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements an image processing method. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the electronic device, or an external keyboard, a touchpad, or a mouse, etc.
[0139] Those skilled in the art can understand that Figure 8 the structure shown in
[0140] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0141] Generate a target HDR data stream based on the original image; obtain an SDR data stream and a gain image based on the target HDR data stream, where the gain image is related to the difference information between the target HDR data stream and the SDR data stream; obtain the image display format supported by the target device, where the image display format includes an HDR format or an SDR format; perform image rendering processing based on the SDR data stream and / or the gain image according to the image display format supported by the target device, and display the rendered image on the target device.
[0142] In one embodiment, when the processor executes the computer program, the following steps are further implemented: obtain the brightness display capability information of the target device; determine the image display format supported by the target device according to the brightness display capability information.
[0143] In one embodiment, when the processor executes the computer program, the following steps are further implemented: if the brightness display capability information indicates that the display brightness supported by the target device is less than or equal to the minimum HDR excitation multiple, determine that the image display format supported by the target device is the SDR format; if the brightness display capability information indicates that the display brightness supported by the target device is greater than the minimum HDR excitation multiple, determine that the image display format supported by the target device is the HDR format.
[0144] In one embodiment, when the processor executes the computer program, the following steps are further implemented: if the image display format supported by the target device is the SDR format, perform image rendering processing based on the SDR data stream; if the image display format supported by the target device is the HDR format, perform image rendering processing based on the SDR data stream and the gain image.
[0145] In one embodiment, when the processor executes the computer program, the following steps are further implemented: according to the brightness display capability information, adjust the SDR data stream using a tone mapping algorithm and the gain image, and perform image rendering processing based on the adjusted SDR data stream.
[0146] In one embodiment, when the processor executes the computer program, the following steps are further implemented: obtain multiple original images with different exposure values; perform linear fusion processing on the multiple original images to obtain a linear image; perform HDR preprocessing on the linear image to obtain a target HDR data stream.
[0147] In one embodiment, the HDR preprocessing includes at least one of the following processing methods: non-linear processing, color space conversion processing, and HDR encoding processing.
[0148] In one embodiment, when the processor executes the computer program, the following steps are further implemented: performing HDR preprocessing on the linear image to obtain an initial HDR data stream; acquiring image display attribute information of the target device, where the image display attribute information includes color space information and / or pixel bit number information; and adjusting the initial HDR data stream according to the image display attribute information to obtain a target HDR data stream.
[0149] In one embodiment, when the processor executes the computer program, the following steps are further implemented: adjusting the color space of the initial HDR data stream to the target color space indicated by the color space information, and adjusting the pixel bit number of the initial HDR data stream to the target pixel bit number indicated by the pixel bit number information, so as to obtain a target HDR data stream.
[0150] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the following steps are implemented:
[0151] Generating a target HDR data stream based on the original image; acquiring an SDR data stream and a gain image based on the target HDR data stream, where the gain image is related to the difference information between the target HDR data stream and the SDR data stream; acquiring the image display format supported by the target device, where the image display format includes HDR format or SDR format; and performing image rendering processing based on the SDR data stream and / or the gain image according to the image display format supported by the target device, and displaying the rendered image on the target device.
[0152] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: acquiring the brightness display capability information of the target device; and determining the image display format supported by the target device according to the brightness display capability information.
[0153] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: if the brightness display capability information indicates that the display brightness supported by the target device is less than or equal to the minimum HDR excitation multiple, determining that the image display format supported by the target device is the SDR format; if the brightness display capability information indicates that the display brightness supported by the target device is greater than the minimum HDR excitation multiple, determining that the image display format supported by the target device is the HDR format.
[0154] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: if the image display format supported by the target device is the SDR format, performing image rendering processing based on the SDR data stream; if the image display format supported by the target device is the HDR format, performing image rendering processing based on the SDR data stream and the gain image.
[0155] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: according to the brightness display capability information, the SDR data stream is adjusted and processed by using a tone mapping algorithm and a gain image, and image rendering processing is performed based on the adjusted SDR data stream.
[0156] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining multiple original images with different exposure values; performing linear fusion processing on the multiple original images to obtain a linear image; performing HDR preprocessing on the linear image to obtain a target HDR data stream.
[0157] In one embodiment, the HDR preprocessing includes at least one of the following processing methods: non-linear processing, color space conversion processing, and HDR encoding processing.
[0158] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: performing HDR preprocessing on the linear image to obtain an initial HDR data stream; obtaining image display attribute information of the target device, where the image display attribute information includes color space information and / or pixel bit number information; adjusting and processing the initial HDR data stream according to the image display attribute information to obtain a target HDR data stream.
[0159] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: adjusting the color space of the initial HDR data stream to the target color space indicated by the color space information, and adjusting the pixel bit number of the initial HDR data stream to the target pixel bit number indicated by the pixel bit number information to obtain a target HDR data stream.
[0160] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0161] Generating a target HDR data stream based on the original image; obtaining an SDR data stream and a gain image based on the target HDR data stream, where the gain image is related to the difference information between the target HDR data stream and the SDR data stream; obtaining the image display format supported by the target device, where the image display format includes an HDR format or an SDR format; performing image rendering processing based on the SDR data stream and / or the gain image according to the image display format supported by the target device, and displaying the rendered image on the target device.
[0162] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining the brightness display capability information of the target device; determining the image display format supported by the target device according to the brightness display capability information.
[0163] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: If the brightness display capability information indicates that the display brightness supported by the target device is less than or equal to the minimum HDR excitation multiple, it is determined that the image display format supported by the target device is the SDR format; if the brightness display capability information indicates that the display brightness supported by the target device is greater than the minimum HDR excitation multiple, it is determined that the image display format supported by the target device is the HDR format.
[0164] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: If the image display format supported by the target device is the SDR format, image rendering processing is performed based on the SDR data stream; if the image display format supported by the target device is the HDR format, image rendering processing is performed based on the SDR data stream and the gain image.
[0165] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: According to the brightness display capability information, the SDR data stream is adjusted by using a tone mapping algorithm and the gain image, and image rendering processing is performed based on the adjusted SDR data stream.
[0166] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: Obtain multiple original images with different exposure values; perform linear fusion processing on the multiple original images to obtain a linear image; perform HDR preprocessing on the linear image to obtain a target HDR data stream.
[0167] In one embodiment, the HDR preprocessing includes at least one of the following processing methods: non-linear processing, color space conversion processing, and HDR encoding processing.
[0168] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: Perform HDR preprocessing on the linear image to obtain an initial HDR data stream; obtain the image display attribute information of the target device, where the image display attribute information includes color space information and / or pixel bit number information; adjust the initial HDR data stream according to the image display attribute information to obtain a target HDR data stream.
[0169] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: Adjust the color space of the initial HDR data stream to the target color space indicated by the color space information, and adjust the pixel bit number of the initial HDR data stream to the target pixel bit number indicated by the pixel bit number information to obtain a target HDR data stream.
[0170] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.
[0171] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this application.
[0172] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. An image processing method, characterized in that, The method includes: Generating a target HDR data stream based on the original image; Obtaining an SDR data stream and a gain image based on the target HDR data stream, where the gain image is related to the difference information between the target HDR data stream and the SDR data stream; Obtaining the image display format supported by the target device, where the image display format includes an HDR format or an SDR format; According to the image display format supported by the target device, performing image rendering processing based on the SDR data stream and / or the gain image, and displaying the rendered image on the target device.
2. The method according to claim 1, wherein The obtaining of the image display format supported by the target device includes: Obtaining the brightness display capability information of the target device; Determining the image display format supported by the target device according to the brightness display capability information.
3. The method according to claim 2, wherein The determining of the image display format supported by the target device according to the brightness display capability information includes: If the brightness display capability information indicates that the display brightness supported by the target device is less than or equal to the minimum HDR excitation multiple, determining that the image display format supported by the target device is the SDR format; If the brightness display capability information indicates that the display brightness supported by the target device is greater than the minimum HDR excitation multiple, determining that the image display format supported by the target device is the HDR format.
4. The method according to claim 1 or 3, characterized in that The performing of image rendering processing based on the SDR data stream and / or the gain image according to the image display format supported by the target device includes: If the image display format supported by the target device is the SDR format, performing image rendering processing based on the SDR data stream; If the image display format supported by the target device is the HDR format, performing image rendering processing based on the SDR data stream and the gain image.
5. The method according to claim 4, wherein The performing of image rendering processing based on the SDR data stream and the gain image includes: According to the brightness display capability information, adjusting the SDR data stream by using a tone mapping algorithm and the gain image, and performing image rendering processing based on the adjusted SDR data stream.
6. The method according to claim 1, wherein The generating of a target HDR data stream based on the original image includes: Obtaining multiple original images with different exposure values; Performing linear fusion processing on the multiple original images to obtain a linear image; Performing HDR preprocessing on the linear image to obtain the target HDR data stream.
7. The method according to claim 6, characterized in that, The HDR preprocessing includes at least one of the following processing methods: non-linear processing, color space conversion processing, and HDR encoding processing.
8. The method according to claim 6, characterized in that, The performing of HDR preprocessing on the linear image to obtain the target HDR data stream includes: Performing HDR preprocessing on the linear image to obtain an initial HDR data stream; Obtaining the image display attribute information of the target device, where the image display attribute information includes color space information and / or pixel bit number information; Adjusting the initial HDR data stream according to the image display attribute information to obtain the target HDR data stream.
9. The method according to claim 8, wherein Adjusting the initial HDR data stream according to the image display attribute information to obtain the target HDR data stream includes: Adjusting the color space of the initial HDR data stream to the target color space indicated by the color space information, and adjusting the pixel bit number of the initial HDR data stream to the target pixel bit number indicated by the pixel bit number information, so as to obtain the target HDR data stream.
10. An image processing apparatus, characterized in that, The apparatus includes: A generation module, configured to generate a target HDR data stream based on an original image; A first execution module, configured to obtain an SDR data stream and a gain image based on the target HDR data stream, where the gain image is related to the difference information between the target HDR data stream and the SDR data stream; An acquisition module, configured to acquire an image display format supported by a target device, where the image display format includes an HDR format or an SDR format; A second execution module, configured to perform image rendering processing based on the SDR data stream and / or the gain image according to the image display format supported by the target device, and display the rendered image on the target device.
11. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Cited By
Image processing method and device, electronic equipment, chip and storage medium
CN120730190A
Image processing method and device, electronic equipment, chip and storage medium
CN120730190B