Scene brightness determination method and device, electronic equipment and readable storage medium

By performing inverse tone mapping on SDR images output by consumer-grade cameras and combining it with shooting parameters, the problem of lost brightness information in SDR images was solved, enabling accurate determination of the brightness of the shooting scene.

CN121567968APending Publication Date: 2026-02-24GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511738072.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-24
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

In existing technologies, SDR images output by consumer cameras lose a large amount of quantitative physical brightness information during the generation process, making it impossible to accurately determine the actual brightness of the shooting scene.

Method used

By acquiring two SDR images, performing inverse tone mapping on each to obtain an HDR image, and combining the image's shooting parameters, the actual brightness of the target scene is determined.

Benefits of technology

It enables accurate determination of the actual brightness of the shooting scene from SDR images, improving the accuracy and reliability of brightness information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121567968A_ABST
    Figure CN121567968A_ABST
Patent Text Reader

Abstract

The invention relates to a scene brightness determination method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring a first SDR image and a second SDR image shot for a target scene; performing inverse tone mapping processing on the first SDR image to obtain a first HDR image, and performing inverse tone mapping processing on the second SDR image to obtain a second HDR image; and determining the actual brightness of the target scene based on the first shooting parameter of the first SDR image, the second shooting parameter of the second SDR image, the brightness of the first HDR image and the brightness of the second HDR image. By adopting the method, the actual brightness of the shooting scene can be accurately determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for determining scene brightness. Background Technology

[0002] Most consumer-grade cameras (such as mobile phones, surveillance cameras, and SLR cameras) output images that are Standard Dynamic Range (SDR) images generated through a series of complex image signal processing pipelines. The dynamic range of SDR images is typically limited to about 0-100 nits, covering only about 6-8 exposure values. The generation process of SDR images usually involves tone mapping, a non-linear, perception-driven compression process whose core objective is to map the high dynamic range (HDR) scene brightness information captured by the sensor to the limited SDR range in a way that is visually appealing on SDR display devices.

[0003] However, due to the strong nonlinearity and device dependence in the tone mapping process, SDR images lose a large amount of quantitative physical brightness information during generation, making it impossible to accurately determine the actual brightness of the shooting scene from the SDR image. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for determining scene brightness that can accurately determine the actual brightness of a shooting scene, in order to address the above-mentioned technical problems.

[0005] Firstly, this application provides a method for determining scene brightness, including:

[0006] Acquire the first and second SDR images captured for the target scene;

[0007] The first SDR image is subjected to inverse tone mapping to obtain a first HDR image, and the second SDR image is subjected to inverse tone mapping to obtain a second HDR image;

[0008] The actual brightness of the target scene is determined based on the first shooting parameters of the first SDR image, the second shooting parameters of the second SDR image, the brightness of the first HDR image, and the brightness of the second HDR image.

[0009] Secondly, this application also provides a scene brightness determination device, comprising:

[0010] The SDR image acquisition module is used to acquire the first SDR image and the second SDR image captured for the target scene.

[0011] The inverse tone mapping processing module is used to perform inverse tone mapping processing on the first SDR image to obtain a first HDR image, and to perform inverse tone mapping processing on the second SDR image to obtain a second HDR image;

[0012] The scene brightness determination module is used to determine the actual brightness of the target scene based on the first shooting parameters of the first SDR image, the second shooting parameters of the second SDR image, the brightness of the first HDR image, and the brightness of the second HDR image.

[0013] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the scene brightness determination method provided in the first aspect.

[0014] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the scene brightness determination method provided in the first aspect.

[0015] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the scene brightness determination method provided in the first aspect.

[0016] The aforementioned method, apparatus, computer device, computer-readable storage medium, and computer program product for determining scene brightness acquire a first SDR image and a second SDR image captured for a target scene, perform inverse tone mapping on the first SDR image to obtain a first HDR image, and perform inverse tone mapping on the second SDR image to obtain a second HDR image. Based on the first shooting parameters of the first SDR image, the second shooting parameters of the second SDR image, the brightness of the first HDR image, and the brightness of the second HDR image, the actual brightness of the target scene is determined. This enables the inverse tone mapping of SDR images to obtain HDR images that are closer to the actual brightness of the shooting scene. Combining the shooting parameters of the SDR image and the brightness of the HDR image, the actual brightness of the shooting scene can be further accurately determined. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the scene brightness determination method in some embodiments;

[0019] Figure 2 This is a schematic diagram of the first SDR image in some embodiments;

[0020] Figure 3 This is a schematic diagram of the second SDR image in some embodiments;

[0021] Figure 4 This is a schematic diagram of the first HDR image in some embodiments;

[0022] Figure 5 This is a schematic diagram of the adjusted second HDR image in some embodiments;

[0023] Figure 6 These are schematic diagrams of initial images in some embodiments;

[0024] Figure 7 This is a schematic diagram of the foreground SDR image in some embodiments;

[0025] Figure 8 This is a schematic diagram of the background SDR image in some embodiments;

[0026] Figure 9 This is a structural block diagram of the scene brightness determination device in some embodiments;

[0027] Figure 10 This is a diagram of the internal structure of an electronic device in some embodiments. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0029] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0030] The scene brightness determination method provided in this application can be applied to electronic devices. These electronic devices can be, but are not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. It is readily understood that the electronic device can be a terminal or a server.

[0031] In one exemplary embodiment, such as Figure 1 As shown, a method for determining scene brightness is provided, which includes steps 102 to 106. Wherein:

[0032] Step 102: Acquire the first SDR image and the second SDR image captured for the target scene.

[0033] The target scene can be any shooting scene. The first SDR image and the second SDR image can be two SDR images captured by the same electronic device or different electronic devices for the target scene. The shooting parameters corresponding to the first SDR image and the second SDR image can be the same or different.

[0034] In practical applications, electronic devices can capture first SDR images and second SDR images of a target scene at the same location and at the same time or at approximately the same time.

[0035] Step 104: Perform inverse tone mapping on the first SDR image to obtain the first HDR image, and perform inverse tone mapping on the second SDR image to obtain the second HDR image.

[0036] Inverse tone mapping refers to the reverse process of tone mapping. It is also called anti-tone mapping. Tone mapping is the process of compressing the luminance information of High Dynamic Range (HDR) into the luminance information of Lower Standard Dynamic Range (SDR). Inverse tone mapping is the process of expanding a Standard Dynamic Range (SDR) image into a High Dynamic Range (HDR) image. Typically, SDR images are stored using 8 bits per channel, corresponding to 256 luminance levels, covering all information from black to white, with a maximum display brightness of 100 nits. HDR images are stored using 10 or 12 bits per channel, corresponding to 1024 or 4096 luminance levels, covering all information from black to white, with a maximum display brightness greater than 1000 nits.

[0037] In one exemplary embodiment, the electronic device can implement inverse tone mapping processing based on an inverse tone mapping algorithm, or it can implement inverse tone mapping processing through an inverse tone mapping model. For example, by training a convolutional neural network model end-to-end using a dataset consisting of paired SDR and HDR images, an inverse tone mapping model that implements inverse tone mapping processing can be obtained after the training conditions are met. The inverse tone mapping algorithm can be a traditional inverse tone mapping processing algorithm or a custom algorithm, and no specific limitation is made here.

[0038] In practical applications, the first SDR image and the second SDR image can be processed by the same inverse tone mapping algorithm or the same inverse tone mapping model to obtain the first HDR image and the second HDR image respectively.

[0039] The first HDR image is obtained by inverse tone mapping of the first SDR image. The second HDR image is obtained by inverse tone mapping of the second SDR image. Electronic devices can obtain the first HDR image by performing inverse tone mapping on the first SDR image, and obtain the second HDR image by performing inverse tone mapping on the second SDR image. The inverse tone mapping method includes an inverse tone mapping algorithm or an inverse tone mapping model, and the inverse tone mapping method can be set according to the actual application scenario.

[0040] Step 106: Determine the actual brightness of the target scene based on the first shooting parameters of the first SDR image, the second shooting parameters of the second SDR image, the brightness of the first HDR image, and the brightness of the second HDR image.

[0041] The first shooting parameter refers to the shooting parameters used to acquire the first SDR image. The second shooting parameter refers to the shooting parameters used to acquire the second SDR image. Shooting parameters can typically be obtained from the EXIF ​​(Exchangeable Image File Format) data corresponding to the respective images. For example, the first shooting parameter can be obtained from the EXIF ​​data corresponding to the first SDR image, and the second shooting parameter can be obtained from the EXIF ​​data corresponding to the second SDR image. Shooting parameters include, for example, exposure time, aperture value, ISO sensitivity, exposure compensation, or exposure mode. Exposure time can be characterized by shutter speed, recording the duration the shutter is open, such as 1 / 125s, 1 / 25s, 1 / 50s, or 2s. Aperture value refers to the size of the lens aperture, such as f / 1.8, f / 2.8, f16, etc. Aperture size affects depth of field and the amount of light entering the camera. ISO sensitivity refers to the sensitivity of the camera sensor to light, such as ISO 100, ISO 800, ISO 1250, ISO 3200, etc. Exposure modes include, for example, manual mode, automatic mode, shutter priority mode, or aperture priority mode. Exposure compensation value refers to the brightness compensation value given according to the exposure compensation method in automatic exposure mode. It is easy to understand that the first shooting parameter may include at least one of the following: first exposure duration, first aperture value, first ISO sensitivity, first exposure compensation, or first exposure mode. The second shooting parameter may include at least one of the following: second exposure duration, second aperture value, second ISO sensitivity, second exposure compensation, or second exposure mode. The first shooting parameter and the second shooting parameter may be the same or different.

[0042] It is readily understood that the brightness of the image involved in this embodiment can be characterized by the grayscale value of each pixel in the image, or by the mean or median of the grayscale values ​​of each pixel in the image. The actual brightness of the target scene refers to the light intensity of the target scene at the time of shooting.

[0043] In an exemplary embodiment, the electronic device can acquire a first SDR image of a target scene based on a first shooting parameter, and acquire a second SDR image of the target scene based on a second shooting parameter.

[0044] In an exemplary embodiment, the electronic device can identify the differences between first shooting parameters of a first SDR image and second shooting parameters of a second SDR image. If the first shooting parameters and the second shooting parameters are different, the brightness of the first HDR image is adjusted based on the first and second shooting parameters to obtain an adjusted first HDR image. The actual brightness of the target scene is determined based on the brightness of the adjusted first HDR image and the brightness of the second HDR image. Alternatively, the brightness of the second HDR image is adjusted based on the first and second shooting parameters to obtain an adjusted second HDR image. The actual brightness of the target scene is determined based on the brightness of the first HDR image and the brightness of the adjusted second HDR image. If the first and second shooting parameters are the same, the actual brightness of the target scene is determined directly based on the brightness of the first HDR image and the brightness of the second HDR image.

[0045] In an exemplary embodiment, a brightness gain can be determined based on the ratio of a first shooting parameter of a first SDR image to a second shooting parameter of a second SDR image. The brightness of the first HDR image is then adjusted based on this brightness gain to obtain the adjusted brightness of the first HDR image. Alternatively, the brightness of the second HDR image can be adjusted based on the brightness gain to obtain the adjusted brightness of the second HDR image. The brightness of the actual scene is then determined based on either the adjusted brightness of the first or second HDR image. Here, the brightness gain characterizes the exposure difference between the first and second shooting parameters.

[0046] In the aforementioned method for determining scene brightness, a first SDR image and a second SDR image captured for the target scene are acquired. The first SDR image undergoes inverse tone mapping to obtain a first HDR image, and the second SDR image undergoes the same process to obtain a second HDR image. Based on the first shooting parameters of the first SDR image, the second shooting parameters of the second SDR image, the brightness of the first HDR image, and the brightness of the second HDR image, the actual brightness of the target scene is determined. This method enables the inverse tone mapping of SDR images to obtain HDR images that more closely approximate the actual brightness of the captured scene. Combining the shooting parameters of the SDR image and the brightness of the HDR image further allows for a more accurate determination of the actual brightness of the captured scene. In other words, it enables the accurate determination of the actual brightness of the target scene based on the captured SDR image, thereby achieving the measurement of the physical brightness of the target scene from the visual perception of the image.

[0047] In some embodiments, determining the actual brightness of the target scene in step 106 based on the first shooting parameters of the first SDR image, the second shooting parameters of the second SDR image, the brightness of the first HDR image, and the brightness of the second HDR image includes:

[0048] When the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are different, the brightness of the first HDR image or the brightness of the second HDR image is adjusted based on the first shooting parameters and the second shooting parameters to obtain the adjusted first HDR image or the adjusted second HDR image; the actual brightness of the target scene is determined based on the brightness of the adjusted first HDR image and the brightness of the second HDR image, or the actual brightness of the target scene is determined based on the brightness of the first HDR image and the brightness of the adjusted second HDR image.

[0049] In practical applications, electronic devices can compare the differences between first shooting parameters of a first SDR image and second shooting parameters of a second SDR image. Each of the first and second shooting parameters may include multiple parameters. The differences between the first and second shooting parameters can be characterized by the differences between the first exposure level corresponding to the first shooting parameter and the second exposure level corresponding to the second shooting parameter. For example, if the first and second exposure levels are the same, it indicates that the first and second shooting parameters are the same; if they are different, it indicates that the first and second shooting parameters are different. The first exposure level is determined by all the first shooting parameters, and the second exposure level is determined by all the second shooting parameters. When the first and second shooting parameters are different, the brightness of the first HDR image is adjusted based on the first and second shooting parameters to obtain an adjusted first HDR image. Then, the actual brightness of the target scene is determined based on the brightness of the adjusted first HDR image and the brightness of the second HDR image. Alternatively, the brightness of the second HDR image is adjusted based on the first and second shooting parameters to obtain an adjusted second HDR image. Then, the actual brightness of the target scene is determined based on the brightness of the first HDR image and the brightness of the adjusted second HDR image.

[0050] For example, when the first and second shooting parameters are different, a brightness gain can be determined based on the first and second shooting parameters. The brightness of the first HDR image can be adjusted based on the brightness gain to obtain an adjusted first HDR image. The brightness of the adjusted first HDR image is compared with the brightness of the second HDR image, and the brightness of the area where the brightness of the adjusted first HDR image and the brightness of the second HDR image are the same is determined as the actual brightness of the corresponding area in the target scene. Alternatively, the brightness of the second HDR image can be adjusted based on the brightness gain to obtain an adjusted second HDR image. The brightness of the first HDR image is compared with the brightness of the adjusted second HDR image, and the brightness of the area where the brightness of the first HDR image and the brightness of the adjusted second HDR image are the same is determined as the actual brightness of the corresponding area in the target scene.

[0051] In an exemplary embodiment, when the first shooting parameters and the second shooting parameters are different, a first exposure level corresponding to the first shooting parameters and a second exposure level corresponding to the second shooting parameters can be determined. If the first exposure level is higher than the second exposure level, the brightness of the second HDR image corresponding to the second shooting parameters is increased based on the exposure gain to obtain an adjusted second HDR image. If the first exposure level is lower than the second exposure level, the brightness of the first HDR image corresponding to the first shooting parameters is increased based on the exposure gain to obtain an adjusted first HDR image. The difference between the first shooting parameters and the second shooting parameters essentially means that the first exposure level corresponding to the first shooting parameters and the second exposure level corresponding to the second shooting parameters are different.

[0052] In an exemplary embodiment, assuming no other brightness factors interfere, the brightness of the adjusted first HDR image and the brightness of the second HDR image should be the same or similar. Therefore, the actual brightness of the target scene can be based on the average brightness of the adjusted first HDR image and the second HDR image. Alternatively, assuming no other brightness factors interfere, the brightness of the first HDR image and the adjusted second HDR image should be the same or similar. The actual brightness of the target scene can be determined based on the average brightness of the first HDR image and the adjusted second HDR image. Here, other brightness factors refer to factors affecting the brightness of the captured image other than the light from natural objects in the target scene, such as flash or fill light.

[0053] In this embodiment, when the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are different, the brightness of the first HDR image or the brightness of the second HDR image is adjusted based on the first shooting parameters and the second shooting parameters to obtain the adjusted first HDR image or the adjusted second HDR image. The actual brightness of the target scene is determined based on the brightness of the adjusted first HDR image and the brightness of the second HDR image, or the actual brightness of the target scene is determined based on the brightness of the first HDR image and the brightness of the adjusted second HDR image. This enables the correction of the brightness of the first HDR image or the second HDR image by shooting parameters when the shooting parameters of the two SDR images are different, and the actual brightness of the target scene is determined based on the brightness of the corrected HDR image, thereby improving the accuracy of the actual brightness of the target scene.

[0054] In some embodiments, when the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are different, the brightness of the first HDR image or the brightness of the second HDR image is adjusted based on the first shooting parameters and the second shooting parameters to obtain the adjusted first HDR image or the adjusted second HDR image, including:

[0055] When the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are different, the brightness gain is determined based on the ratio of the first shooting parameters and the second shooting parameters; based on the brightness gain, the brightness of the first HDR image or the brightness of the second HDR image is adjusted to obtain the adjusted first HDR image or the adjusted second HDR image.

[0056] In this embodiment, when the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are different, the electronic device can calculate the ratio of the first shooting parameters to the second shooting parameters, determine the brightness gain based on the ratio, and adjust the brightness of the first HDR image based on the brightness gain to obtain the adjusted first HDR image. Alternatively, the electronic device can adjust the brightness of the second HDR image based on the brightness gain to obtain the adjusted second HDR image. The brightness gain can be used to characterize the difference in exposure between the first shooting parameters and the second shooting parameters.

[0057] For example, the first shooting parameter may include one or more, and the second shooting parameter may include one or more. If the first shooting parameter includes multiple parameters, the corresponding second shooting parameter also includes multiple parameters. When the first shooting parameter or the second shooting parameter includes multiple parameters, the ratio of each first shooting parameter to the corresponding second shooting parameter can be calculated sequentially, and the final ratio of the first shooting parameter to the second shooting parameter can be determined based on the ratios of each first shooting parameter to the corresponding second shooting parameter. It is easy to understand that when calculating the ratio of each first shooting parameter to the second shooting parameter, the ratio corresponding to the same shooting parameter is calculated. For example, the first shooting parameters include a first exposure time, a first aperture value, and a first ISO sensitivity, and the corresponding second shooting parameters include a second exposure time, a second aperture value, and a second ISO sensitivity. When calculating the ratio of the first shooting parameter to the second shooting parameter, the ratio of the first exposure time to the second exposure time, the ratio of the first aperture value to the second aperture value, and the ratio of the first ISO sensitivity to the second ISO sensitivity are calculated sequentially.

[0058] In an exemplary embodiment, after determining the ratio of the first shooting parameter and the second shooting parameter, this ratio can be directly used as the brightness gain. Alternatively, the product of the ratio of the first shooting parameter and the second shooting parameter and a preset gain coefficient can be used as the brightness gain. The preset gain coefficient can be set based on the actual application scenario, and different scenarios may have different preset gain coefficients. The preset gain coefficient allows the brightness gain to be more adapted to the actual application scenario.

[0059] In an exemplary embodiment, after determining the brightness gain, it can be determined whether to adjust the brightness of the first HDR image or the second HDR image based on the relationship between the brightness gain and 1. For example, if the brightness gain is greater than 1, the brightness of the second HDR image is adjusted to obtain an adjusted second HDR image; if the brightness gain is less than 1, the brightness of the first HDR image is adjusted to obtain an adjusted first HDR image.

[0060] It is easily understood that even when the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are different, the ratio of the second shooting parameters to the first shooting parameters can be calculated, and the brightness gain can be determined based on this ratio. Calculating the ratio of the second shooting parameters to the first shooting parameters and determining the brightness gain based on this ratio is similar to the execution logic in the aforementioned embodiment, except that it determines whether the brightness of the first HDR image or the second HDR image is adjusted based on the magnitude relationship between the brightness gain and 1. If the brightness gain is determined based on the ratio of the second shooting parameters to the first shooting parameters, for example, if the brightness gain is greater than 1, the brightness of the first HDR image is adjusted to obtain an adjusted first HDR image; if the brightness gain is less than 1, the brightness of the second HDR image is adjusted to obtain an adjusted second HDR image.

[0061] In this embodiment, when the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are different, the brightness gain is determined based on the ratio of the first shooting parameters and the second shooting parameters. Based on the brightness gain, the brightness of the first HDR image or the brightness of the second HDR image is adjusted to obtain the adjusted first HDR image or the adjusted second HDR image. This enables accurate correction of the brightness of the first HDR image or the second HDR image based on the brightness gain, thereby determining the actual brightness of the target scene based on the corrected HDR image brightness and improving the accuracy of the actual brightness of the target scene.

[0062] In some embodiments, determining the brightness gain based on the ratio of a first shooting parameter and a second shooting parameter includes:

[0063] Determine the ratio of each first shooting parameter to its corresponding second shooting parameter; multiply the ratios of each first shooting parameter to its corresponding second shooting parameter as the brightness gain.

[0064] In practical applications, when there are multiple first or second shooting parameters, the ratio of each first shooting parameter to its corresponding second shooting parameter is determined, and the product of these ratios is used as the brightness gain. When there is only one first or second shooting parameter, the ratio of that first shooting parameter to its corresponding second shooting parameter is used as the brightness gain.

[0065] In one example, the first shooting parameters include a first exposure time S1 = 1 / 25s, a first aperture value F1 = F1.8, and a first ISO value ISO1 = 1250. The corresponding second shooting parameters include a second exposure time S2 = 1 / 50s, a second aperture value F2 = F1.8, and a second ISO value ISO2 = 800. The ratios of the first and second exposure times S1 / S2, the first and second aperture values ​​F1 / F2, and the first and second ISO values ​​ISO1 / ISO2 are calculated sequentially. The brightness gain K = (S1 / S2) × (F1 / F2) × (ISO1 / ISO2) = ((1 / 25) / (1 / 50)) × (1.8 / 1.8) × (1250 / 800) = 3.125. It is easy to understand that in practical applications, the first or second shooting parameters are not limited to exposure time, aperture value, and ISO; they can include more shooting parameters.

[0066] In this embodiment, by using the product of the ratios of each first shooting parameter to the corresponding second shooting parameter as the brightness gain, the brightness gain can be quickly determined based on a combination of multiple first and second shooting parameters, thereby improving the accuracy and efficiency of brightness gain determination.

[0067] In some embodiments, adjusting the brightness of a first HDR image or a second HDR image based on brightness gain to obtain an adjusted first HDR image or an adjusted second HDR image includes:

[0068] If the brightness gain is less than 1, the brightness of the first HDR image is adjusted based on the reciprocal of the brightness gain to obtain the adjusted first HDR image; or, if the brightness gain is greater than 1, the brightness of the second HDR image is adjusted based on the brightness gain to obtain the adjusted second HDR image.

[0069] In this process, if the brightness gain is less than 1, it means the first exposure level corresponding to the first shooting parameter is less than the second exposure level corresponding to the second shooting parameter, requiring adjustment of the brightness of the first HDR image to obtain the adjusted first HDR image. If the brightness gain is greater than 1, it means the first exposure level corresponding to the first shooting parameter is greater than the second exposure level corresponding to the second shooting parameter, requiring adjustment of the brightness of the second HDR image to obtain the adjusted second HDR image. It's easy to understand that the brightness gain is usually a natural number greater than 0. If the brightness gain is equal to 1, it means the first exposure level corresponding to the first shooting parameter is equal to the second exposure level corresponding to the second shooting parameter.

[0070] For example, if the brightness gain is greater than 1, adjusting the brightness of the second HDR image using the brightness gain is equivalent to brightening the brightness of the second HDR image by a multiple corresponding to the brightness gain, resulting in an adjusted second HDR image. For instance, the brightness of each pixel in the second HDR image can be increased to a multiple corresponding to the original brightness gain, resulting in an adjusted second HDR image. Assuming the brightness gain is 1.5, the brightness of each pixel in the second HDR image can be increased to 1.5 times the original brightness of the corresponding pixel. The original brightness of a pixel refers to its brightness in the second HDR image; the brightness of the corresponding pixel in the adjusted second HDR image is the original brightness multiplied by the brightness gain. If the brightness gain is less than 1, adjusting the brightness of the first HDR image using the reciprocal of the brightness gain is equivalent to brightening the brightness of the first HDR image by a multiple corresponding to the reciprocal of the brightness gain, resulting in an adjusted first HDR image. For instance, the brightness of each pixel in the first HDR image can be increased to a multiple corresponding to the reciprocal of the original brightness gain, resulting in an adjusted first HDR image. For example, assuming a brightness gain of 0.4, the brightness of each pixel in the first HDR image can be increased to 2.5 times the original brightness of the corresponding pixel. In this case, the original brightness of the pixel refers to the brightness of the pixel in the first HDR image, and the brightness of the corresponding pixel in the adjusted first HDR image is the original brightness × (1 / brightness gain).

[0071] In one example, after determining the brightness gain, the electronic device compares the brightness gain with 1 to determine the magnitude relationship between the two values. If the brightness gain is less than 1, the electronic device can calculate the reciprocal of the brightness gain and adjust the brightness of each pixel in the first HDR image based on the reciprocal of the brightness gain to obtain an adjusted first HDR image. If the brightness gain is greater than 1, the electronic device can adjust the brightness of each pixel in the second HDR image based on the brightness gain to obtain an adjusted second HDR image.

[0072] In this embodiment, when the brightness gain is less than 1, the brightness of the first HDR image is adjusted based on the reciprocal of the brightness gain to obtain the adjusted first HDR image. When the brightness gain is greater than 1, the brightness of the second HDR image is adjusted based on the brightness gain to obtain the adjusted second HDR image. This enables accurate adjustment of the brightness of the first or second HDR image based on the brightness gain, thereby improving the accuracy of the adjusted HDR image brightness.

[0073] In some embodiments, determining the actual brightness of the target scene based on the adjusted brightness of the first HDR image and the brightness of the second HDR image includes:

[0074] The brightness of the area where the brightness of the adjusted first HDR image is the same as that of the second HDR image is taken as the actual brightness of the corresponding area in the target scene.

[0075] Based on the brightness of the first HDR image and the adjusted brightness of the second HDR image, the actual brightness of the target scene is determined, including:

[0076] The brightness of the area where the brightness of the first HDR image is the same as the brightness of the adjusted second HDR image is taken as the actual brightness of the corresponding area in the target scene.

[0077] It's easy to understand that if the brightness of the first HDR image is adjusted to obtain the adjusted first HDR image, the brightness of the adjusted first HDR image is usually the same as or similar to that of the second HDR image, assuming no other brightness factors interfere. Other brightness factors include flash or fill light. For example, if no flash was used when shooting the first SDR image, but a flash was used when shooting the second SDR image, the foreground in the second SDR image will be brighter than the foreground in the first SDR image. Correspondingly, the foreground in the second HDR image will also be brighter than the foreground in the first HDR image. In other words, the foreground of the image after overall processing based on the second SDR image will be brighter at every stage. However, since other brightness factors are far from the background and have little impact on it, the background brightness of the adjusted first HDR image and the second HDR image should be the same, or the background brightness of the first HDR image and the adjusted second HDR image should be the same. Therefore, areas where the brightness of the adjusted first HDR image is the same as that of the second HDR image indicate that there is no interference from other brightness factors, and the brightness of these areas is taken as the actual brightness of the corresponding areas in the target scene. Similarly, if the brightness of the second HDR image is adjusted to obtain the adjusted second HDR image, the brightness of the first HDR image and the adjusted second HDR image are usually the same or similar, assuming no other brightness factors interfere. The brightness of the area where the brightness of the first HDR image and the adjusted second HDR image are the same can be taken as the actual brightness of the corresponding area in the target scene.

[0078] In one example, during the capture of SDR images, the first SDR image was captured without a flash, while the second SDR image was captured with a flash. The first SDR image is shown below. Figure 2 As shown, the second SDR image is as follows Figure 3 As shown ( Figure 3 (302 in the middle indicates the flash). Figure 2 and Figure 3It is known that two SDR images taken for the same target scene may have different brightness levels in the foreground or background. The first HDR image obtained by performing inverse tone mapping on the first SDR image is shown below. Figure 4 As shown, a second HDR image is obtained by performing inverse tone mapping on the second SDR image. The brightness of the second HDR image is then adjusted by adjusting the brightness gain, resulting in the adjusted second HDR image. Figure 5 As shown ( Figure 5 (502 represents the flash). Because a flash was used during the capture of the second SDR image, the foreground of the adjusted second HDR image is brighter than the foreground of the first HDR image. Since the background is unaffected by the flash, its brightness is the same as the background of the first HDR image. Therefore, the brightness of the area in the adjusted second HDR image that is the same as the brightness of the first HDR image (i.e., the background area) can be used as the actual brightness of the corresponding area in the target scene (i.e., the distant buildings in the image).

[0079] In this embodiment, by taking the brightness of the area where the brightness of the adjusted first HDR image is the same as that of the second HDR image as the actual brightness of the corresponding area in the target scene, or by taking the brightness of the area where the brightness of the first HDR image is the same as that of the adjusted second HDR image as the actual brightness of the corresponding area in the target scene, a more accurate actual brightness of the corresponding area in the target scene can be obtained.

[0080] In some embodiments, determining the actual brightness of the target scene based on first shooting parameters of a first SDR image, second shooting parameters of a second SDR image, and the brightness of a first HDR image and a second HDR image includes:

[0081] When the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are the same, the actual brightness of the target scene is determined based on the brightness of the first HDR image and the brightness of the second HDR image.

[0082] In this context, the first shooting parameters of the first SDR image being the same as the second shooting parameters of the second SDR image means that the first exposure level corresponding to the first shooting parameters is the same as the second exposure level corresponding to the second shooting parameters. It is easy to understand that the first exposure level is determined based on all the first shooting parameters, and the second exposure level is determined based on all the second shooting parameters.

[0083] In an exemplary embodiment, assuming no other brightness factors interfere and the first and second exposure levels are the same, the brightness of the first HDR image and the brightness of the second HDR image should be the same or similar. Therefore, the average brightness of the first HDR image and the second HDR image can be used as the actual brightness of the target scene. For example, the average brightness of each pixel in the first HDR image and the brightness of the matching pixels in the second HDR image can be used as the actual brightness of the corresponding location in the target scene.

[0084] In an exemplary embodiment, if other brightness factors interfere, the brightness of the first HDR image and the second HDR image may differ in some local areas. In such cases, the brightness of the area where the brightness of the first HDR image and the second HDR image are the same can be taken as the actual brightness of the corresponding area in the target scene.

[0085] In this embodiment, by using the same first shooting parameters for the first SDR image and the same second shooting parameters for the second SDR image, the actual brightness of the target scene can be determined based on the brightness of the first HDR image and the brightness of the second HDR image, which can conveniently and accurately determine the actual brightness of the target scene.

[0086] In some embodiments, when the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are the same, determining the actual brightness of the target scene based on the brightness of the first HDR image and the brightness of the second HDR image includes:

[0087] When the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are the same, the brightness of the area where the brightness of the first HDR image and the brightness of the second HDR image are the same is taken as the actual brightness of the corresponding area in the target scene.

[0088] In practical applications, when the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are the same, the brightness of the first HDR image and the second HDR image can be compared pixel by pixel to determine the areas with the same brightness in the first HDR image and the second HDR image. Then, the brightness of the areas with the same brightness is taken as the actual brightness of the corresponding area in the target scene.

[0089] Alternatively, the electronic device can compare the brightness of image blocks in the first HDR image and the second HDR image according to a preset image block size, identify image blocks with the same brightness in the first HDR image and the second HDR image, and use the brightness of these image blocks as the brightness of the corresponding area in the target scene. Specifically, if the brightness of a first image block in the first HDR image and a second image block in the second HDR image are the same, then the first image block and the second image block are considered to have the same brightness. The brightness of an image block can be characterized by the average or median brightness of the pixels in the corresponding area of ​​the image block. The preset image block size can be set according to the actual application scenario.

[0090] In this embodiment, when the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are the same, the brightness of the area where the brightness of the first HDR image and the brightness of the second HDR image are the same is taken as the actual brightness of the corresponding area in the target scene. This enables accurate determination of the actual brightness of the corresponding area in the target scene based on the brightness of the first HDR image and the brightness of the second HDR image.

[0091] In some embodiments, the above method further includes:

[0092] Based on the actual brightness of the target scene, the brightness of the first SDR image is adjusted to obtain a first target SDR image that matches the actual brightness; and / or, the brightness of the second SDR image is adjusted to obtain a second target SDR image that matches the actual brightness.

[0093] It should be noted that since SDR images are usually obtained after tone mapping, the brightness of the obtained SDR image often does not match the actual brightness of the shooting scene. Therefore, given the actual brightness of the shooting scene, the brightness of the obtained SDR image can be adjusted based on the actual brightness of the shooting scene to match the actual brightness of the final SDR image.

[0094] In one exemplary embodiment, the brightness of a first SDR image can be adjusted based on the actual brightness of the target scene to obtain a first target SDR image that matches the actual brightness. Alternatively, the brightness of a second SDR image can be adjusted based on the actual brightness of the target scene to obtain a second target SDR image that matches the actual brightness. Alternatively, the brightness of both the first and second SDR images can be adjusted based on the actual brightness of the target scene to obtain a first target SDR image that matches the actual brightness.

[0095] In simple terms, "matching actual brightness" means achieving a brightness level close to or consistent with the actual brightness. For example, if the foreground of the first SDR image is darker than the foreground of the target scene, the foreground in the first SDR image needs to be brightened. If the background of the first SDR image is brighter than the background of the target scene, the background in the first SDR image needs to be darkened. The resulting brightness of the first target SDR image will then match the actual brightness of the target scene. The brightness adjustment method for the second SDR image is similar to that for the first SDR image and will not be elaborated further here.

[0096] For example, the electronic device can preview or save a first target SDR image and / or a second SDR image.

[0097] In this embodiment, the brightness of the first SDR image is adjusted based on the actual brightness of the target scene to obtain a first target SDR image that matches the actual brightness, and / or the brightness of the second SDR image is adjusted to obtain a second target SDR image that matches the actual brightness. This enables brightness correction of the captured SDR image based on the actual brightness of the target scene, resulting in a target SDR image that matches the actual brightness of the scene, thereby improving the brightness consistency between the output SDR image and the captured scene.

[0098] In some embodiments, the above method further includes:

[0099] Obtain the target brightness corresponding to the target scene; if the brightness of the first target SDR image is different from the target brightness, adjust the brightness of the first target SDR image to the target brightness to obtain the third target SDR image; and / or, if the brightness of the second target SDR image is different from the target brightness, adjust the brightness of the second target SDR image to the target brightness to obtain the fourth target SDR image.

[0100] Target brightness is used to characterize the ideal brightness of a target scene; that is, at the target brightness, most people's eyes will find the visual experience of the target scene to be optimal. Typically, different target scenes correspond to different target brightness levels. Target brightness can include the brightness of the target foreground and the brightness of the target background. The correspondence between target scenes and target brightness can be obtained through experience or experimental surveys.

[0101] For example, the electronic device can acquire the target brightness corresponding to the target scene and compare the target brightness with the brightness of the first target SDR image. For example, it can compare the target foreground brightness in the target brightness with the foreground brightness of the first target SDR image, and compare the target background brightness in the target brightness with the background brightness of the first target SDR image. If at least one of the foreground brightness and background brightness of the first target SDR image is different from the corresponding target foreground brightness and target background brightness in the target brightness, then at least one of the foreground brightness and background brightness of the first target SDR image is adjusted to the corresponding target foreground brightness and target background brightness in the target brightness to obtain the third target SDR image. Accordingly, the electronic device can compare the target brightness with the brightness of the second target SDR image. For example, it can compare the target foreground brightness in the target brightness with the foreground brightness of the second target SDR image, and compare the target background brightness in the target brightness with the background brightness of the second target SDR image. If at least one of the foreground brightness and background brightness of the second target SDR image is different from the corresponding target foreground brightness and target background brightness in the target brightness, then at least one of the foreground brightness and background brightness of the second target SDR image is adjusted to the corresponding target foreground brightness and target background brightness in the target brightness to obtain the fourth target SDR image.

[0102] In this embodiment, when the brightness of the first target SDR image is different from the target brightness, the brightness of the first target SDR image is adjusted to the target brightness to obtain a third target SDR image, and / or when the brightness of the second target SDR image is different from the target brightness, the brightness of the second target SDR image is adjusted to the target brightness to obtain a fourth target SDR image. This enables the target SDR image to be adjusted according to the target brightness corresponding to the shooting scene, so that the adjusted target SDR image can have the best brightness matching the scene, thereby greatly improving the visual experience of the adjusted target SDR image.

[0103] In some embodiments, if the brightness of an HDR image is oversaturated, the brightness of the HDR image is adjusted. If the brightness of a first HDR image is adjusted to obtain an adjusted first HDR image, and if the adjusted first HDR image is oversaturated, the brightness of the first HDR image is adjusted to a normal exposure state, for example, by darkening the brightness of the first HDR image by a gain of 1 / 4, to obtain a first target HDR image. And / or, if the brightness of a second HDR image is oversaturated, the brightness of the second HDR image is adjusted to a normal exposure state, to obtain a second target HDR image. Similarly, if the brightness of a second HDR image is adjusted to obtain an adjusted second HDR image, and if the adjusted second HDR image is oversaturated, the brightness of the adjusted second HDR image is adjusted to a normal exposure state, to obtain a third target HDR image. And / or, if the brightness of a first HDR image is oversaturated, the brightness of the first HDR image is adjusted to a normal exposure state, to obtain a fourth target HDR image. This system enables the adjustment of an HDR image's brightness to a normal exposure state after brightness calibration, if the HDR image is oversaturated. This results in a properly exposed HDR image, allowing it to be displayed correctly on HDR-compatible display devices. It's easy to understand whether an image is oversaturated, for example, based on the ratio of the brightest pixels to the total number of pixels. If this ratio is greater than an oversaturation threshold, the image is considered oversaturated. Oversaturation thresholds could be, for example, 4%, 5%, or 6%. Alternatively, other methods can be used to determine if the image is oversaturated. The method for adjusting an oversaturated HDR image to normal exposure is not limited here.

[0104] In some embodiments, the electronic device can acquire the target brightness corresponding to the target scene, and adjust the brightness of the first SDR image and / or the second SDR image based on the target brightness, so that the brightness of the adjusted SDR image matches the target scene, thereby improving the visual experience of the adjusted SDR image. For example, at least one of the foreground brightness and background brightness of the first SDR image can be adjusted based on the target brightness to obtain an adjusted first SDR image, the brightness of which is consistent with or close to the target brightness. And / or, at least one of the foreground brightness and background brightness of the second SDR image can be adjusted based on the target brightness to obtain an adjusted second SDR image, the brightness of which is consistent with or close to the target brightness. It should be noted that the method of adjusting the brightness of the first target SDR image and / or the second target SDR image based on the target brightness corresponding to the target scene in the foregoing embodiments reduces the adjustment workload and improves the adjustment efficiency and accuracy compared with the method of directly adjusting the brightness of the first SDR image and / or the second SDR image based on the target brightness corresponding to the target scene in this embodiment.

[0105] In a real-world application scenario, the brightness dynamic range of the actual shooting scene is usually large. Electronic devices often use tone mapping to suppress the high dynamic range of the shooting scene into a smaller range of SDR format image output. See also Figure 2 and Figure 3 The two SDR images of the same shooting scene shown have completely different background brightness (even though...). Figure 3 It was taken with the flash on, but it only affected the brightness of the foreground. Therefore... Figure 3 Compared to the prospects in China Figure 2 (The background is brighter, and since it's farther from the flash, it shouldn't affect the background brightness in principle.) Therefore, the actual brightness of the scene cannot be clearly seen solely from the captured SDR image.

[0106] One example illustrates the effect of tone mapping on the brightness of the foreground / background of an image. In such cases... Figure 6 Based on the initial image representing the actual brightness of the shooting scene, the background is covered and only the foreground is tone-mapped, resulting in the image shown. Figure 7 The foreground SDR image shown is obtained by overlaying the foreground onto the initial image and then performing tone mapping only on the background, resulting in the image shown. Figure 8 The background SDR image shown. (By...) Figures 6 to 8 It can be seen that after performing strong brightness control corresponding to tone mapping, Figure 7 The prospects in Figure 6 The actual foreground of the scene being filmed is brighter. Figure 8 The background in Figure 6 The actual background of the scene being filmed is brighter. This means that after tone mapping, the brightness of the foreground / background of the image will change significantly.

[0107] Based on the above analysis, since SDR images undergo strong brightness control during the generation process, while HDR images are not strongly compressed and are closer to natural, the actual brightness information of the shooting scene can be obtained from HDR images.

[0108] For example, a first SDR image and a second SDR image can be captured for the target scene. The first SDR image is then subjected to HDR decoding (i.e., inverse tone mapping) to obtain a first HDR image, and the second SDR image is also subjected to HDR decoding to obtain a second HDR image. A brightness gain is determined based on first shooting parameters of the first SDR image and second shooting parameters of the second SDR image. For example, the first shooting parameters include a first exposure time, a first aperture value, and a first ISO sensitivity, while the second shooting parameters include a second exposure time, a second aperture value, and a second ISO sensitivity. The first exposure time S1 = 1 / 25s, the first aperture value F1 = F1.8, and the first ISO sensitivity ISO1 = 1250. The second shooting parameters include a second exposure time S2 = 1 / 50s, a second aperture value F2 = F1.8, and a second ISO sensitivity ISO2 = 800. Calculate the ratio of the first exposure time to the second exposure time (S1 / S2), the ratio of the first aperture value to the second aperture value (F1 / F2), and the ratio of the first ISO sensitivity to the second ISO sensitivity (ISO1 / ISO2) in sequence. The brightness gain K = (S1 / S2) × (F1 / F2) × (ISO1 / ISO2) = ((1 / 25) / (1 / 50)) × (1.8 / 1.8) × (1250 / 800) = 3.125. Multiply the brightness of the second HDR image by this 3.125-fold brightness gain to obtain the adjusted second HDR image. See also... Figure 4 and Figure 5 It can be seen that the background brightness of the first HDR image is the same as the background brightness of the adjusted second HDR image. Therefore, the brightness of the background with the same brightness in the first HDR image and the adjusted second HDR image can be used as the actual brightness of the corresponding area in the shooting scene.

[0109] After obtaining the actual brightness of the shooting scene, the quality of the SDR image can be evaluated based on the actual brightness. Alternatively, the brightness of the SDR image can be adjusted based on the actual brightness to obtain a target SDR image that matches the actual brightness of the shooting scene. The SDR image includes a first SDR image and / or a second SDR image, and correspondingly, the target SDR image includes a first target SDR image and / or a second target SDR image.

[0110] If the target SDR image obtained by adjusting the brightness of the SDR image based on the actual brightness of the shooting scene is different from the target brightness (optimal scene brightness) corresponding to the shooting scene, then the brightness of the target SDR image can be adjusted based on the target brightness to obtain an SDR image consistent with the target brightness (i.e., the third target SDR image and / or the fourth target SDR image).

[0111] In the above embodiments, an HDR image is obtained by HDR decoding based on the captured SDR image. A brightness gain is determined based on the shooting parameters of the first and second SDR images. Brightness correction is then performed on the brightness differences in the HDR image caused by the shooting parameters based on the brightness gain. The actual brightness of the shooting scene is determined based on the brightness of the corrected HDR image, thus obtaining a highly accurate actual scene brightness. Furthermore, the generated SDR image can be quality-assessed and optimized based on the actual scene brightness to ensure that the brightness of the SDR image matches the actual scene brightness, thereby improving the display experience of the SDR image.

[0112] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0113] Based on the same inventive concept, this application also provides a scene brightness determination device for implementing the scene brightness determination method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more scene brightness determination device embodiments provided below can be found in the limitations of the scene brightness determination method described above, and will not be repeated here.

[0114] In one exemplary embodiment, such as Figure 9 As shown, a scene brightness determination device 900 is provided, including: an SDR image acquisition module 902, an inverse tone mapping processing module 904, and a scene brightness determination module 906, wherein:

[0115] SDR image acquisition module 902 is used to acquire a first SDR image and a second SDR image captured for the target scene;

[0116] The inverse tone mapping processing module 904 is used to perform inverse tone mapping processing on the first SDR image to obtain the first HDR image, and to perform inverse tone mapping processing on the second SDR image to obtain the second HDR image.

[0117] The scene brightness determination module 906 is used to determine the actual brightness of the target scene based on the first shooting parameters of the first SDR image, the second shooting parameters of the second SDR image, the brightness of the first HDR image, and the brightness of the second HDR image.

[0118] In some embodiments, the scene brightness determination module 906 is further configured to, when the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are different, adjust the brightness of the first HDR image or the brightness of the second HDR image based on the first shooting parameters and the second shooting parameters to obtain the adjusted first HDR image or the adjusted second HDR image; determine the actual brightness of the target scene based on the brightness of the adjusted first HDR image and the brightness of the second HDR image, or determine the actual brightness of the target scene based on the brightness of the first HDR image and the brightness of the adjusted second HDR image.

[0119] In some embodiments, the scene brightness determination module 906 is further configured to determine a brightness gain based on the ratio of the first shooting parameters and the second shooting parameters when the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are different; and adjust the brightness of the first HDR image or the second HDR image based on the brightness gain to obtain the adjusted first HDR image or the adjusted second HDR image.

[0120] In some embodiments, the scene brightness determination module 906 is further configured to determine the ratio of each first shooting parameter to the corresponding second shooting parameter; and to use the product of the ratios of each first shooting parameter to the corresponding second shooting parameter as the brightness gain.

[0121] In some embodiments, the scene brightness determination module 906 is further configured to adjust the brightness of the first HDR image based on the reciprocal of the brightness gain if the brightness gain is less than 1, to obtain an adjusted first HDR image; or, if the brightness gain is greater than 1, adjust the brightness of the second HDR image based on the brightness gain, to obtain an adjusted second HDR image.

[0122] In some embodiments, the scene brightness determination module 906 is further configured to take the brightness of the area where the brightness of the adjusted first HDR image is the same as that of the second HDR image as the actual brightness of the corresponding area in the target scene; or, take the brightness of the area where the brightness of the first HDR image is the same as that of the adjusted second HDR image as the actual brightness of the corresponding area in the target scene.

[0123] In some embodiments, the scene brightness determination module 906 is further configured to determine the actual brightness of the target scene based on the brightness of the first HDR image and the brightness of the second HDR image, provided that the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are the same.

[0124] In some embodiments, the scene brightness determination module 906 is further configured to, when the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are the same, take the brightness corresponding to the area where the brightness of the first HDR image and the brightness of the second HDR image are the same as the actual brightness of the corresponding area in the target scene.

[0125] In some embodiments, the above-described apparatus further includes an SDR image brightness first adjustment module, configured to adjust the brightness of a first SDR image based on the actual brightness of the target scene to obtain a first target SDR image that matches the actual brightness; and / or to adjust the brightness of a second SDR image to obtain a second target SDR image that matches the actual brightness.

[0126] In some embodiments, the above-described apparatus further includes an SDR image brightness second adjustment module, configured to obtain a target brightness corresponding to a target scene; adjust the brightness of the first target SDR image to the target brightness when the brightness of the first target SDR image is different from the target brightness, thereby obtaining a third target SDR image; and / or, adjust the brightness of the second target SDR image to the target brightness when the brightness of the second target SDR image is different from the target brightness, thereby obtaining a fourth target SDR image.

[0127] Each module in the aforementioned scene brightness determination device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0128] In one exemplary embodiment, an electronic device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 10As shown, the electronic device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a scene brightness determination method. The display unit of the electronic device forms a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the electronic device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the electronic device, or external keyboards, touchpads, or mice, etc.

[0129] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0130] In one exemplary embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described above.

[0131] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described method.

[0132] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the methods described above.

[0133] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0134] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media 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), magnetic 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 take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0135] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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, they should be considered to be within the scope of this application.

[0136] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for determining scene brightness, characterized in that, The method includes: Acquire the first and second SDR images captured for the target scene; The first SDR image is subjected to inverse tone mapping to obtain a first HDR image, and the second SDR image is subjected to inverse tone mapping to obtain a second HDR image; The actual brightness of the target scene is determined based on the first shooting parameters of the first SDR image, the second shooting parameters of the second SDR image, the brightness of the first HDR image, and the brightness of the second HDR image.

2. The method according to claim 1, characterized in that, Determining the actual brightness of the target scene based on the first shooting parameters of the first SDR image, the second shooting parameters of the second SDR image, the brightness of the first HDR image, and the brightness of the second HDR image includes: When the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are different, the brightness of the first HDR image or the brightness of the second HDR image is adjusted based on the first shooting parameters and the second shooting parameters to obtain the adjusted first HDR image or the adjusted second HDR image. The actual brightness of the target scene is determined based on the brightness of the adjusted first HDR image and the brightness of the second HDR image, or the actual brightness of the target scene is determined based on the brightness of the first HDR image and the brightness of the adjusted second HDR image.

3. The method according to claim 2, characterized in that, When the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are different, adjusting the brightness of the first HDR image or the second HDR image based on the first shooting parameters and the second shooting parameters to obtain the adjusted first HDR image or the adjusted second HDR image includes: When the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are different, the brightness gain is determined based on the ratio of the first shooting parameters to the second shooting parameters. Based on the brightness gain, the brightness of the first HDR image or the second HDR image is adjusted to obtain the adjusted first HDR image or the adjusted second HDR image.

4. The method according to claim 3, characterized in that, Determining the brightness gain based on the ratio of the first shooting parameter and the second shooting parameter includes: Determine the ratio of each first shooting parameter to the corresponding second shooting parameter; The product of the ratios of each of the first shooting parameters to the corresponding second shooting parameters is used as the brightness gain.

5. The method according to claim 3, characterized in that, The step of adjusting the brightness of the first HDR image or the second HDR image based on the brightness gain to obtain the adjusted first HDR image or the adjusted second HDR image includes: If the brightness gain is less than 1, the brightness of the first HDR image is adjusted based on the reciprocal of the brightness gain to obtain an adjusted first HDR image; or, If the brightness gain is greater than 1, the brightness of the second HDR image is adjusted based on the brightness gain to obtain the adjusted second HDR image.

6. The method according to claim 2, characterized in that, Determining the actual brightness of the target scene based on the adjusted brightness of the first HDR image and the brightness of the second HDR image includes: The brightness of the area where the brightness of the adjusted first HDR image and the brightness of the second HDR image are the same is taken as the actual brightness of the corresponding area in the target scene; Determining the actual brightness of the target scene based on the brightness of the first HDR image and the brightness of the adjusted second HDR image includes: The brightness of the area where the brightness of the first HDR image is the same as the brightness of the adjusted second HDR image is taken as the actual brightness of the corresponding area in the target scene.

7. The method according to claim 1, characterized in that, Determining the actual brightness of the target scene based on the first shooting parameters of the first SDR image, the second shooting parameters of the second SDR image, and the brightness of the first HDR image and the second HDR image includes: When the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are the same, the actual brightness of the target scene is determined based on the brightness of the first HDR image and the brightness of the second HDR image.

8. The method according to claim 7, characterized in that, The step of determining the actual brightness of the target scene based on the brightness of the first HDR image and the brightness of the second HDR image, when the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are the same, includes: When the first shooting parameters of the first SDR image and the second shooting parameters of the second SDR image are the same, the brightness of the area where the brightness of the first HDR image and the brightness of the second HDR image are the same is taken as the actual brightness of the corresponding area in the target scene.

9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: Based on the actual brightness of the target scene, the brightness of the first SDR image is adjusted to obtain a first target SDR image that matches the actual brightness; and / or, the brightness of the second SDR image is adjusted to obtain a second target SDR image that matches the actual brightness.

10. The method according to claim 9, characterized in that, The method further includes: Obtain the target brightness corresponding to the target scene; If the brightness of the first target SDR image differs from the target brightness, the brightness of the first target SDR image is adjusted to the target brightness to obtain a third target SDR image; and / or, If the brightness of the second target SDR image is different from the target brightness, the brightness of the second target SDR image is adjusted to the target brightness to obtain the fourth target SDR image.

11. A scene brightness determination device, characterized in that, The device includes: The SDR image acquisition module is used to acquire the first SDR image and the second SDR image captured for the target scene. The inverse tone mapping processing module is used to perform inverse tone mapping processing on the first SDR image to obtain a first HDR image, and to perform inverse tone mapping processing on the second SDR image to obtain a second HDR image; The scene brightness determination module is used to determine the actual brightness of the target scene based on the first shooting parameters of the first SDR image, the second shooting parameters of the second SDR image, the brightness of the first HDR image, and the brightness of the second HDR image.

12. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.

14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.