Display method and electronic device
By adjusting the display brightness and processing high dynamic range images, the problem of poor realism in the display of electronic devices in different scenarios has been solved, and the images or videos displayed in different environments are consistent with the viewing experience at the time of shooting, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2024-09-19
- Publication Date
- 2026-07-07
AI Technical Summary
Images or videos displayed on electronic devices in different scenarios often lack the realism they appear when captured, negatively impacting the user experience.
By acquiring the illuminance of the shooting and display environment, the screen brightness can be adjusted to match the ambient brightness, or high dynamic range images can be compressed and tone-mapped to restore the dynamic range, thereby improving the realism of the display.
Images or videos displayed in different environments maintain the same appearance as when they were taken, improving the user experience.
Smart Images

Figure CN120687054B_ABST
Abstract
Description
[0001] This application is a divisional application. The original application has the application number 202411311377.9 and the original application date is September 19, 2024. The entire contents of the original application are incorporated herein by reference. Technical Field
[0002] This application relates to the field of electronic technology, and in particular to a display method and an electronic device. Background Technology
[0003] Currently, all electronic devices have displays, on which they can show images, animations, and videos. The content displayed on the screen is composed of individual pixels with color and grayscale values. The brightness of the electronic device's screen affects the display effect of images, animations, or videos. Taking images as an example, the higher the screen brightness, the brighter the image appears; the lower the screen brightness, the darker the image appears.
[0004] Images or videos taken in bright scenes will appear darker than the actual scene when displayed on a low-brightness screen. Conversely, images or videos taken in dark scenes will appear brighter than the actual scene when displayed on a high-brightness screen. Thus, screen brightness affects the realism of images or videos.
[0005] Therefore, how to improve the realism of images displayed on a screen is an urgent problem to be solved. Summary of the Invention
[0006] This application provides a display method and an electronic device. The display method provided by this application can improve the realism of the images displayed on the screen of the electronic device.
[0007] In a first aspect, this application provides an electronic device that may include a camera assembly, a display screen, a memory, and a processor, wherein the camera, display screen, and memory are respectively coupled to the processor, wherein:
[0008] The camera component can be used to: capture the first image;
[0009] The memory can be used to store a first image, an ambient illuminance for shooting, and a first brightness, wherein the ambient illuminance for shooting is the ambient illuminance at the time the first image is captured, and the first brightness is the brightness value of the first grayscale pixel of the first image under the ambient illuminance for shooting.
[0010] The processor can be used to: when the electronic device displays the first image in the first scene, acquire the first ambient illuminance of the first scene, determine the second brightness based on the shooting ambient illuminance, the first brightness and the first ambient illuminance, the second brightness being the brightness value of the pixel of the first gray level in the first image under the first ambient illuminance; and map the brightness value of the pixel of the first gray level in the first image to the second brightness.
[0011] The display screen can be used to: display a first image in a first scene, wherein the brightness value of the first grayscale pixel of the first image is a second brightness.
[0012] In this way, the electronic device can display the first image in the first scene in a way that is consistent with the appearance of the first image in the shooting environment. That is, the electronic device can display the first image more realistically.
[0013] In one possible implementation, the processor can also be used to: determine the brightness value of a pixel at a second grayscale level of the first image as a third brightness, based on the second brightness.
[0014] In this way, when the display screen of the electronic device displays the first image, it can determine the brightness values of the pixels at other gray levels based on the brightness values of the pixels at the first gray level of the first image.
[0015] In one possible implementation, the processor can be used to: determine the ambient illuminance based on the exposure value of the camera component; or, determine the ambient illuminance based on one or more of the weather, time, and location when the first image is taken.
[0016] In this way, the processor can determine the ambient light level of the shooting environment.
[0017] In one possible implementation, the processor can be used to determine a first ambient illuminance based on one or more of the weather, time, and location when the first image is displayed.
[0018] In this way, the processor can determine the initial ambient light level.
[0019] In one possible implementation, the electronic device further includes an ambient light sensor coupled to the processor, which can be used for:
[0020] The ambient light level was collected when the first image was taken.
[0021] When the electronic device displays the first image, the first ambient illuminance is collected.
[0022] In this way, the electronic device can determine the ambient illuminance and the initial ambient illuminance by using the ambient light sensor.
[0023] In one possible implementation, the processor can be used for:
[0024] When the electronic device displays the first image in the second scene, the second ambient illuminance of the second scene is obtained;
[0025] Based on the ambient illuminance, the first brightness, and the second ambient illuminance, the fourth brightness is determined. The fourth brightness is the brightness value of the first grayscale pixel in the first image under the second ambient illuminance.
[0026] Map the brightness value of the first grayscale pixel in the first image to the fourth brightness;
[0027] The display screen can be used to: display a first image in a second scene, wherein the brightness value of the first grayscale pixel of the first image is a fourth brightness.
[0028] In this way, the brightness values of the pixels in the first grayscale of the first image displayed by the electronic device differ under different ambient light conditions. The perceived brightness of the first image displayed by the electronic device in any scene is consistent with the perceived brightness of the first image under the shooting environment. Therefore, the realism of the first image displayed by the electronic device can be improved, thereby enhancing the user experience.
[0029] In one possible implementation, if the second ambient illuminance is less than the first ambient illuminance, the fourth luminance is less than the second luminance;
[0030] If the second ambient illuminance is greater than the first ambient illuminance, then the fourth brightness is greater than the second brightness;
[0031] If the second ambient illuminance is equal to the first ambient illuminance, then the fourth luminance is equal to the second luminance.
[0032] Thus, the lower the ambient light level when displaying the first image, that is, the darker the viewing environment, the lower the brightness value of the pixels in the first grayscale of the first image displayed by the electronic device. Conversely, the higher the ambient light level when displaying the first image, that is, the brighter the viewing environment, the higher the brightness value of the pixels in the first grayscale of the first image displayed by the electronic device.
[0033] In a second aspect, an electronic device is provided, which may include a camera component, a display screen, a memory, and a processor, wherein the camera component, the display screen, and the memory are respectively coupled to the processor, wherein:
[0034] The camera component can be used to: capture high dynamic range (HDR) images and compress the HDR regions within the HDR images to obtain compressed images and compression information. The compression information includes the correspondence between the dynamic range and the compression ratio in the compressed images.
[0035] The memory can be used to store compressed images and compression information;
[0036] The processor can be used to: acquire compressed images and compression information when an electronic device displays compressed images;
[0037] Based on the compressed information, the correspondence between the display brightness and the dynamic range of the high dynamic range image is obtained;
[0038] Based on the correspondence between display brightness and dynamic range of high dynamic range images, tone mapping is performed on the compressed image to obtain a tone-mapped image. The brightness at the maximum value of high dynamic range in the tone-mapped image is the maximum brightness supported by the display.
[0039] The display screen can be used to: display tonal-mapped images.
[0040] In this way, when displaying compressed images, electronic devices can perform tone mapping based on the correspondence between the image's dynamic range and the display screen's brightness capability, thus restoring the high dynamic range areas of the image. This increases the contrast and detail in the high dynamic range areas of the displayed image while reducing brightness saturation.
[0041] In one possible implementation, the processor can be used for:
[0042] Based on compressed information, the dynamic range in high dynamic range images is determined;
[0043] Determine the correspondence between the dynamic range in the high dynamic range image and the display screen brightness, wherein the brightness of the maximum value of the high dynamic range in the high dynamic range image is set as the maximum brightness of the display screen.
[0044] In this way, the processor can reproduce the dynamic range of a high dynamic range image and map the dynamic range of the image to the brightness of the display screen. Therefore, the display screen's capabilities can be fully utilized to reproduce the contrast of the high dynamic range areas in the high dynamic range image.
[0045] In one possible implementation, the maximum dynamic range of the compressed image is a first multiple of the maximum standard dynamic range; the maximum high dynamic range of the high dynamic range image is a second multiple of the maximum standard dynamic range; and the maximum dynamic range of the tone-mapped image is a third multiple of the maximum standard dynamic range.
[0046] The first multiple is less than the second multiple, and the third multiple is greater than the first multiple, but less than or equal to the second multiple.
[0047] In this way, the tone-mapped image displayed by the electronic device can reproduce the original image as closely as possible, that is, the multiple of the maximum value of the high dynamic range in the high dynamic range image to the maximum value of the standard dynamic range.
[0048] Thirdly, an electronic device is provided, which may include a camera component, a display screen, a memory, and a processor, wherein the camera component, the display screen, and the memory are respectively coupled to the processor, wherein:
[0049] The camera component can be used to: capture a first video, the first video including a first image frame;
[0050] The memory can be used to store a first image frame, a first shooting environment illuminance, and a first brightness, wherein the first shooting environment illuminance is the ambient illuminance when the first image frame is captured, and the first brightness is the brightness value of the pixel of the first gray level of the first image frame under the first shooting environment illuminance.
[0051] The processor can be used to: when the electronic device displays a first image frame in a first scene, acquire a first ambient illuminance of the first scene, determine a second illuminance based on the first shooting ambient illuminance, the first brightness, and the first ambient illuminance, wherein the second illuminance is the brightness value of a pixel at a first gray level in the first image frame under the first ambient illuminance; and map the brightness value of the pixel at the first gray level of the first image frame to the second illuminance.
[0052] The display screen can be used to: display a first image frame of a first video in a first scene, wherein the brightness value of a pixel at a first gray level of the first image frame is a second brightness.
[0053] In this way, the electronic device can display the first video in the first scene in a way that is consistent with the viewing experience of the first video in the shooting environment. That is, the electronic device can display the first video more realistically.
[0054] In one possible implementation, the processor can also be used to: determine the brightness value of a pixel at a second gray level in the first image frame as a third brightness, based on the second brightness.
[0055] In this way, when the display screen of the electronic device displays the first image frame of the first video, it can determine the brightness values of the pixels of other gray levels based on the brightness values of the pixels of the first gray level of the first image frame.
[0056] In one possible implementation, the processor can be used for:
[0057] When the electronic device displays the first image frame in the second scene, it acquires the second ambient illuminance of the second scene;
[0058] Based on the ambient illuminance, the first brightness, and the second ambient illuminance, the fourth brightness is determined. The fourth brightness is the brightness value of the first gray level pixel in the first image frame under the second ambient illuminance.
[0059] Map the brightness value of the first grayscale pixel in the first image frame to the fourth brightness;
[0060] The display screen can be used to: display a first image frame in a second scene, wherein the brightness value of the first grayscale pixel of the first image frame is a fourth brightness.
[0061] In this way, the brightness values of the pixels in the first grayscale of the first image frame displayed by the electronic device differ under different ambient light conditions. The perceived brightness of the first image frame displayed by the electronic device in any scene is consistent with its perceived brightness under the shooting environment. Therefore, the realism of the first image frame displayed by the electronic device can be improved, thereby enhancing the user experience.
[0062] In one possible implementation, the first video also includes a second image frame;
[0063] The memory can be used to store a second image frame, a second shooting environment illuminance, and a fifth brightness. The second shooting environment illuminance is the ambient illuminance when the second image frame is captured, and the fifth brightness is the brightness value of the pixel of the first gray level of the second image frame under the second shooting environment illuminance.
[0064] The processor can be used to: when the electronic device displays the second image frame in the first scene, acquire the first ambient illuminance of the first scene, determine the sixth illuminance based on the shooting ambient illuminance, the fifth illuminance and the first ambient illuminance, the sixth illuminance being the illuminance value of the pixel of the first gray level in the second image frame under the first ambient illuminance; and map the illuminance value of the pixel of the first gray level in the second image frame to the sixth illuminance.
[0065] The display screen can be used to: display a second image frame of a first video in a first scene, wherein the brightness value of the first grayscale pixel of the second image frame is a sixth brightness.
[0066] The ambient illuminance of the first image frame can be the same as or different from that of the second image frame. That is, the ambient illuminance of the first image frame can be equal to or different from that of the second image frame. When the ambient illuminance of the first image frame is equal to that of the second image frame, the sixth brightness can be equal to the second brightness.
[0067] In this way, when an electronic device displays two image frames of the first video taken under different shooting conditions in the same scene, the brightness values of the pixels in the first grayscale of the two image frames can be different. The perceived brightness of the image frame displayed by the electronic device can be consistent with the perceived brightness of the image frame in the shooting scene.
[0068] Fourthly, a display method is provided, which can be applied to an electronic device. The method may include: capturing a first image and saving the first image, ambient illuminance, and a first brightness, wherein the ambient illuminance is the ambient illuminance at the time the first image was captured, and the first brightness is the brightness value of a pixel at a first grayscale level of the first image under the ambient illuminance; when displaying the first image in a first scene, acquiring the first ambient illuminance of the first scene; determining a second brightness based on the ambient illuminance, the first brightness, and the first ambient illuminance, wherein the second brightness is the brightness value of a pixel at a first grayscale level of the first image under the first ambient illuminance; mapping the brightness value of the pixel at the first grayscale level of the first image to the second brightness; and displaying the first image in the first scene, wherein the brightness value of the pixel at the first grayscale level of the first image is the second brightness.
[0069] Using the method provided in the fourth aspect, the electronic device can display a first image in a first scene that is consistent with the visual appearance of the first image in the shooting environment. That is, the electronic device can display the first image more realistically.
[0070] In one possible implementation, when displaying the first image in the first scene, the method may further include: determining the brightness value of the pixels of the second grayscale of the first image as a third brightness based on the second brightness.
[0071] In this way, when the display screen of the electronic device displays the first image, it can determine the brightness values of the pixels at other gray levels based on the brightness values of the pixels at the first gray level of the first image.
[0072] In one possible implementation, the method may further include: when the electronic device displays the first image in the second scene, acquiring the second ambient illuminance of the second scene; determining a fourth illuminance based on the shooting ambient illuminance, the first illuminance, and the second ambient illuminance, wherein the fourth illuminance is the illuminance value of the first grayscale pixel of the first image under the second ambient illuminance; mapping the illuminance value of the first grayscale pixel of the first image to the fourth illuminance; and displaying the first image in the second scene, wherein the illuminance value of the first grayscale pixel of the first image is the fourth illuminance.
[0073] In this way, the brightness values of the pixels in the first grayscale of the first image displayed by the electronic device differ under different ambient light conditions. The perceived brightness of the first image displayed by the electronic device in any scene is consistent with the perceived brightness of the first image under the shooting environment. Therefore, the realism of the first image displayed by the electronic device can be improved, thereby enhancing the user experience.
[0074] In one possible implementation, if the second ambient illuminance is less than the first ambient illuminance, the fourth luminance is less than the second luminance;
[0075] If the second ambient illuminance is greater than the first ambient illuminance, then the fourth brightness is greater than the second brightness;
[0076] If the second ambient illuminance is equal to the first ambient illuminance, then the fourth luminance is equal to the second luminance.
[0077] Thus, the lower the ambient light level when displaying the first image, that is, the darker the viewing environment, the lower the brightness value of the pixels in the first grayscale of the first image displayed by the electronic device. Conversely, the higher the ambient light level when displaying the first image, that is, the brighter the viewing environment, the higher the brightness value of the pixels in the first grayscale of the first image displayed by the electronic device.
[0078] Fifthly, a display method is provided, which can be applied to an electronic device. The method may include: capturing a high dynamic range (HDR) image and compressing the HDR region within the HDR image to obtain a compressed image and compression information, the compression information including the correspondence between the dynamic range and compression ratio in the compressed image; storing the compressed image and compression information; acquiring the compressed image and compression information when the electronic device displays the compressed image; obtaining the correspondence between the display brightness and the dynamic range of the HDR image based on the compression information; performing tone mapping on the compressed image based on the correspondence between the display brightness and the dynamic range of the HDR image to obtain a tone-mapped image, the brightness at the maximum HDR value in the tone-mapped image being the maximum brightness supported by the display screen; and displaying the tone-mapped image.
[0079] In this way, when displaying compressed images, electronic devices can perform tone mapping based on the correspondence between the image's dynamic range and the display screen's brightness capability, thus restoring the high dynamic range areas of the image. This increases the contrast and detail in the high dynamic range areas of the displayed image while reducing brightness saturation.
[0080] In one possible implementation, obtaining the correspondence between the display brightness and the dynamic range of the high dynamic range image based on compressed information may include: determining the dynamic range in the high dynamic range image based on compressed information; determining the correspondence between the dynamic range in the high dynamic range image and the display brightness, wherein the brightness of the maximum value of the high dynamic range in the high dynamic range image is set as the maximum value of the display brightness.
[0081] In this way, the processor can reproduce the dynamic range of a high dynamic range image and map the dynamic range of the image to the brightness of the display screen. Therefore, the display screen's capabilities can be fully utilized to reproduce the contrast of the high dynamic range areas in the high dynamic range image.
[0082] In one possible implementation, the maximum dynamic range of the compressed image is a first multiple of the maximum standard dynamic range; the maximum high dynamic range of the high dynamic range image is a second multiple of the maximum standard dynamic range; and the maximum dynamic range of the tone-mapped image is a third multiple of the maximum standard dynamic range.
[0083] The first multiple is less than the second multiple, and the third multiple is greater than the first multiple, but less than or equal to the second multiple.
[0084] In this way, the tone-mapped image displayed by the electronic device can reproduce the original image as closely as possible, that is, the multiple of the maximum value of the high dynamic range in the high dynamic range image to the maximum value of the standard dynamic range.
[0085] Sixthly, a shooting and display system is provided, which includes a shooting device and a display device, wherein:
[0086] The camera equipment is used to: capture the first image;
[0087] Store the first image, the ambient illuminance at the time of shooting, and the first brightness. The ambient illuminance at the time of shooting is the ambient illuminance at the time of shooting the first image, and the first brightness is the brightness value of the pixel of the first gray level of the first image.
[0088] Send the first image, the ambient light level at which the image was taken, and the initial brightness level to the display device;
[0089] The display device is configured to: receive a first image, ambient illuminance, and a first brightness; when displaying the first image in a first scene, acquire the first ambient illuminance, which is the ambient illuminance of the first scene; determine a second brightness based on the ambient illuminance, the first brightness, and the first ambient illuminance, where the second brightness is the brightness value of a pixel at the first gray level of the first image under the first ambient illuminance; map the brightness value of the pixel at the first gray level of the first image to the second brightness; and display the first image in the first scene, where the brightness value of the pixel at the first gray level of the first image is the second brightness.
[0090] In this way, the display device can make the brightness of the first image captured by the shooting device consistent with the brightness of the first image in the shooting environment.
[0091] In one possible implementation, the display device can also be used for:
[0092] When the first image is displayed in the second scene, the second ambient illuminance of the second scene is obtained; based on the shooting ambient illuminance, the first brightness, and the second ambient illuminance, the fourth brightness is determined, which is the brightness value of the first grayscale pixel of the first image under the second ambient illuminance; the brightness value of the first grayscale pixel of the first image is mapped to the fourth brightness; the first image is displayed in the second scene, and the brightness value of the first grayscale pixel of the first image is the fourth brightness.
[0093] In this way, the brightness values of the pixels in the first grayscale of the first image displayed on the display device differ under different ambient light conditions. The perceived brightness of the first image displayed on the display device in any scene is consistent with the perceived brightness of the first image under the shooting environment. Therefore, the realism of the first image displayed on the display device can be improved, thereby enhancing the user experience.
[0094] In one possible implementation, the shooting device can be used to: capture a high dynamic range image, compress the high dynamic range region in the high dynamic range image to obtain a compressed image and compression information, the compression information including the correspondence between the dynamic range and the compression ratio in the compressed image, store the compressed image and compression information, and send the compressed image and compression information to a display device.
[0095] The display device can be used to: receive a compressed image and compression information; when displaying the compressed image, based on the compression information, obtain the correspondence between the display brightness and the dynamic range of the high dynamic range image; based on the correspondence between the display brightness and the dynamic range of the high dynamic range image, perform tone mapping on the compressed image to obtain a tone-mapped image; the brightness at the maximum value of the high dynamic range in the tone-mapped image is the maximum brightness supported by the display screen; and display the tone-mapped image.
[0096] In this way, when displaying a compressed image, the display device can perform tone mapping based on the correspondence between the image's dynamic range and the display screen's brightness capability, thus restoring the high dynamic range areas of the image. This increases the contrast and detail in the high dynamic range areas of the displayed image while reducing brightness saturation.
[0097] In one possible implementation, the maximum dynamic range of the compressed image is a first multiple of the maximum standard dynamic range; the maximum high dynamic range of the high dynamic range image is a second multiple of the maximum standard dynamic range; and the maximum dynamic range of the tone-mapped image is a third multiple of the maximum standard dynamic range.
[0098] The first multiple is less than the second multiple, and the third multiple is greater than the first multiple, but less than or equal to the second multiple.
[0099] In this way, the color-mapped image displayed by the display device can reproduce the original image as closely as possible, that is, the multiple of the maximum value of the high dynamic range in the high dynamic range image to the maximum value of the standard dynamic range.
[0100] In one possible implementation, the shooting device may be the electronic equipment provided in the first to third aspects.
[0101] In one possible implementation, the display device may be an electronic device provided in the first to third aspects.
[0102] In a seventh aspect, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a computer, causes the computer to implement the method described in any possible implementation of the first aspect above.
[0103] Eighthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to perform the method described in any possible implementation of the first aspect above. Attached Figure Description
[0104] Figure 1A This is a schematic diagram of a set of images taken under different shooting conditions displayed by an electronic device in the prior art;
[0105] Figure 1B This is a schematic diagram illustrating the display effect of a set of images in existing technology;
[0106] Figure 2A This is a schematic diagram of the HLG curve in the prior art;
[0107] Figure 2B This is a schematic diagram illustrating the display effect of images in existing technologies;
[0108] Figure 3A This is a schematic diagram of the hardware structure of the electronic device 100 provided in the embodiments of this application;
[0109] Figure 3B This is a schematic diagram of the hardware and software architecture of the electronic device provided in the embodiments of this application;
[0110] Figure 3C This is a schematic diagram of the metadata information of the images provided in the embodiments of this application;
[0111] Figure 4 This is a flowchart illustrating a display method provided in an embodiment of this application;
[0112] Figure 5A This is a schematic diagram of a set of inputs and outputs of a visual consistency model provided in an embodiment of this application;
[0113] Figure 5B This is a schematic diagram of the electronic device provided in this application displaying an image in an ambient illuminance of 1000 lux;
[0114] Figure 5C This is a schematic diagram of another set of inputs and outputs of the visual consistency model provided in the embodiments of this application;
[0115] Figure 5D This is a schematic diagram of the electronic device provided in this application displaying an image in an ambient illuminance of 100 lux;
[0116] Figure 6 This is a schematic diagram showing the display effect of the images provided in the embodiments of this application;
[0117] Figure 7 This is a flowchart illustrating a display method provided in an embodiment of this application;
[0118] Figure 8A This is a set of schematic diagrams of curves provided in the embodiments of this application;
[0119] Figure 8B These are schematic diagrams of compression and recovery curves provided in the embodiments of this application;
[0120] Figure 9 This is a schematic diagram showing the display effect of the images provided in the embodiments of this application;
[0121] Figure 10 This is a schematic diagram of the image display system provided in the embodiments of this application. Detailed Implementation
[0122] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0123] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. The terms “first” and “second” are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as “first” or “second” may explicitly or implicitly include one or more of that feature. “First” and “second,” etc., are used to distinguish different objects, not to describe a particular order of objects. For example, a first object and a second object are used to distinguish different objects, not to describe a particular order of objects.
[0124] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
[0125] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or related scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0126] The term "and / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A existing alone, A and B existing simultaneously, and B existing alone.
[0127] To better understand the technical solutions provided in this application, before describing the technical solutions, we will first refer to the accompanying drawings to explain the electronic device 100 with shooting and display functions to which this application applies. In the embodiments of this application, the electronic device 100 may include, but is not limited to, devices with shooting and display functions such as mobile phones, tablets, and smartwatches. The embodiments of this application do not limit the specific form or type of the electronic device 100.
[0128] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.
[0129] Currently, in some examples, to provide a better viewing experience, the electronic device 100 can adjust the brightness of the display screen according to the ambient light level. For example, in a brighter environment, the electronic device 100 can adjust the brightness of the display screen to be brighter. In a darker environment, the electronic device 100 can adjust the brightness of the display screen to be dimmer.
[0130] When electronic device 100 takes a picture, the brightness of the shooting scene will affect the brightness of the captured image or video. When the shooting scene is bright, the image or video captured by electronic device 100 will appear brighter. When the shooting scene is dark, the image or video captured by electronic device 100 will appear darker.
[0131] In some scenarios, the brightness of the scene in which the electronic device 100 captures the image or video may differ from the brightness of the scene in which the user views the captured image or video. For example, such as... Figure 1A As shown, the electronic device 100 can display a user interface 10A, which may include an image 102. The image 102 was taken in a bright daytime scene.
[0132] Optionally, the user interface 10A may also include text information 103a, which may be used to indicate the time (e.g., 10:00) and location (e.g., xx city xx district) of the image 102.
[0133] like Figure 1AAs shown, the electronic device 100 can display a user interface 10B, which may include an image 105. The image 105 is depicted as being taken in a low-light scene at night. Optionally, the user interface 10B may also include text information 103b, which can be used to indicate the time (e.g., 19:00) and location (e.g., xx city xx district) of the image 105.
[0134] Optionally, user interfaces 10A and 10B may include a menu 104. The menu 104 may include a share control, a favorite control, an edit control, a delete control, and more controls. The share control can be used to trigger the sharing of an image currently displayed in the user interface (e.g., image 102 displayed in user interface 10A, or image 105 displayed in user interface 10B). The favorite control can be used to trigger the saving of an image currently displayed in the user interface (e.g., image 102 displayed in user interface 10A, or image 105 displayed in user interface 10B) to a favorites folder. The edit control can be used to trigger editing functions such as rotating, cropping, adding filters, and blurring the image currently displayed in the user interface (e.g., image 102 displayed in user interface 10A, or image 105 displayed in user interface 10B). The delete control can be used to trigger the deletion of an image currently displayed in the user interface (e.g., image 102 displayed in user interface 10A, or image 105 displayed in user interface 10B). This more control can be used to trigger functions related to opening more images displayed in the current user interface (e.g., image 102 displayed in user interface 10A, or image 105 displayed in user interface 10B).
[0135] When electronic device 100 displays images 102 and 105, the ambient illuminance is 700 lux (lux, a unit of illuminance), and the peak brightness of the display screen is 130 nits (nits, a unit of brightness). If electronic device 100 displays images 102 and 105, which depict different shooting scenes, at the same display brightness, image 102 will be darker than the actual shooting scene, and image 105 will be brighter than the actual shooting scene. For example, pixel 1 in image 102 has a grayscale value of 160, and pixel 2 in image 105 also has a grayscale value of 160. Pixel 1 will be darker than the actual shooting scene, and pixel 2 will be brighter than the actual shooting scene.
[0136] For example Figure 1B As shown, image 106 was taken during the day, but the brightness of image 106 displayed on the electronic device 100 is darker than the scene being photographed. Image 107 was taken at night, but the brightness of image 107 displayed on the electronic device 100 is brighter than the scene being photographed.
[0137] As a result, the images displayed on the electronic device 100 lack realism, which affects the user experience.
[0138] With the continuous development of electronic device cameras, electronic device 100 can capture high dynamic range (HDR) images. Then, electronic device 100 compresses and saves the captured HDR image. When displaying this HDR image, electronic device 100 needs to restore the compressed HDR image and display the restored HDR image.
[0139] Currently, electronic device 100 can use the hybrid log gamma (HLG) standard to compress and restore HDR images. For example, Figure 2A An exemplary schematic diagram of an HLG curve in the prior art is shown. For example... Figure 2A As shown, the horizontal axis represents the dynamic range of the camera during actual shooting, expressed as a percentage. The maximum brightness corresponding to Standard Dynamic Range (SDR) is defined as 100%. A brightness range greater than 100% corresponds to the brightness range of High-Resolution Image (HDR). The maximum brightness corresponding to HDR is 5000%, which is 50 times the maximum brightness corresponding to SDR.
[0140] like Figure 2A As shown, the vertical axis represents the standard codewords for image encoding in the HLG standard, with the unit being nits. In the HLG standard, the highest luminance code for SDR is 203 nits, and the highest luminance code for HDR is 1000 nits. In the HLG standard, the highest luminance of the encoded HDR is approximately 5 times (1000 / 203≈5) times that of the encoded SDR.
[0141] like Figure 2A As shown in the dynamic range compression curve 201, during shooting, the highest brightness corresponding to HDR is 500%, which is 5 times the highest brightness corresponding to SDR (100%). During image encoding, the highest brightness corresponding to SDR is encoded as 203 nits, while the highest brightness corresponding to HDR is encoded as 1000 nits. The highest brightness corresponding to the encoded HDR is approximately 5 times that corresponding to the encoded SDR.
[0142] like Figure 2AAs shown in the dynamic range compression curve 202, during shooting, the highest brightness corresponding to HDR is 2000%, which is 20 times the highest brightness corresponding to SDR (100%). During image encoding, the highest brightness corresponding to SDR is encoded as 203 nits, while the highest brightness corresponding to HDR is encoded as 1000 nits. The highest brightness corresponding to the encoded HDR is approximately 5 times that corresponding to the encoded SDR.
[0143] like Figure 2A As shown in dynamic range compression curve 203, during shooting, the highest brightness corresponding to HDR is 5000%, which is 50 times the highest brightness corresponding to SDR (100%). During image encoding, the highest brightness corresponding to SDR is encoded as 203 nits, while the highest brightness corresponding to HDR is encoded as 1000 nits. The highest brightness corresponding to the encoded HDR is approximately 5 times that corresponding to the encoded SDR.
[0144] like Figure 2A As shown, in dynamic range compression curves 201, 202, and 203, the portion of the horizontal axis greater than 100%, which is the HDR portion, can be called the highlight information portion. For dynamic range compression curves 202 and 203, in actual photography, the dynamic range of the image is greater than 5 times; however, during image encoding, it must be compressed to 5 times the HLG standard. Thus, the slope of dynamic range compression curves 202 and 203 is less than 1. A slope less than 1 for the corresponding dynamic range compression curve indicates that after HLG encoding, the dynamic range of the image is less than the dynamic range actually captured by the camera.
[0145] In other words, when capturing an HDR image, the electronic device 100 can store dynamic range information that is more than five times greater than the reference white. Then, the electronic device 100 can compress the HDR image according to the HLG standard, ultimately displaying only five times the brightness dynamic range. This inability to reproduce the true brightness dynamic range of the captured HDR image results in decreased contrast in the originally brighter areas, thus affecting the image's realism. For example, as... Figure 2B As shown, when storing image 210, electronic device 100 can store image 210 according to... Figure 2A The HLG curve shown is compressed. When displayed, the electronic device 100 cannot reproduce the true dynamic range of brightness when the image 210 was captured. Consequently, the contrast between the light source and the wall in the highlight area 2101 of the image 210 displayed by the electronic device 100 is low, and the light color is oversaturated.
[0146] To improve the realism of images and videos displayed by the electronic device 100, this application provides a display method. In this method, when displaying images or videos, the electronic device 100 can determine the brightness of the display screen based on the ambient light of the shooting scene and the current viewing environment. The electronic device 100 adjusts the brightness of the display screen to the determined brightness to display the images or videos. When the image to be displayed is an HDR image, the electronic device 100 can also restore the highlight information in the HDR image according to the current brightness capability of the display screen, presenting the detail and contrast of the highlight information in the HDR image. This makes the images or videos displayed by the electronic device 100 more realistic.
[0147] Before describing a display method provided in the embodiments of this application, an exemplary electronic device 100 provided in the embodiments of this application will be introduced first.
[0148] Figure 3A This is a schematic diagram of the hardware structure of the electronic device 100 provided in the embodiments of this application.
[0149] like Figure 3A As shown, the electronic device 100 may include: a processor 301, an internal memory 302, a camera assembly 303, a display screen 304, and an ambient light sensor 305, etc.
[0150] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0151] Processor 301 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. The different processing units may be independent devices or integrated into one or more processors.
[0152] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0153] The processor 301 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 301 is a cache memory. This memory can store instructions or data that the processor 301 has just used or that are used repeatedly. If the processor 301 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 301, and thus improves the efficiency of the system.
[0154] In some embodiments, the processor 301 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0155] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 301 may include multiple I2C buses. The processor 301 can couple to the touch sensor, charger, flash, camera component 303, etc., through different I2C bus interfaces. For example, the processor 301 can couple to the touch sensor through the I2C interface, enabling the processor 301 and the touch sensor to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0156] The I2S interface can be used for audio communication. In some embodiments, the processor 301 may include multiple I2S buses. The processor 301 can be coupled to the audio module via the I2S bus to realize communication between the processor 301 and the audio module.
[0157] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals.
[0158] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 301 to a wireless communication module. For example, the processor 301 communicates with the Bluetooth module in the wireless communication module via the UART interface to implement Bluetooth functionality.
[0159] The MIPI interface can be used to connect the processor 301 to peripheral devices such as the display screen 304 and the camera assembly 303. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 301 and the camera assembly 303 communicate via the CSI interface to enable the electronic device 100 to perform its shooting function. The processor 301 and the display screen 304 communicate via the DSI interface to enable the electronic device 100 to perform its display function.
[0160] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 301 to the camera component 303, the display screen 304, the ambient light sensor 305, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0161] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0162] Electronic device 100 implements display functions through a GPU, display screen 304, and application processor. The GPU is a microprocessor for image processing, connecting the display screen 304 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 301 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0163] The display screen 304 is used to display images, videos, etc. The display screen 304 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 304, where N is a positive integer greater than 1.
[0164] Electronic device 100 can perform shooting functions through ISP, camera component 303, video codec, GPU, display screen 304 and application processor.
[0165] The ISP (Image Signal Processor) is used to process data fed back from the camera assembly 303. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera assembly 303.
[0166] The camera assembly 303 is used to capture still images or videos. An object passes through a lens to generate an optical image that is projected onto a photosensitive element. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard formats such as RGB and YUV. In some embodiments, the electronic device 100 may include one or N camera assemblies 303, where N is a positive integer greater than 1.
[0167] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0168] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0169] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0170] Internal memory 302 can be used to store computer executable program code, which includes instructions. Processor 301 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 302. Internal memory 302 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application required for a function (such as facial recognition, fingerprint recognition, mobile payment, etc.). The data storage area may store data created during the use of electronic device 100 (such as facial information template data, fingerprint information templates, etc.). Furthermore, internal memory 302 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0171] The ambient light sensor 305 is used to sense the brightness of ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 304 according to the sensed ambient light brightness. The ambient light sensor 305 can also be used to automatically adjust the white balance when taking pictures.
[0172] Electronic device 100 can have more than Figure 3A The more or fewer components shown can be combined into two or more components, or they can have different component configurations. Figure 3A The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0173] To better understand Figure 3A The software structure of the electronic device 100 shown is described below. Before describing the software structure of the electronic device 100, the possible architectures for the software system of the electronic device 100 will be explained first.
[0174] Specifically, in practical applications, the software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture.
[0175] Furthermore, it is understood that the software systems used by mainstream electronic devices currently include, but are not limited to, Windows, Android, and iOS systems. For ease of explanation, this application embodiment uses the layered architecture of the Android system as an example to illustrate the software structure of the electronic device 100.
[0176] Furthermore, the camera request processing method provided in the embodiments of this application is also applicable to other systems in specific implementations.
[0177] Figure 3B A schematic diagram of the hardware and software architecture of an electronic device 100 provided in an embodiment of this application is shown.
[0178] like Figure 3B As shown, the hardware and software architecture of the electronic device 100 includes a software system and a hardware layer that, together with the software structure, implements related shooting (e.g., previewing, taking pictures, recording videos, etc.) and display. The layered architecture divides the software system of the electronic device 100 into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the system is divided into four layers, from top to bottom: application layer, framework layer (FWK), hardware abstraction layer (HAL), and driver layer.
[0179] The application layer can include a series of application packages. For example... Figure 3B As shown, the application package can include a camera app and a gallery app.
[0180] Optionally, the application package may also include applications (also referred to as applications) such as calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS. This application does not limit this aspect.
[0181] The framework layer provides the application programming interface (API) and programming framework for the application packages in the application layer. The framework layer includes some predefined functions.
[0182] like Figure 3B As shown, the framework layer may include a camera service module, an image / video metadata management module, and a display engine. The camera service module can receive camera requests from the camera application and forward them to the hardware abstraction layer. In this embodiment, the camera requests from the camera application include, but are not limited to, preview requests, photo requests, and video recording requests. A preview request is used to request a preview of the image captured by the camera component of the electronic device 100 in the camera application. A photo request can be used to request the camera component of the electronic device 100 to take and save an image. A video recording request is used to request the camera component of the electronic device 100 to take and save a video.
[0183] In some examples, an image may also be referred to as an image frame, and this application does not limit this to specific examples.
[0184] In some possible implementations, the camera service module can also obtain images or videos uploaded from the hardware abstraction layer. Then, the camera service module can transmit the acquired images or videos to the image / video metadata management module.
[0185] In some other possible implementations, the camera service module can obtain the storage address of the image or video captured according to the camera request from the hardware abstraction layer. Then, the camera service module can send the storage address of the image or video to the image / video metadata management module.
[0186] The image / video metadata management module can receive images or videos sent by the camera service module. Then, the image / video metadata management module can save the image or video metadata along with the image in the database used by the electronic device 100 for storing images and videos.
[0187] Taking images as an example, such as Figure 3CAs shown, the metadata information of an image can include basic metadata information and extended metadata information. The basic metadata information may include, but is not limited to, the image's capture time and Uniform Resource Locator (URL). The extended metadata information may include, but is not limited to, one or more of the following: ambient light level, compression information, maximum dynamic range (MDR), face / blue sky information, AI recognition information, category information, color temperature information, highlight color information, and noise information. Ambient light level refers to the brightness of the environment in which the camera component captures the image. Compression information records the correspondence between the initial brightness value and the compressed brightness value of the high dynamic range region in the HDR image. Maximum dynamic range refers to the maximum brightness value in the image. Face / blue sky information indicates whether there is a face / blue sky in the image. AI recognition information indicates information identified from the image content, such as the scene (e.g., daytime, nighttime, landscape, indoor, outdoor, etc.), the subject (e.g., plants, animals, people, objects, food, etc.), and the subject's position in the image. Category information indicates the image's classification, such as landscape, portrait, food, etc. Color temperature information describes the color temperature value of an image. Highlight color information describes the color values of high dynamic range regions in an image. Noise information indicates pixels in an image that contain noise.
[0188] For example, the first field in the metadata information can be used to describe the time the image was captured. The second field in the metadata information can describe the URL of the image. The third field in the metadata information can be used to describe the ambient light level of the image. The fourth field in the metadata information can be used to describe the compression information of the image. The fifth field in the metadata information can be used to describe the maximum dynamic range of the image. The sixth field in the metadata information can be used to describe facial or blue sky information contained in the image. For example, a value of 0 in the sixth field indicates that the image contains a face; a value of 1 in the sixth field indicates that the image contains a blue sky. The seventh field in the metadata information can be used to describe the AI recognition information of the image. The eighth field in the metadata information can be used to describe the image's category information. The ninth field in the metadata information can be used to describe the image's color temperature information. The tenth field in the metadata information can be used to describe the image's highlight color information. The eleventh field in the metadata information can be used to describe the image's noise information.
[0189] like Figure 3BAs shown, the display engine may include a tone mapping module and a backlight control module. The tone mapping module is used to perform tone mapping on the compressed HDR image to be displayed, mapping the compressed brightness values of the high dynamic range regions in the HDR image to their original brightness values (i.e., the initial brightness values). The backlight control module is used to control the brightness of the display screen.
[0190] In some embodiments, the framework layer may also be referred to as the application framework layer.
[0191] The Hardware Abstraction Layer (HAL) is an interface layer located between the application framework layer and the driver layer, providing a virtual hardware platform for the operating system.
[0192] The Hardware Abstraction Layer (HAL) can include a Camera Hardware Abstraction Layer. This layer can receive camera requests from the framework layer and send the camera parameters from those requests to the camera component via the driver layer.
[0193] Optionally, the camera hardware abstraction layer can store the images or videos acquired by the camera component into the corresponding camera request buffer address, and send the buffer address to the camera service module in the framework layer.
[0194] In this embodiment of the application, taking an image as an example, the camera request corresponding to the image refers to a camera request that includes the camera parameters for obtaining the image. That is, the camera can obtain the image according to the camera parameters in the camera request. For example, if the camera obtains image 1 according to the camera parameters in camera request 1, then camera request 1 can be referred to as the camera request corresponding to image 1.
[0195] The driver layer is the layer between hardware and software. It includes drivers for various hardware components. The driver layer can include camera drivers and display drivers, among others. Specifically, the camera driver drives the image sensors (e.g., image sensor 1, image sensor 2, etc.) of one or more cameras in the camera assembly to acquire images and drives the image signal processor to preprocess the images. The display driver drives the display.
[0196] The hardware layer may include a camera assembly, an image signal processor (ISP), an ambient light sensor, a display, etc. The camera assembly may include image sensors from one or more cameras (e.g., image sensor 1, image sensor 2, etc.). Optionally, the camera assembly may also include a time-of-flight (TOF) sensor, a multispectral sensor, etc. The image signal processor can be used to process the images captured by the camera assembly. The display can be used to display the images sent by the camera application. The ambient light sensor can be used to sense the ambient light brightness and send the sensed ambient light brightness to the backlight control module. Optionally, the ambient light sensor can also send the sensed ambient light brightness to the image / video metadata management module.
[0197] In this embodiment, the application in the electronic device 100 that can be used to capture images is not limited to a camera application. Taking the camera application as an example, the image capture process of the electronic device 100 may include: when the camera application responds to a user's image capture operation, it can send a camera request down to the camera hardware abstraction layer through the camera service module. The camera hardware abstraction layer can send the camera parameters in the camera request to the camera component through the camera driver. The camera component can acquire an image according to the camera parameters. Optionally, the camera module can send the acquired image to an image signal processor. The image signal processor can process the image, for example, remove noise from the image, perform white balance on the image, etc. The image signal processor can upload the processed image to the camera hardware abstraction layer through the camera driver. Then, the camera hardware abstraction layer can upload the processed image to the camera service module. The camera service module can upload the image to the camera application, and the camera application can display the image in the preview interface.
[0198] The camera service module can also send the processed images to the image / video metadata management module. The image / video metadata management module can retrieve the metadata information and save it in a single image file.
[0199] In this embodiment, the application in the electronic device 100 that can display images or videos is not limited to a gallery application. Taking a gallery as an example, the process of the electronic device 100 displaying an image may include: when the gallery application responds to the user's operation of displaying image 1, it can obtain metadata information such as the shooting environment illuminance and high compression information of the shooting scene of image 1 from the image / video metadata management module. Then, the gallery application can send the metadata information such as the shooting environment illuminance and high compression information of the shooting scene of image 1 to the display engine. The tone mapping module in the display engine can restore the high dynamic range brightness of the compressed image 1 based on the compression information to obtain the restored image 1. The backlight control module in the display engine can determine the brightness of the image displayed on the screen based on the shooting environment illuminance of the shooting scene of image 1 and the current viewing environment brightness. When displaying the image, the backlight control module can set the brightness of each pixel in the image according to the determined image brightness. For details on how the electronic device 100 adjusts the brightness of the display screen according to the shooting environment illuminance of the shooting scene and the viewing environment brightness, please refer to the following section. Figure 4 The description of that will not be repeated here. Regarding how the electronic device 100 restores the compressed high dynamic range brightness in image 1 based on the compressed information, and obtains the restored image 1, please refer to the following section... Figure 7 The description will not be repeated here.
[0200] Based on the hardware structure and software framework of the above-mentioned electronic device 100, this application embodiment provides a display method. Figure 4 An exemplary flowchart of a display method provided in an embodiment of this application is shown. Figure 4 As shown, a display method provided in this application embodiment may include the following steps:
[0201] S401. Electronic device 100 captures image 1 and saves image 1, ambient illuminance, and brightness 1. Ambient illuminance is the ambient illuminance at the time image 1 is captured, and brightness 1 is the brightness value of the first grayscale pixel of image 1 under the ambient illuminance.
[0202] The electronic device 100 can respond to the user's photo-taking operation and acquire image 1. When acquiring image 1, the electronic device 100 can also acquire the ambient light level of the shooting scene of image 1.
[0203] In one possible implementation, the electronic device 100 may contain, for example... Figure 3A The ambient light sensor 305 is shown in the image. The electronic device 100 can obtain the ambient light level of the shooting scene in Image 1 through the ambient light sensor 305.
[0204] Alternatively, in another possible implementation, the electronic device 100 can determine the ambient illuminance of the shooting environment for the image 1 and the shooting scene based on one or more of the camera component's sensitivity, aperture value, and exposure time.
[0205] In another possible implementation, the electronic device 100 can also determine the ambient illuminance of the shooting scene for image 1 based on an algorithm used to calculate ambient brightness. For example, the algorithm for calculating ambient brightness can be a neural network model, whose training data includes multiple images and the ambient illuminance of the shooting scene corresponding to each image. The electronic device 100 can input image 1 into the neural network model and obtain the ambient illuminance of the shooting scene for image 1 as output by the neural network model.
[0206] This application embodiment does not limit the method of obtaining the ambient illumination of the shooting scene in Image 1.
[0207] In one possible implementation, the electronic device 100 can save image 1, and also save the ambient illuminance corresponding to image 1, as well as the brightness values corresponding to each grayscale value of image 1 under the ambient illuminance. For example, the brightness value of the first grayscale pixel in image 1 under the ambient illuminance is brightness 1. Exemplarily, the electronic device 100 can save the ambient illuminance corresponding to image 1, and the brightness values corresponding to each grayscale value of image 1 under the ambient illuminance in the image 1's metadata information. The specific information included in the metadata information of image 1 can be found in [reference needed]. Figure 3C The description in the text will not be repeated here.
[0208] This metadata information can be stored in several formats:
[0209] 1. Electronic device 100 can save the metadata information of image 1 in a file used to store image 1. For example, the metadata information of image 1 is stored in a file in Joint Photographic Experts Group (JPEG) format in exchangeable image file (EXIF) format.
[0210] 2. Electronic device 100 can encode the metadata information of image 1 into image 1 using a specific encoding format.
[0211] This application embodiment does not limit the storage format of the metadata information of image 1.
[0212] S402. When the electronic device 100 displays image 1 in scene 1, obtain the ambient illuminance 1 of scene 1.
[0213] Electronic device 100 can display image 1 in scene 1. When electronic device 100 displays image 1 in response to operation 1 on image 1, electronic device 100 can obtain the ambient illuminance 1 of the current scene 1.
[0214] In one possible implementation, the electronic device 100 may include an ambient light sensor, which can detect the ambient illuminance I.
[0215] Alternatively, in another possible implementation, the electronic device 100 can determine the ambient illuminance 1 based on the current time, weather, and location. For example, the electronic device 100 can obtain that the current time is 10:00 AM, the weather is sunny, and the location is outdoors. Then, based on the current time and location, the electronic device 100 can determine that the current scene 1 is relatively bright, and the value of ambient illuminance 1 is relatively large, for example, ambient illuminance 1 is 5000 lux. As another example, the electronic device 100 can obtain that the current time is 10:00 PM, the weather is raining, and the location is outdoors. Then, based on the current time and location, the electronic device 100 can determine that the scene 1 is relatively dark, and the value of ambient illuminance 1 is relatively small, for example, ambient illuminance 1 is 10 lux.
[0216] This application embodiment does not limit how the electronic device 100 obtains the ambient illuminance of the scene.
[0217] The electronic device 100 can receive an operation 1 from the user in scenario 1 to display image 1. For example, operation 1 could be the user clicking on the thumbnail of image 1 in a gallery application. Alternatively, operation 1 could be the user inputting a voice command to the electronic device 100 to display image 1, such as "display image 1". This application embodiment does not limit the specific nature of operation 1.
[0218] In response to user operation 1, electronic device 100 can read image 1 and the corresponding ambient illuminance of image 1 from its memory. The ambient illuminance of image 1 is the ambient illuminance of the scene at the time image 1 was taken.
[0219] In one possible implementation, the ambient illuminance corresponding to the shooting environment of image 1 can be stored in the metadata information of image 1. The electronic device 100 can obtain the ambient illuminance corresponding to the shooting environment of image 1 from the metadata information of image 1.
[0220] In another possible implementation, the electronic device 100 does not store the ambient illuminance corresponding to image 1, nor does the image file of image 1 contain the ambient illuminance corresponding to image 1. The electronic device 100 may include an algorithm for calculating the ambient illuminance. When image 1 is the input to this algorithm, the output of the algorithm can be the ambient illuminance corresponding to image 1.
[0221] S403. Electronic device 100 determines brightness 2 based on ambient illuminance, brightness 1 and ambient illuminance 1. Brightness 2 is the brightness value of the first gray level pixel of image 1 under ambient illuminance 1.
[0222] This brightness 1 can be understood as the brightness of the first grayscale pixel of image 1 as perceived by the human eye under the shooting environment. This brightness 1 can be determined based on the illumination of the shooting environment.
[0223] For example, in one possible implementation, luminance 1 = ambient illuminance / π (" / " represents division).
[0224] Electronic device 100 can determine brightness 2 based on the ambient illuminance (light intensity 1) and viewing ambient illuminance of the shooting environment corresponding to image 1. Brightness 2 is the brightness value of the first grayscale pixel in image 1 under ambient illuminance 1. In this way, the brightness of the first grayscale pixel in image 1 seen by the user in the shooting environment is consistent with the brightness of the first grayscale pixel in image 1 displayed on the screen in the viewing environment. Therefore, it ensures that image 1 appears consistent between the shooting and viewing environments, resulting in a more realistic image 1 displayed on electronic device 100, thereby improving the user experience.
[0225] The electronic device 100 can select a pixel with a grayscale value of the first grayscale level in Image 1 as a reference point to first determine the brightness of the pixel with a grayscale value of the first grayscale level as displayed on the screen under the viewing environment. Then, when displaying Image 1, the electronic device 100 can determine the brightness of pixels with different grayscale values in the entire image based on the brightness of the reference point.
[0226] In one possible implementation, the electronic device 100 may also determine the brightness value of the second grayscale pixel of the image 1 as brightness 3 based on brightness 2.
[0227] In one possible implementation, the brightness (i.e., brightness 3) of the pixel with a grayscale value of the second grayscale level in image 1 is the brightness (i.e., brightness 2) of the pixel with a grayscale value of the first grayscale level multiplied by a first coefficient. The first coefficient can be equal to the second grayscale level divided by the first grayscale level.
[0228] For example, the first grayscale value can be 255, and the second grayscale value can be 125. That is, the electronic device 100 can use the pixel with a grayscale value of 255 in image 1 as a reference point. The electronic device 100 can determine the brightness of the pixel with a grayscale value of 255 in image 1 under the viewing environment as brightness 2 based on the ambient light level, the brightness of the pixel with a grayscale value of 255 in image 1 under the shooting environment (i.e., brightness 1), and the ambient light level 1. Then, the electronic device 100 can determine the brightness 3 of the pixel with a grayscale value of 125 based on the brightness of the pixel with a grayscale value of 255, where brightness 3 is approximately half of brightness 2. When displaying image 1, the electronic device 100 can set the brightness of the pixel with a grayscale value of 255 in image 1 to brightness 2 and set the brightness of the pixel with a grayscale value of 125 to brightness 3. In this way, the electronic device 100 can determine the brightness of the pixel with each grayscale value in image 1 based on the brightness of the pixel with a grayscale value of 255.
[0229] In one possible implementation, the electronic device 100 may contain a visual consistency model. The inputs to this model may be the ambient illuminance, brightness 1, and ambient illuminance 1 corresponding to the shooting environment of image 1, and the output of this model may be brightness 2. In this way, the electronic device 100 can use the visual consistency model to determine the brightness of the pixels with a grayscale value of the first grayscale level in image 1 displayed on the screen under the viewing environment.
[0230] In some examples, the visual consistency model may also be called a neural network model, a computational model, etc., but the name of the visual consistency model is not limited in the embodiments of this application.
[0231] For example, such as Figure 5A As shown, when the electronic device 100 takes a picture, the ambient illuminance is 7000 lux. The electronic device 100 can acquire the ambient illuminance during shooting. Furthermore, the electronic device 100 can determine the brightness of pixel 3 with a grayscale value of 255 in the image as seen by the human eye under the shooting environment, which is equivalent to a brightness of 2000 nits for pixel 3 with a grayscale value of 255 in the image displayed on the screen under the shooting environment. The electronic device 100 can also acquire the ambient illuminance of 1000 lux under the current viewing scene 1. The electronic device 100 can input the ambient illuminance of 7000 lux, the brightness of pixel 3 with a grayscale value of 255 (2000 nits) in the image displayed on the screen under the shooting environment, and the ambient illuminance of 1000 lux into the visual consistency model. The visual consistency model can output that, under the viewing environment, the brightness of the pixel with a grayscale value of the first grayscale level in image 1 displayed on the screen is 400 nits.
[0232] like Figure 5BAs shown, the electronic device 100 can display an image display interface 500A in an ambient illuminance of 1000 lux, which includes an image 501. This image 501 was captured in an ambient illuminance of 7000 lux. That is, the electronic device 100 determines, based on the ambient illuminance of the image 501, the brightness of a pixel 3 with a grayscale value of 255 in the image displayed on the screen under the shooting environment, and the ambient illuminance, that the brightness of the pixel with a grayscale value of the first grayscale level in the image 1 displayed on the screen under viewing environment 1 is 400 nits. When displaying the image 501 under viewing environment 1, the electronic device 100 can set the brightness of the pixel with a grayscale value of 255 in the image 501 to 400 nits.
[0233] For example, such as Figure 5C As shown, when the electronic device 100 takes a picture, the ambient illuminance is 7000 lux. The electronic device 100 can acquire the ambient illuminance during shooting. Furthermore, the electronic device 100 can determine the brightness of pixel 3 with a grayscale value of 255 in the image as seen by the human eye under the shooting environment, which is equivalent to a brightness of 2000 nits for pixel 3 with a grayscale value of 255 in the image displayed on the screen under the shooting environment. The electronic device 100 can also acquire the ambient illuminance of 100 lux under the current viewing scene 2. The electronic device 100 can input the ambient illuminance of 7000 lux, the brightness of pixel 3 with a grayscale value of 255 (2000 nits) in the image displayed on the screen under the shooting environment, and the ambient illuminance of 100 lux into the visual consistency model. The visual consistency model can output that the brightness of the pixel with a grayscale value of the first grayscale level in the image 1 displayed on the screen under the viewing environment 2 is 150 nits.
[0234] like Figure 5D As shown, the electronic device 100 can display an image display interface 500B in an environment with an illuminance of 100 lux. This image display interface 500B contains an image 501. This image 501 was captured in a shooting environment with an illuminance of 7000 lux. That is, the electronic device 100 determines, based on the shooting environment illuminance of image 501, the brightness of pixel 3 with a grayscale value of 255 in the image displayed on the screen under the shooting environment, and the viewing environment brightness, that the brightness of the pixel with a grayscale value of the first grayscale level in image 1 displayed on the screen under viewing environment 2 is 150 nits. When the electronic device 100 displays image 501 under viewing environment 1, it can set the brightness of the pixel with a grayscale value of 255 in image 501 to 150 nits.
[0235] For example, the inputs and outputs of this visual consistency model can be shown in Table 1 below.
[0236] Table 1
[0237]
[0238] As shown in Table 1, when the input of the visual consistency model is: the shooting environment illumination is 0 lux, the brightness of the pixel with the gray level of the first gray level in the image under the shooting environment is 1 nit, and the viewing environment brightness is 100 lux, the output is: the brightness of the pixel with the gray level of the first gray level in the image 1 displayed on the screen under the viewing environment is 8 nit.
[0239] As shown in Table 1, when the input of the visual consistency model is: the shooting environment illumination is 0 lux, the brightness of the pixel with the gray level of the first gray level in the image under the shooting environment is 10 nit, and the viewing environment brightness is 100 lux, the output is: the brightness of the pixel with the gray level of the first gray level in the image 1 displayed on the screen under the viewing environment is 50 nit.
[0240] As shown in Table 1, when the input of the visual consistency model is: the shooting environment illumination is 0 lux, the brightness of the pixel with the gray level of the first gray level in the image under the shooting environment is 50 nit, and the viewing environment brightness is 100 lux, the output is: the brightness of the pixel with the gray level of the first gray level in the image 1 displayed on the screen under the viewing environment is 200 nit.
[0241] As shown in Table 1, when the input of the visual consistency model is: the shooting environment illumination is 0 lux, the brightness of the pixel with the gray level of the first gray level in the image under the shooting environment is 100 nit, and the viewing environment brightness is 100 lux, the output is: the brightness of the pixel with the gray level of the first gray level in the image 1 displayed on the screen under the viewing environment is 350 nit.
[0242] As shown in Table 1, when the input of the visual consistency model is: the shooting environment illumination is 0 lux, the brightness of the pixel with the gray level of the first gray level in the image under the shooting environment is 1 nit, and the viewing environment brightness is 1000 lux, the output is: the brightness of the pixel with the gray level of the first gray level in the image 1 displayed on the screen under the viewing environment is 25 nit.
[0243] As shown in Table 1, when the input of the visual consistency model is: the shooting environment illumination is 0 lux, the brightness of the pixel with the gray level of the first gray level in the image under the shooting environment is 10 nit, and the viewing environment brightness is 1000 lux, the output is: the brightness of the pixel with the gray level of the first gray level in the image 1 displayed on the screen under the viewing environment is 150 nit.
[0244] As shown in Table 1, when the input of the visual consistency model is: the shooting environment illumination is 0 lux, the brightness of the pixel with the gray level of the first gray level in the image under the shooting environment is 50 nit, and the viewing environment brightness is 1000 lux, the output is: the brightness of the pixel with the gray level of the first gray level in the image 1 displayed on the screen under the viewing environment is 400 nit.
[0245] As shown in Table 1, when the input of the visual consistency model is: the shooting environment illumination is 0 lux, the brightness of the pixel with the gray level of the first gray level in the image under the shooting environment is 100 nit, and the viewing environment brightness is 1000 lux, the output is: the brightness of the pixel with the gray level of the first gray level in the image 1 displayed on the screen under the viewing environment is 700 nit.
[0246] Table 1 above is merely an example; the specific inputs and outputs of the visual consistency model are not limited in the embodiments of this application.
[0247] S404. Electronic device 100 maps the brightness value of the first grayscale pixel of image 1 to brightness 2.
[0248] When the electronic device 100 determines that the brightness value of a pixel in the first grayscale level of image 1 in scene 1 is brightness 2, the processor in the electronic device 100 can map the brightness value of the pixel in the first grayscale level of image 1 to brightness 2. For example, the electronic device 100 can set the brightness of the pixel in image 1 with a grayscale value of the first grayscale level to brightness 1. For example, image 1 could be... Figure 5B In image 501, the brightness of the pixel with a grayscale value of 255 is set to 400 nits. It is understood that there can be one or more pixels with a grayscale value of the first grayscale level in image 1, and this embodiment does not specifically limit the number of pixels with a grayscale value of the first grayscale level in image 1. The processor of electronic device 100 can also send the mapping result to the display screen.
[0249] S405. Electronic device 100 displays image 1 in scene 1, where the brightness of the first grayscale pixel of image 1 is brightness 2.
[0250] Electronic device 100 can display image 1 on a screen in scene 1. The brightness of the first grayscale pixel of image 1 displayed by electronic device 100 is brightness 2.
[0251] In one possible implementation, the display method provided in this application embodiment may further include: when the electronic device 100 displays image 1 in scene 2, obtaining the ambient illuminance 2 of scene 2; determining luminance 4 based on the shooting ambient illuminance, luminance 1, and ambient illuminance 2, where luminance 4 is the luminance value of the pixel of the first gray level of image 1 under ambient illuminance 2; mapping the luminance value of the pixel of the first gray level of image 1 to luminance 4; and displaying image 1 in scene 2, where the luminance value of the pixel of the first gray level of image 1 is luminance 4. Thus, when the electronic device 100 displays image 1 in different viewing scenarios, the luminance of the pixel of the first gray level in image 1 displayed on the screen of the electronic device 100 is different. For example, as... Figure 5B and Figure 5D As shown, in a viewing environment with an ambient brightness of 1000 lux, the brightness of a pixel with a grayscale value of 255 in the image 501 displayed by the electronic device 100 is 400 nits. In a viewing environment with an ambient brightness of 100 lux, the brightness of a pixel with a grayscale value of 255 in the image 501 displayed by the electronic device 100 is 150 nits.
[0252] The display method provided in this application embodiment allows the electronic device 100 to determine the brightness of pixels with a grayscale value of the first grayscale level in the image displayed on the screen under the viewing environment, based on the ambient light level of the shooting environment for each image, the brightness of pixels with a grayscale value of the first grayscale level in the image under the shooting environment, and the ambient light level of the viewing environment. Thus, the user's perception of the brightness of pixels with a grayscale value of the first grayscale level in the image viewed on the electronic device 100 is consistent with the user's perception of the brightness of pixels with a grayscale value of the first grayscale level in the image under the shooting environment. In other words, the image displayed by the electronic device 100 has higher visual consistency with the actual shooting scene of the image, and the image looks more realistic. This improves the user experience.
[0253] For example, Figure 6 An exemplary schematic diagram illustrating the display effect of the images in this application is shown. For example... Figure 6 As shown, image 601 was taken during the day. The content of image 601 is related to... Figure 1B The content of the image shown in picture 106 is the same, and the shooting time of picture 601 is the same as that of picture 106. Using the display method provided in this application embodiment, the brightness of picture 601 displayed by the electronic device 100 is closer to the brightness of the shooting scene than the brightness of picture 106.
[0254] like Figure 6 As shown, image 602 is a picture taken at night. The content of image 602 is related to... Figure 1BThe content of image 107 shown is the same, and the shooting time of image 602 is the same as that of image 107. Using the display method provided in this application embodiment, the brightness of image 602 displayed by the electronic device 100 is closer to the brightness of the shooting scene than the brightness of image 107.
[0255] In the embodiments of this application, Figure 4 The display method shown can be applied to video. Electronic device 100 can be configured to... Figure 4 The method shown herein performs brightness mapping on each frame of a video. For example, when recording a video, the electronic device 100 can save the video, the ambient illuminance of each frame in the video, and the brightness value (e.g., brightness 5) of the pixels at the first gray level in each frame. When displaying the video, the electronic device 100 can obtain the ambient illuminance of the current viewing scene. Then, the electronic device 100 can determine brightness 6 based on the ambient illuminance of the first frame in the video, the brightness value of the pixels at the first gray level of the first frame, and the ambient illuminance of the current viewing scene. Brightness 6 is the brightness value of the pixels at the first gray level of the first frame under the ambient illuminance of the current viewing scene. Next, the electronic device 100 can map the brightness value of the pixels at the first gray level of the first frame to brightness 6. The electronic device 100 can display the first frame of the video, and the brightness value of the pixels at the first gray level of the first frame displayed by the electronic device 100 is brightness 6. It is understood that the electronic device 100 can display each frame of the video according to the display method of the first frame, which will not be elaborated further in this application.
[0256] In some scenarios, electronic device 100 can capture HDR images. When electronic device 100 captures an HDR image, it compresses the high dynamic range (HDR) regions during storage. During display, electronic device 100 restores the compressed image based on the screen's brightness capability. If the screen's brightness capability is lower than a multiple of the HDR image's dynamic range, the restored HDR image will have a lower dynamic range than the original image, resulting in a difference in brightness contrast within the HDR regions displayed by electronic device 100. Figure 2ATaking the dynamic range compression curve 203 as an example, during shooting, the highest brightness corresponding to HDR is 5000%, which is 50 times the highest brightness corresponding to SDR (100%). During image encoding, the highest brightness corresponding to SDR is encoded as 203 nits, while the highest brightness corresponding to HDR is encoded as 1000 nits. The highest brightness corresponding to the encoded HDR is approximately 5 times that of the original HDR. That is, when shooting an HDR image, the electronic device 100 can store dynamic range information that is much greater than 5 times that of the reference white. Then, the electronic device 100 can compress the HDR image according to the HLG standard, and finally, when displayed, only 5 times the brightness dynamic range will be presented. In this way, the true brightness dynamic range of the captured HDR image cannot be restored, which will cause the contrast of the originally bright parts of the image to deteriorate, thus affecting the realism of the image.
[0257] This application provides a display method, which may include: when an electronic device 100 captures an HDR image, the electronic device 100 can save the HDR image and its corresponding compression information. When displaying the HDR image, the electronic device 100 can perform tone mapping on the HDR image based on the display brightness capability of its screen and the corresponding compression information to obtain a tone-mapped image. Finally, the electronic device 100 displays the tone-mapped image.
[0258] Figure 7 An exemplary embodiment of the present application provides a display method. For example... Figure 7 As shown, a display method provided in this application embodiment may include the following steps:
[0259] S701. Electronic device 100 captures an HDR image and compresses the high dynamic range region in the HDR image to obtain a compressed image and compression information. The compression information includes the correspondence between the dynamic range and the compression ratio in the compressed image.
[0260] Electronic device 100 can capture HDR images. Generally, considering the different HDR support capabilities of different display devices and the large storage space occupied by HDR images, electronic device 100 usually compresses the captured HDR images before saving them. This saves storage space for electronic device 100 and allows the HDR images to be displayed on display devices with different display capabilities.
[0261] Electronic device 100 can compress HDR images to obtain compressed images and compression information. The dynamic range of the compressed image's brightness is a smaller multiple than the dynamic range of the HDR image's brightness. For example, such as... Figure 8AAs shown in (a), the dynamic range compression curve corresponding to the HDR image can be any one of dynamic range compression curves 201, 202, and 203. Taking dynamic range compression curve 203 as an example, the highest brightness corresponding to the HDR image is 5000%, which is 50 times the highest brightness of 100% corresponding to SDR. That is, the dynamic range of the HDR image is 50 times greater. After encoding and compressing the HDR image, the highest brightness corresponding to the high dynamic range region in the compressed image is 1000 nits, and the highest brightness corresponding to the standard dynamic range region is 203 nits. The highest brightness corresponding to the high dynamic range region in the compressed image is approximately 5 times the highest brightness corresponding to the standard dynamic range region. That is, the dynamic range of the compressed image is approximately 5 times greater.
[0262] The electronic device 100 can store compression information, which may include the correspondence between the dynamic range and compression ratio of the HDR image. That is, the compression information can be used to record how an HDR image is compressed into a compressed image. Alternatively, the compression information may include the correspondence between the high dynamic range and compression ratio of the HDR image.
[0263] In this embodiment, the relationship between the dynamic range and compression ratio of the HDR image can be stored as a curve. Optionally, the relationship between the dynamic range and compression ratio of the HDR image can be presented in a table. This embodiment does not limit this aspect.
[0264] For example, the relationship between the dynamic range and compression ratio of an HDR image is stored in the form of a curve. For instance, the compression information stored by the electronic device 100 could be the dynamic range compression curve corresponding to the HDR image, or the compression curve of the high dynamic range region in the HDR image. For example, this compression information could be the dynamic range compression curve 203, or the highlight information portion of the dynamic range compression curve 203.
[0265] In one possible implementation, the electronic device 100 can store the compressed information in the metadata information corresponding to the HDR image. For example, the compressed information can be saved as an extended field in the metadata information. This application embodiment does not limit the form in which the compressed information is saved.
[0266] S702. When the compressed image is displayed on the electronic device 100, the compressed image and compression information are obtained.
[0267] Electronic device 100 can receive operation 2, which can be used to display the compressed image. For example, operation 2 could be a user clicking on a thumbnail of the compressed image in the gallery application of electronic device 100. Alternatively, operation 2 could be a user inputting a voice command to electronic device 100 to display the compressed image, for example, the voice command could be "display the compressed image". This application embodiment does not limit the specific details of operation 2.
[0268] In response to operation 2, when the electronic device 100 displays the compressed image, the electronic device 100 can acquire the compressed image and compression information.
[0269] S703. Electronic device 100 can obtain the correspondence between display brightness and dynamic range of HDR image based on compressed information.
[0270] Electronic device 100 can obtain the correspondence between display screen brightness and dynamic range of HDR image based on the correspondence between dynamic range and compression ratio of compressed image.
[0271] In one possible implementation, the electronic device 100 stores the correspondence between the dynamic range and compression ratio of the compressed image as a curve. The dynamic range of the compressed image can be the horizontal axis, and the compression ratio can be the vertical axis. Then, the electronic device 100 can reverse-map this curve, that is, using the dynamic range of the compressed image as the vertical axis and the compression ratio as the horizontal axis, to resolve the dynamic range of the HDR image. Next, the electronic device 100 maps the dynamic range of the HDR image to the display brightness capability of the display screen, thereby obtaining the correspondence between the display brightness capability of the display screen and the dynamic range of the HDR image.
[0272] For example, such as Figure 8A As shown, the electronic device 100 can save the correspondence between the dynamic range and compression ratio of HDR in the form of a dynamic compression curve. The correspondence between the dynamic range and compression ratio of HDR can be represented as follows: Figure 8A The image (a) shows any one of the dynamic range compression curves 201, 202, and 203. The electronic device 100 can inversely map dynamic range compression curve 201 to... Figure 8A Curve 803 is shown in (b) of the diagram. Electronic device 100 can inversely map dynamic range compression curve 202 to... Figure 8A Curve 802 is shown in (b) of the diagram. Electronic device 100 can inversely map dynamic range compression curve 203 to... Figure 8A Curve 801 is shown in (b) of the diagram.
[0273] Taking curve 801 as an example, electronic device 100 can obtain from curve 801 that the highest brightness corresponding to the HDR region of the HDR image is 5000%, and the highest brightness corresponding to the SDR region is 100%. The highest brightness corresponding to the HDR region in the HDR image is 50 times that of the highest brightness corresponding to the SDR region. Electronic device 100 can establish a one-to-one correspondence between the dynamic range of HDR and the display brightness capability of the screen, thus obtaining the correspondence between the display brightness capability of the screen and the dynamic range of the HDR image.
[0274] Taking curve 801 as an example, electronic device 100 can obtain from curve 801 that the highest brightness corresponding to the HDR region in the HDR image is 50 times that of the highest brightness corresponding to the SDR region. If the highest brightness of the display of electronic device 100 is 500 nits, and the displayable SDR brightness is 10 nits, then electronic device 100 has the ability to reproduce a dynamic range 50 times greater. Then, electronic device 100 can map the highest HDR brightness corresponding to the display to the highest brightness corresponding to the HDR region in the HDR image, and map the SDR brightness corresponding to the display to the highest brightness corresponding to the SDR region in the HDR image. That is, electronic device 100 can map the highest brightness of 5000% corresponding to the HDR region in the HDR image to the highest brightness of 500 nits on the display, and map the highest brightness of 100% corresponding to the SDR region in the HDR image to the brightness of 10 nits on the display. In this way, electronic device 100 can obtain the correspondence between the display brightness capability of the display and the dynamic range of the HDR image. For example, the correspondence between the display brightness capability of the display and the dynamic range of the HDR image is as follows: Figure 8A As shown by curve 804 in (c), the slope of curve 804 can be 1. Curve 804 can also present a dynamic range of 50 times at the display end, thus better reflecting the contrast of the bright areas.
[0275] If electronic device 100 maps the dynamic range of an HDR image to the display brightness capability of the screen according to a multiple of the dynamic range of the compressed image, then the dynamic range multiple of the brightness of the final displayed image will be the same as the dynamic range multiple of the compressed image. This will result in poor contrast in the highlight areas of the displayed image. For example, Figure 8A The vertical axis in (a) shows that the dynamic range of the data encoded according to the HLG standard is approximately 5 times, meaning the dynamic range of the compressed image is approximately 5 times greater. For example, as... Figure 8AAs shown by curve 805 in (c) of the diagram, the electronic device 100 maps the 50x dynamic range of the HDR image to the 5x brightness dynamic range of the display screen. That is, the electronic device 100 can map the highest brightness of 5000% corresponding to the HDR region in the HDR image to the highest brightness of 50 nits on the display screen, and the highest brightness of 100% corresponding to the SDR region in the HDR image to the brightness of 10 nits on the display screen. Thus, when a pixel with a brightness of 5000% in the HDR image is displayed on the display screen, the brightness is 50 nits, and when a pixel with a brightness of 3000% in the HDR image is displayed on the display screen, the brightness is also 50 nits. This results in poor pixel contrast in the high dynamic range region of the HDR image displayed on the display screen, causing distortion of the displayed HDR image. Furthermore, the display capabilities of the electronic device 100 are not utilized.
[0276] S704. Electronic device 100 performs tone mapping on the compressed image based on the correspondence between the display brightness and the dynamic range of the HDR image to obtain a tone-mapped image. The brightness at the maximum value of the high dynamic range in the tone-mapped image is the maximum brightness supported by the display.
[0277] Electronic device 100 can perform tone mapping on compressed images based on the correspondence between display brightness and the dynamic range of HDR images. For example, using... Figure 8A Taking the relationship between display brightness capability and dynamic range of the compressed image shown in curve 804 (c) as an example, electronic device 100 can map the brightness of a pixel with a dynamic range of 5000% in the compressed image to 500 nits, and the brightness of a pixel with a dynamic range of 100% in the compressed image to 10 nits. In turn, electronic device 100 can determine the brightness of each pixel in the compressed image when displayed on the screen according to curve 804. In this way, electronic device 100 can obtain a tone-mapped image. The brightness at the maximum high dynamic range in the tone-mapped image is the maximum brightness supported by the display screen.
[0278] For example, Figure 8B Examples are shown of the dynamic range curves corresponding to the compressed image and the tone-mapped image. Figure 8B The compression curve in the figure represents the dynamic range curve of the compressed image. The horizontal axis of the compression curve represents the dynamic range of brightness of the image before compression (original image), and the vertical axis represents the dynamic range of brightness of the image after compression. Figure 8BThe restoration curve in the image represents the dynamic range of the tone-mapped image. The horizontal axis of the restoration curve represents the dynamic range of brightness in the original image, and the vertical axis represents the dynamic range of brightness in the tone-mapped image. Figure 8B The dynamic range of brightness of the original image, the compressed image, and the tone-mapped image shown in Table 2 are as follows.
[0279] Table 2
[0280]
[0281] As shown in Table 2, the pixel brightness values in the original image range from 0.0 nit to 3.0 nit. The pixel brightness values in the compressed image range from 0.0 to 1.0 nit. The pixel brightness values in the tone-mapped image range from 0.0 nit to 3.0 nit.
[0282] As shown in Table 2, a pixel with a brightness value of 0.0 nit in the original image has a brightness value of 0.0 nit in both the compressed and tone-mapped images. A pixel with a brightness value of 0.2 nit in the original image has a brightness value of 0.3 nit in the compressed image and a brightness value of 0.0 nit in the tone-mapped image. Multiple pixels with brightness values of 0.4 nit and 0.6 nit in the original image have their brightness values compressed to 0.4 nit in the compressed image; however, in the tone-mapped image, their brightness values are 0.1 nit and 0.2 nit, respectively. A pixel with a brightness value of 0.8 nit in the original image has its brightness value compressed to 0.5 nit in the compressed image; and in the tone-mapped image, its brightness value is 0.4 nit. In the original image, several pixels with brightness values of 0.9 nit and 1.1 nit were compressed to 0.6 nit in the compressed image; however, in the tone-mapped image, their brightness values are 0.5 nit and 0.7 nit, respectively. Similarly, in the original image, several pixels with brightness values of 1.3 nit and 1.5 nit were compressed to 0.7 nit in the compressed image; however, in the tone-mapped image, their brightness values are 0.9 nit and 1.1 nit, respectively. Finally, in the original image, several pixels with brightness values of 1.7 nit, 1.9 nit, and 2.1 nit were compressed to 0.8 nit in the compressed image; however, in the tone-mapped image, their brightness values are 1.3 nit, 1.5 nit, and 1.7 nit, respectively. In the original image, several pixels with brightness values of 2.3 nit, 2.4 nit, and 2.6 nit were compressed to 0.9 nit in the compressed image. However, in the tone-mapped image, these pixels have brightness values of 2.0 nit, 2.2 nit, and 2.4 nit, respectively. Similarly, in the original image, several pixels with brightness values of 2.8 nit and 3.0 nit were compressed to 1.0 nit in the compressed image. However, in the tone-mapped image, these pixels have brightness values of 2.7 nit and 3.0 nit, respectively.
[0283] As shown in Table 2, the brightness of the tone-mapped image is closer to that of the original image. The contrast of the tone-mapped image across different brightness levels is also closer to that of the original image.
[0284] S705. Electronic device 100 displays a tone-mapped image.
[0285] The electronic device 100 can display a tone-mapped image. The dynamic range of the brightness of the tone-mapped image is greater than the dynamic range of the brightness of the compressed image, but less than or equal to the dynamic range of the brightness of the HDR image (i.e., the original image).
[0286] The display method provided in this application embodiment allows the electronic device 100 to obtain compression information of an image when displaying it. Based on the correspondence between the dynamic range of the image's brightness and the compression ratio in the compression information, the electronic device 100 determines the correspondence between the image's dynamic range and the display screen's brightness capability. Then, the electronic device 100 can perform tone mapping on the image based on this correspondence, restoring the high dynamic range areas of the image. This increases the contrast and detail of the high dynamic range areas (i.e., the bright areas in the image) of the displayed image, while reducing brightness saturation.
[0287] For example, such as Figure 9 As shown, electronic device 100 adopts Figure 7 The image 901 is displayed using the shown display method. The shooting environment and content of image 901 are both related to... Figure 2B The image shown is identical to image 210. Compared to image 210, the contrast of the light and wall portions in the highlight area 9011 of image 901 is increased, while the color saturation of the light is reduced. In other words, when the electronic device 100 displays the original image according to existing technology, the displayed image effect is the same as that shown in image 210. Figure 2B As shown in Figure 210, the electronic device 100 displays the original image according to the display method provided in this embodiment, and the displayed image effect is as shown in Figure 901. The image displayed according to the display method provided in this embodiment can improve the contrast of the highlighted areas and reduce the saturation of the highlighted areas. This results in a more realistic image and improves the user experience.
[0288] In one possible implementation, when taking a picture, the electronic device 100 can infer the ambient light level based on the light source information in the shooting environment. For example, if the electronic device 100 detects that the current light is strong, it can infer that the ambient light level is high. Alternatively, if the electronic device 100 can infer that the ambient light level is high based on the fact that the picture was taken during the day, it can infer that the corresponding shooting environment has high light level. When displaying the picture, the electronic device 100 can enhance the highlighted areas and the saturation of the picture.
[0289] In one possible implementation, the electronic device 100 may not include an ambient light sensor. The electronic device 100 can determine the type of light source in the current environment based on the image captured by the camera. Then, the electronic device 100 can determine the current ambient brightness based on the light source type. For example, if the electronic device 100 determines the light source type to be an incandescent bulb based on the image captured by the camera, the ambient brightness of an incandescent bulb is generally around 500 lux, given that the light source characteristics of incandescent bulbs are relatively fixed. Therefore, the electronic device 100 can infer that the current ambient brightness is 500 lux based on the light source type being an incandescent bulb.
[0290] In one possible implementation, when displaying an image, the electronic device 100 adjusts the image saturation based on the ambient light level of the shooting environment. For example, in one possible implementation, the electronic device 100 can determine the color saturation of the image in the viewing environment based on the ambient light level of the shooting environment, the image saturation in the shooting environment, and the brightness of the viewing environment. This ensures that the image saturation appears consistent in both the shooting and viewing environments.
[0291] In one possible implementation, when displaying an image, the electronic device 100 can perform enhancement, tone mapping, or color processing on different regions based on relevant information in the image's metadata, such as outlines, faces, and blue skies. For example, if the image contains a face and a blue sky, the electronic device 100 can enhance the blue sky portion by increasing its color saturation, while leaving the face unprocessed to preserve facial details and make it appear more realistic.
[0292] In one possible implementation, when displaying an image, the electronic device 100 can determine the brightness adjustment of the noisy area based on noise information in the image's metadata, as well as one or more factors such as the viewing environment, screen size, user viewing distance, and user's age. For example, if the image contains a lot of noise, the screen displaying the image is large, the viewing environment is dark, the user's viewing distance is close, and the user is a young person or child with good vision, then the electronic device 100 can lower the brightness of the noisy area in the image to a brightness threshold of 1. If the image contains a lot of noise, the screen displaying the image is small, the viewing environment is bright, the user's viewing distance is far, and the user is an elderly person with poor vision, then the electronic device 100 can lower the brightness of the noisy area in the image to a brightness threshold of 2. The brightness threshold of 2 is greater than the brightness threshold of 1. This application embodiment does not limit the specific values of the brightness thresholds 1 and 2.
[0293] In this embodiment, when displaying an image, the electronic device 100 can execute steps S401-S405 as described above, or it can execute only steps S701-S705. The electronic device 100 can also execute steps S401-S405 and S701-S705 simultaneously. That is, after determining the brightness of each pixel in the SDR portion of the image according to steps S401-S405, the electronic device 100 performs tone mapping on the image according to steps S701-S705 to determine the brightness of the HDR portion of the image. Then, when displaying the image on the screen, the electronic device 100 can set the brightness of the SDR portion and the HDR portion of the image based on the determined brightness of the SDR portion and the HDR portion.
[0294] In one possible implementation, when the image to be displayed is an SDR image, the electronic device 100 can display the SDR image according to steps S401-S405. When the image to be displayed is an HDR image, the electronic device 100 can display the HDR image according to steps S701-S705, or simultaneously execute steps S401-S405 and S701-S705.
[0295] In this embodiment of the application, the electronic device 100 can perform tone mapping on other parameters of the image according to steps S701-S705, such as color saturation, color value of the highlighted area, or color value of the face area in the image, color value of the blue sky area in the image, etc., so that the image displayed by the electronic device 100 has better image quality.
[0296] Understandable, Figure 7 The illustrated display method can also be applied to video. The electronic device 100 compresses HDR image frames contained in the video to obtain compressed image frames and image frame compression information. The image frame compression information includes the correspondence between the dynamic range and compression ratio in the compressed image frame. When the electronic device 100 displays the HDR image frame in the video, the electronic device 100 can acquire the compressed image frame and image frame compression information. Based on the image frame compression information, the electronic device 100 can obtain the correspondence between the display brightness and the dynamic range of the HDR image frame. Based on the correspondence between the display brightness and the dynamic range of the HDR image frame, the electronic device 100 performs tone mapping on the compressed image frame to obtain a tone-mapped image frame. The brightness at the maximum high dynamic range in the tone-mapped image frame is the maximum brightness supported by the display screen. The electronic device 100 can display the tone-mapped image frame when displaying the video.
[0297] Figure 10An exemplary embodiment of the present application provides a camera display system 1000. For example... Figure 10 As shown, the image capture and display system 1000 may include an image capture device 1001 and a display device 1002. Wherein:
[0298] The shooting device 1001 may include a camera. The shooting device 1001 can capture images with the camera and save the images and their metadata information.
[0299] Display device 1002 may include a display screen. Display device 1002 can display images sent by imaging device 1001 on the display screen.
[0300] In one possible implementation, the display device 1002 can also be used to determine the brightness of the pixels with a grayscale value of the first grayscale level in the image displayed on the screen under the viewing environment, based on the illuminance of the shooting environment, the brightness of the pixels with a grayscale value of the first grayscale level in the image displayed on the screen under the shooting environment, and the current viewing environment brightness. For details on how the display device 1002 determines the brightness of the pixels with a grayscale value of the first grayscale level in the image displayed on the screen under the viewing environment based on the illuminance of the shooting environment, the pixels with a grayscale value of the first grayscale level in the image displayed on the screen under the shooting environment, and the current viewing environment brightness, please refer to the description in step S403 above, which will not be repeated here.
[0301] In one possible implementation, the display device 1002 can also obtain the correspondence between the display brightness capability of the screen and the dynamic range of the image captured by the imaging device 1001 based on the corresponding compression information of the image. Then, the electronic device 100 performs tone mapping on the compressed image based on the correspondence between the display brightness capability of the screen and the dynamic range of the image to obtain a tone-mapped image. Finally, the display device 1002 can also display the tone-mapped image. For details, please refer to the descriptions in steps S701-S705 above; they will not be repeated here.
[0302] The image display system 1000 can implement any of the possible methods executed by the aforementioned electronic device 100.
[0303] The shooting device 1001 can be a device with shooting capabilities, such as a camera, mobile phone, tablet, laptop, watch, or other device with a camera. The display device 1002 can be a device with display capabilities, such as a mobile phone, tablet, laptop, watch, or other device with a display screen.
[0304] In some examples, the capturing device 1001 can capture images and display the captured images. The capturing device 1001 can also send the captured images to other devices, such as display device 1002.
[0305] In some instances, the display device 1002 also has a camera function, capable of capturing and displaying images. The display device 1002 can also receive images from other devices (e.g., camera device 1001) and display the received images.
[0306] This application embodiment does not limit the shooting device 1001 and the display device 1002.
[0307] In this embodiment, the first image can be image 1. The first brightness can be brightness 1, the second brightness can be brightness 2, the third brightness can be brightness 3, and the fourth brightness can be brightness 4. The first scene can be scene 1, and the second scene can be scene 2. The first ambient illuminance can be ambient illuminance 1, and the second ambient illuminance can be ambient illuminance 2.
[0308] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0309] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0310] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0311] 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. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. An electronic device, characterized in that, The electronic device includes a camera assembly, a display screen, a memory, and a processor, wherein the camera assembly, the display screen, and the memory are respectively coupled to the processor, wherein: The camera component is used to capture the first image; The memory is used to store the first image, the shooting environment illuminance, and the first brightness. The shooting environment illuminance is the ambient illuminance when the first image was taken, and the first brightness is the brightness value of the first gray level pixel of the first image under the shooting environment illuminance. The processor is configured to, when the electronic device displays the first image in the first scene, obtain the first ambient illuminance of the first scene, input the shooting ambient illuminance, the first brightness and the first ambient illuminance into the first model, obtain the second brightness output by the first model, the second brightness being the brightness value of the first gray level pixel in the first image under the first ambient illuminance, and map the brightness value of the first gray level pixel in the first image to the second brightness. The display screen is used to display the first image in the first scene, and the brightness value of the first grayscale pixel of the first image is the second brightness.
2. The electronic device according to claim 1, characterized in that, The processor is also used for: Based on the second brightness, the brightness value of the pixel at the second gray level of the first image is determined to be the third brightness.
3. The electronic device according to claim 2, characterized in that, The electronic device further includes an ambient light sensor, which is coupled to the processor, and the ambient light sensor is used for: The ambient light level of the shooting environment was collected when the first image was taken; When the electronic device displays the first image, the first ambient illuminance is collected.
4. The electronic device according to any one of claims 1-3, characterized in that, The processor is configured to, when the electronic device displays the first image in the second scene, obtain the second ambient illuminance of the second scene, and determine a fourth illuminance based on the shooting ambient illuminance, the first illuminance, and the second ambient illuminance. The fourth illuminance is the illuminance value of the first grayscale pixel of the first image under the second ambient illuminance, and map the illuminance value of the first grayscale pixel of the first image to the fourth illuminance. The display screen is used to display the first image in the second scene, and the brightness value of the first grayscale pixel of the first image is the fourth brightness.
5. The electronic device according to claim 4, characterized in that, If the second ambient illuminance is less than the first ambient illuminance, the fourth brightness is less than the second brightness; If the second ambient illuminance is greater than the first ambient illuminance, the fourth brightness is greater than the second brightness; If the second ambient illuminance is equal to the first ambient illuminance, then the fourth luminance is equal to the second luminance.
6. An electronic device, characterized in that, The electronic device includes a camera assembly, a display screen, a memory, and a processor, wherein the camera assembly, the display screen, and the memory are respectively coupled to the processor, wherein: The camera component is used to capture high dynamic range images and compress the high dynamic range region in the high dynamic range images to obtain a compressed image and compression information. The compression information includes the correspondence between the dynamic range and the compression ratio in the compressed image. The memory is used to store the compressed image and the compression information. The compression information stored in the memory can be in any of the following forms: a table, an image, or an extended field in the metadata information of the high dynamic range image. The processor is configured to, when the electronic device displays the compressed image, acquire the compressed image and the compression information, obtain the correspondence between the display brightness and the dynamic range of the high dynamic range image based on the compression information, perform tone mapping on the compressed image based on the correspondence between the display brightness and the dynamic range of the high dynamic range image, and obtain a tone-mapped image, wherein the brightness at the maximum value of the high dynamic range in the tone-mapped image is the maximum brightness supported by the display screen. The display screen is used to display the image after tone mapping.
7. The electronic device according to claim 6, characterized in that, The processor is used for: Based on the compression information, the dynamic range in the high dynamic range image is determined; The correspondence between the dynamic range in the high dynamic range image and the brightness of the display screen is determined, wherein the brightness of the maximum value of the high dynamic range in the high dynamic range image is set as the maximum brightness of the display screen.
8. The electronic device according to claim 7, characterized in that, The first multiple is the ratio of the maximum dynamic range of the compressed image to the maximum standard dynamic range; the second multiple is the ratio of the maximum high dynamic range of the high dynamic range image to the maximum standard dynamic range; and the third multiple is the ratio of the maximum dynamic range of the tone-mapped image to the maximum standard dynamic range. The first multiple is less than the second multiple, and the third multiple is greater than the first multiple and less than or equal to the second multiple.
9. A display method, characterized in that, Applied to electronic devices, the method includes: Take a first image and save the first image, the shooting environment illuminance, and the first brightness. The shooting environment illuminance is the ambient illuminance when the first image is taken, and the first brightness is the brightness value of the first gray level pixel of the first image under the shooting environment illuminance. When the first image is displayed in the first scene, the first ambient illuminance of the first scene is obtained; The shooting environment illuminance, the first brightness, and the first environment illuminance are input into the first model to obtain the second brightness output by the first model. The second brightness is the brightness value of the first gray level pixel of the first image under the first environment illuminance. Map the brightness value of the first grayscale pixel in the first image to the second brightness; The first image is displayed in the first scene, and the brightness value of the first grayscale pixel of the first image is the second brightness.
10. The method according to claim 9, characterized in that, When displaying the first image in the first scene, the method further includes: Based on the second brightness, the brightness value of the pixel at the second gray level of the first image is determined to be the third brightness.
11. The method according to claim 10, characterized in that, The method further includes: When the electronic device displays the first image in the second scene, it obtains the second ambient illuminance of the second scene; Based on the shooting environment illuminance, the first brightness, and the second environment illuminance, a fourth brightness is determined, wherein the fourth brightness is the brightness value of the first grayscale pixel of the first image under the second environment illuminance. Map the brightness value of the first grayscale pixel in the first image to the fourth brightness; The first image is displayed in the second scene, and the brightness value of the first grayscale pixel of the first image is the fourth brightness.
12. The method according to claim 11, characterized in that, If the second ambient illuminance is less than the first ambient illuminance, the fourth brightness is less than the second brightness; If the second ambient illuminance is greater than the first ambient illuminance, the fourth brightness is greater than the second brightness; If the second ambient illuminance is equal to the first ambient illuminance, then the fourth luminance is equal to the second luminance.
13. A display method, characterized in that, Applied to electronic devices, the method includes: Capture a high dynamic range image and compress the high dynamic range region in the high dynamic range image to obtain a compressed image and compression information. The compression information includes the correspondence between the dynamic range and the compression ratio in the compressed image. The compressed image and the compression information are stored, and the storage format of the compression information includes any of the following: table, image, or extended fields in the metadata information of the high dynamic range image; When the electronic device displays the compressed image, the compressed image and the compression information are acquired; Based on the compressed information, the correspondence between the display screen brightness and the dynamic range of the high dynamic range image is obtained; Based on the correspondence between the display brightness and the dynamic range of the high dynamic range image, tone mapping is performed on the compressed image to obtain a tone-mapped image. The brightness at the maximum value of the high dynamic range in the tone-mapped image is the maximum brightness supported by the display. Display the image after the tone mapping.
14. The method according to claim 13, characterized in that, The step of obtaining the correspondence between the display screen brightness and the dynamic range of the high dynamic range image based on the compressed information includes: Based on the compression information, the dynamic range in the high dynamic range image is determined; The correspondence between the dynamic range in the high dynamic range image and the brightness of the display screen is determined, wherein the brightness of the maximum value of the high dynamic range in the high dynamic range image is set as the maximum brightness of the display screen.
15. The method according to claim 14, characterized in that, The first multiple is the ratio of the maximum dynamic range of the compressed image to the maximum standard dynamic range; the second multiple is the ratio of the maximum high dynamic range of the high dynamic range image to the maximum standard dynamic range; and the third multiple is the ratio of the maximum dynamic range of the tone-mapped image to the maximum standard dynamic range. The first multiple is less than the second multiple, and the third multiple is greater than the first multiple and less than or equal to the second multiple.
16. A camera display system, characterized in that, The shooting and display system includes a shooting device and a display device, wherein: The imaging device is used to capture the first image. The system stores the first image, the ambient illuminance at which the image was taken, and the first brightness. The ambient illuminance is the ambient illuminance at the time the first image was taken, and the first brightness is the brightness value of a pixel at the first grayscale level of the first image. The first image, the ambient light level of the shooting environment, and the first brightness are sent to the display device; The display device is used to receive the first image, the shooting environment illuminance, and the first brightness. When displaying the first image in the first scene, it obtains the first ambient illuminance, which is the ambient illuminance of the first scene. It inputs the shooting environment illuminance, the first brightness, and the first ambient illuminance into a first model to obtain a second brightness output by the first model. The second brightness is the brightness value of a pixel at a first gray level of the first image under the first ambient illuminance. It maps the brightness value of the pixel at the first gray level of the first image to the second brightness. The first image is then displayed in the first scene, and the brightness value of the pixel at the first gray level of the first image is the second brightness.
17. The system according to claim 16, characterized in that, The display device is used for: When displaying the first image, the brightness value of the pixels of the second grayscale of the first image is determined to be the third brightness based on the second brightness.
18. The system according to claim 17, characterized in that, The display device is used for: When the first image is displayed in the second scene, the second ambient illuminance of the second scene is obtained; Based on the shooting environment illuminance, the first brightness, and the second environment illuminance, a fourth brightness is determined, wherein the fourth brightness is the brightness value of the first grayscale pixel of the first image under the second environment illuminance. Map the brightness value of the first grayscale pixel in the first image to the fourth brightness; The first image is displayed in the second scene, and the brightness value of the first grayscale pixel of the first image is the fourth brightness.
19. The system according to claim 18, characterized in that, The shooting device is used to capture high dynamic range images, compress the high dynamic range region in the high dynamic range images to obtain compressed images and compression information. The compression information includes the correspondence between the dynamic range and the compression ratio in the compressed images. The device stores the compressed images and the compression information and sends the compressed images and the compression information to the display device. The display device is used to receive the compressed image and the compression information. When displaying the compressed image, based on the compression information, a correspondence between the display screen brightness and the dynamic range of the high dynamic range image is obtained. Based on the correspondence between the display screen brightness and the dynamic range of the high dynamic range image, tone mapping is performed on the compressed image to obtain a tone-mapped image. The brightness at the maximum high dynamic range value in the tone-mapped image is the maximum brightness supported by the display screen. The tone-mapped image is then displayed.
20. The system according to claim 19, characterized in that, The first multiple is the ratio of the maximum dynamic range of the compressed image to the maximum standard dynamic range; the second multiple is the ratio of the maximum high dynamic range of the high dynamic range image to the maximum standard dynamic range; and the third multiple is the ratio of the maximum dynamic range of the tone-mapped image to the maximum standard dynamic range. The first multiple is less than the second multiple, and the third multiple is greater than the first multiple and less than or equal to the second multiple.
21. An electronic device, characterized in that, The electronic device includes a camera assembly, a display screen, a memory, and a processor, wherein the camera assembly, the display screen, and the memory are respectively coupled to the processor, wherein: The camera component is used to capture a first video, the first video including a first image frame; The memory is used to store the first image frame, the first shooting environment illuminance, and the first brightness. The first shooting environment illuminance is the ambient illuminance when the first image frame is captured, and the first brightness is the brightness value of the first gray level pixel of the first image frame under the shooting environment illuminance. The processor is configured to, when the electronic device displays the first image frame in the first scene, obtain the first ambient illuminance of the first scene, input the first shooting ambient illuminance, the first brightness and the first ambient illuminance into the first model, obtain the second brightness output by the first model, wherein the second brightness is the brightness value of the first gray level pixel in the first image frame under the first ambient illuminance, and map the brightness value of the first gray level pixel in the first image frame to the second brightness. The display screen is used to display the first image frame in the first scene, and the brightness value of the first grayscale pixel of the first image frame is the second brightness.
22. The electronic device according to claim 21, characterized in that, The processor is also used for: Based on the second brightness, the brightness value of the pixel at the second gray level of the first image frame is determined to be the third brightness.
23. The electronic device according to claim 21, characterized in that, The processor is configured to, when the electronic device displays the first image frame in the second scene, acquire the second ambient illuminance of the second scene, and determine a fourth illuminance based on the shooting ambient illuminance, the first illuminance, and the second ambient illuminance. The fourth illuminance is the illuminance value of the first grayscale pixel of the first image frame under the second ambient illuminance, and map the illuminance value of the first grayscale pixel of the first image frame to the fourth illuminance. The display screen is used to display the first image frame in the second scene, and the brightness value of the first grayscale pixel of the first image frame is the fourth brightness.
24. The electronic device according to any one of claims 21-23, characterized in that, The first video includes a second image frame; The memory is used to store the second image frame, the second shooting environment illuminance, and the fifth brightness. The second shooting environment illuminance is the ambient illuminance when the second image frame is captured, and the fifth brightness is the brightness value of the first gray level pixel of the second image frame under the second shooting environment illuminance. The processor is configured to, when the electronic device displays the second image frame in the first scene, acquire the first ambient illuminance of the first scene, determine the sixth illuminance based on the second shooting ambient illuminance, the fifth illuminance and the first ambient illuminance, wherein the sixth illuminance is the illuminance value of the first gray level pixel of the second image frame under the first ambient illuminance, and map the illuminance value of the first gray level pixel of the second image frame to the sixth illuminance. The display screen is used to display the second image frame in the first scene, and the brightness value of the first grayscale pixel of the second image frame is the sixth brightness.
25. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 9-15.
26. A computer program product, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 9-15.