Image display method and electronic device

By determining the highlight area of ​​the image and adjusting the backlight brightness of the display screen, the problem of insufficient dynamic range of image display in the prior art is solved, and better brightness comparison and image display effect are achieved.

WO2025044350A1PCT designated stage expired Publication Date: 2025-03-06HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/096441
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-11
Filing Date
2024-05-30
Publication Date
2025-03-06

AI Technical Summary

Technical Problem

Existing monitors cannot fully restore the real-world high dynamic range, resulting in insufficient dynamic range of image display.

Method used

By determining the highlight area of ​​the image to be displayed and the backlight brightness information of the display screen, adjusting the backlight brightness of the display screen, and displaying the processed image on the display screen, thereby enhancing the dynamic range of the image display.

Benefits of technology

It improves the dynamic range of image display, enhances the brightness comparison between highlighted areas and non-highlighted areas, and improves the display effect of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024096441_06032025_PF_FP_ABST
    Figure CN2024096441_06032025_PF_FP_ABST
Patent Text Reader

Abstract

An image display method and an electronic device, which are used for improving the dynamic range of image display. The method comprises: after determining a first image to be displayed, an electronic device determining a highlighted region of the first image and backlight brightness information of a display screen (194) on the basis of image content or a histogram of the first image, reducing the brightness of a non-highlighted region on the first image, and keeping the brightness of the highlighted region unchanged, so as to obtain a second image; and on the basis of the backlight brightness information, adjusting the backlight brightness of the display screen (194), and then displaying the second image on the display screen (194).
Need to check novelty before this filing date? Find Prior Art

Description

Image display method and electronic device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on August 29, 2023, with application number 202311114974.8 and application name “A method for displaying an image and an electronic device”, the entire contents of which are incorporated by reference into this application; this application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on September 11, 2023, with application number 202311174552.X and application name “A method for displaying an image and an electronic device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of terminal technology, and in particular to an image display method and electronic device. Background Art

[0004] The dynamic range of the human eye is very large (10 -6 ~10 -8 ), allowing users to experience the real-world High-Dynamic Range (HDR). Compared to the human eye, displays can only display a narrower range of brightness, so they cannot fully reproduce the real-world High Dynamic Range. Therefore, improving the dynamic range of image display is a problem that needs to be studied.

[0005] Summary of the Invention

[0006] An image display method and electronic device provided by the embodiments of the present application are helpful in improving the dynamic range of image display.

[0007] In a first aspect, an image display method is provided for use in an electronic device. The method comprises: determining a first image to be displayed; determining, based on the image content or a histogram of the first image, a highlight region of the first image and backlight brightness information of the display screen, wherein the highlight region is an area of ​​the first image having a brightness value greater than a first threshold; reducing the brightness of non-highlight regions of the first image while maintaining the brightness of highlight regions, to obtain a second image, wherein the non-highlight regions are regions of the first image other than the highlight regions; adjusting the backlight brightness of the display screen based on the backlight brightness information; and displaying the second image on the display screen.

[0008] In an embodiment of the present application, before displaying an image, the mobile phone first darkens the non-highlighted areas of the image (for example, by reducing the grayscale value of the pixels in the non-highlighted areas), while maintaining the brightness of the highlighted areas (i.e., the grayscale value of the pixels in the highlighted areas remains unchanged), to obtain a new image. The backlight brightness of the display is then adjusted based on the backlight brightness information, and the new image is displayed on the display with the adjusted backlight brightness. Due to the effect of the display backlight brightness, when the display displays the new image, the highlighted areas of the new image appear brighter, and the display backlight brightness can compensate for the dimming of the non-highlighted areas, preventing the non-highlighted areas from being too dark. Therefore, the brightness contrast between the highlighted and non-highlighted areas is enhanced, thereby improving the dynamic range of the image display.

[0009] In one possible design, determining a highlighted area of ​​the first image based on the image content of the first image includes: judging whether the first image contains a preset object based on the image content of the first image; if so, determining that the area on the first image where the preset object is located is a highlighted area.

[0010] In an embodiment of the present application, the electronic device can determine the highlight area on the image by image semantic recognition, for example, the area where the light source is located on the image is a highlight area. In this way, before displaying the image, the mobile phone first darkens the area where the non-light source is located on the image (for example, reduces the grayscale value of the pixel points in the area where the non-light source is located), and the brightness of the area where the light source is located remains unchanged to obtain a new image. Then, according to the backlight brightness information, the backlight brightness of the display screen is adjusted, and the new image is displayed on the display screen after the backlight brightness is adjusted. Due to the effect of the backlight brightness of the display screen, when the display screen displays a new image, the area where the light source is located on the new image is brighter, and the backlight brightness of the display screen can compensate for the darkening of the area where the non-light source is located, so that the area where the non-light source is located is not too dark, so the brightness contrast between the area where the light source is located and the area where the non-light source is located is enhanced, that is, the dynamic range of the image display is improved.

[0011] In one possible design, determining a highlight area of ​​the first image based on the image content of the first image includes: running a first algorithm model with the first image as an input parameter to obtain a highlight map of the first image; the first algorithm model is used to adjust the pixel values ​​of pixels in the area where the preset object is located on the first image to a first pixel value, and adjust the pixel values ​​of pixels in other areas to a second pixel value when recognizing that the first image contains a preset object, to obtain the highlight map, the first pixel value being lower than the second pixel value; and determining the highlight area of ​​the first image based on the highlight map.

[0012] In an embodiment of the present application, the electronic device can determine the highlight area on the image through the highlight map. This method is relatively convenient and efficient, that is, the highlight area can be determined at a faster speed.

[0013] In one possible design, determining the highlighted area of ​​the first image based on the highlighted map includes: determining a first pixel point on the highlighted map whose pixel value is the first pixel value; determining a second pixel point on the first image based on the first pixel point, the position of the second pixel point on the first image being the same as the position of the first pixel point on the highlighted map; and determining the area where the second pixel point is located as the highlighted area.

[0014] In the embodiment of the present application, the electronic device can determine the highlight area on the image through the highlight map, which is highly efficient.

[0015] In one possible design, determining a highlight area of ​​the first image based on a histogram of the first image includes: dividing the first image into N areas, determining a local histogram of each of the N areas, where N is a positive integer; determining M areas among the N areas based on the local histograms, where M is a positive integer less than or equal to N, and each of the M areas satisfies: an average pixel value higher than a second threshold, and / or the number of pixels with pixel values ​​higher than the second threshold exceeds a preset number; and determining the M areas as the highlight areas.

[0016] In an embodiment of the present application, the electronic device may determine the highlight area of ​​the first image based on the histogram of the first image. The highlight area determined in this manner is relatively accurate.

[0017] In one possible design, before determining the M areas as the highlight areas, it also includes: determining K areas among the M areas based on the global histogram of the first image, where K is a positive integer less than or equal to M, wherein each of the K areas satisfies: the ratio of S1 to S2 is higher than the first ratio, S1 is the number of pixel points in each area whose pixel values ​​are higher than the second threshold, and S2 is the number of all pixel points on the first image whose pixel values ​​are higher than the second threshold; determining the M areas as the highlight areas includes: determining the K areas as the highlight areas of the first image.

[0018] In an embodiment of the present application, the electronic device may determine a highlight area of ​​the first image based on a global histogram and a local histogram of the first image, thereby improving the accuracy of the determined highlight area.

[0019] In one possible design, the first image is a high dynamic range image, and the value of the second threshold is a first value; the first image is a low dynamic range image, and the value of the second threshold is a second value, and the first value is lower than the second value.

[0020] In the embodiment of the present application, considering that the brightness differences of objects in low dynamic range images are not obvious, a larger second threshold value is required to more accurately determine the highlight area. However, in high dynamic range images, due to the large brightness differences across the image and the generally dark background, the second threshold value does not need to be larger to determine the highlight area. In this way, highlight areas in various images can be more accurately determined.

[0021] In one possible design, the first image is a high dynamic range image, and the first ratio is a third value; the first image is a low dynamic range image, and the first ratio is a fourth value, and the third value is lower than the fourth value.

[0022] In the embodiment of the present application, the first ratio is set to a lower value, considering that the number of pixels in the highlight area (e.g., the area where the light source is located) of a high dynamic range image is relatively small, for example, accounting for 5%-10% of the total number of pixels in the entire image; while the number of pixels in the highlight area (e.g., the area where clouds or snow are located) of a low dynamic range image is relatively large, for example, accounting for 50%-60% of the total number of pixels in the entire image, so the first ratio is set to a higher value. In this way, the highlight areas in various images can be determined more accurately.

[0023] In one possible design, the backlight brightness information of the display screen is determined based on the image content of the first image, including: determining the environment in which the first image is located based on the image content of the first image; and determining the backlight brightness information based on the environment.

[0024] In an embodiment of the present application, the electronic device determines the backlight brightness information of the display screen based on the image content of the first image. The backlight brightness information determined in this way is more consistent with the environment in which the image is located.

[0025] In one possible design, the backlight brightness information includes a backlight brightening multiple; when the environment is outdoors or during the day, the backlight brightening multiple is determined to be a first multiple; when the environment is indoors or at night, the backlight brightening multiple is determined to be a second multiple, and the first multiple is higher than the second multiple.

[0026] In the embodiment of the present application, considering that if the image is in a dark environment, since the details on the image are not clear, if the brightness of the non-highlight area is reduced too much, more details will be lost. Therefore, the brightness of the non-highlight area is reduced less, and the corresponding backlight brightening factor can be smaller. If an image is in a daytime environment, since there are more details on the image, the details are not easily lost if the brightness of the non-highlight area is reduced more. Therefore, the brightness of the non-highlight area is reduced less, and the corresponding backlight brightening factor can be larger. Therefore, if an image is in the dark, the corresponding backlight brightening factor is low, and if an image is in the daytime, the corresponding backlight brightening factor is high.

[0027] In one possible design, the backlight brightness information of the display screen is determined based on the histogram of the first image, including: determining a second ratio of the number of pixels on the first image whose pixel values ​​are lower than a third threshold to the total number of pixels on the first image based on the global histogram of the first image, and determining the backlight brightness information based on the second ratio; or determining a third ratio of the number of pixels on the first image whose pixel values ​​are higher than a fourth threshold to the total number of pixels on the first image based on the global histogram of the first image, and determining the backlight brightness information based on the third ratio.

[0028] In an embodiment of the present application, the electronic device can determine the backlight brightness information of the display screen based on the histogram of the first image. The backlight brightness information determined in this way is relatively accurate.

[0029] In a possible design, before reducing the brightness of the non-highlight area on the first image, it also includes: determining a pixel change value Δ based on the backlight brightness information; and subtracting the pixel change value Δ from the pixel value of each pixel point in the non-highlight area.

[0030] In the embodiments of the present application, the electronic device reduces the brightness of the non-highlighted area of ​​the image by reducing the pixel values ​​of the pixels in the non-highlighted area. After reducing the brightness of the non-highlighted area, the electronic device compensates by adjusting the backlight brightness of the display screen to avoid the non-highlighted area being too low in brightness when the image is displayed on the display screen, affecting the user experience.

[0031] In one possible design, determining the pixel change value Δ based on the backlight brightness information includes: determining the pixel value corresponding to the backlight brightness information as the target pixel value based on the backlight brightness information and the correspondence between the backlight brightness information and the pixel value, and the difference between the target pixel value and the current pixel value of each pixel point in the non-highlight area is the pixel change value Δ.

[0032] In a possible design, before determining the highlight area of ​​the first image and the backlight brightness information of the display screen based on the image content of the first image, it also includes: determining that the first image is a third-party image, and the third-party image is not an image taken locally by the electronic device.

[0033] In an embodiment of the present application, considering that when an electronic device uses a local camera to capture an image, the parameters used when capturing the image will be stored, such as exposure information, aperture value, flash, lens focal length, depth of field, and shutter times. These parameters form Exif information and are stored in the electronic device. Therefore, for locally captured images, the electronic device can determine the highlight area and backlight brightness information of the image based on the Exif information of the image. For third-party images, since they are not captured locally, there is no Exif information corresponding to the third-party images in the mobile phone, so for third-party images, the highlight area and backlight brightness information are determined by image content or histogram. Therefore, the technical solution provided in the embodiment of the present application can be applied to third-party images, that is, when displaying third-party images using the image display method provided in the embodiment of the present application, the dynamic range can be improved.

[0034] In one possible design, determining that the first image is a third-party image includes: reading a flag in a first file, and determining that the first image is a third-party image based on the flag; wherein the first file is a file obtained when the electronic device stores the first image in a first image format, and the flag is used to indicate that the first image is a third-party image or a locally captured image.

[0035] Taking the JPEG format as an example, in an embodiment of the present application, after the electronic device stores an image in the JPEG format as a file, the file includes a flag. The flag is used to indicate whether the image is a locally captured image or a third-party image. Therefore, through the flag, the electronic device can determine whether an image is a locally captured image or a third-party image, which is relatively convenient.

[0036] In one possible design, before determining the highlight area of ​​the first image and the backlight brightness information of the display screen based on the image content of the first image or the histogram of the first image, it also includes: determining that the first image is a photographic image based on the image content of the first image, and the photographic image refers to an image that includes at least one of scenery, people and animals.

[0037] In an embodiment of the present application, considering that users have low aesthetic requirements for non-photographic images (for example, WeChat chat screenshots), the image display method provided in the embodiment of the present application is not used for non-photographic images. For photographic images, the image display method provided in the embodiment of the present application can be used to prompt the dynamic range.

[0038] In one possible design, the method further includes: when it is determined based on image content of the first image that the first image is not a photographic image, displaying the first image on the display screen.

[0039] In an embodiment of the present application, considering that users have low aesthetic requirements for non-photographic images (for example, WeChat chat screenshots), if an image to be displayed is a non-photographic image, the image is displayed directly without executing the image display method provided in the embodiment of the present application.

[0040] In one possible design, the method further includes: storing a highlight map of the first image and the backlight brightness information.

[0041] In an embodiment of the present application, after the electronic device determines the highlight map and backlight brightness information of the first image, it can store the highlight map and backlight brightness information. The next time it detects that the user wants to open the first image, it only needs to read the highlight map and backlight brightness information. There is no need to determine the highlight area and backlight brightness information based on the image content and / or histogram of the first image, which is more efficient.

[0042] In one possible design, the method further includes: in response to a first operation, canceling the display of the second image on the display screen; when receiving an operation for opening the first image again, reading the highlight map and the backlight brightness information; determining the highlight area on the first image based on the highlight map; reducing the brightness of the non-highlight area on the first image, while keeping the brightness of the highlight area unchanged, to obtain a third image, wherein the non-highlight area is other areas other than the highlight area on the first image; adjusting the backlight brightness of the display screen based on the backlight brightness information; and displaying the third image on the display screen.

[0043] In an embodiment of the present application, after the electronic device determines the highlight map and backlight brightness information of the first image, it can store the highlight map and backlight brightness information. The next time it detects that the user wants to open the first image, it only needs to read the highlight map and backlight brightness information. There is no need to determine the highlight area and backlight brightness information based on the image content and / or histogram of the first image, which is more efficient.

[0044] In one possible design, before determining the highlight area of ​​the first image and the backlight brightness information of the display screen based on the image content of the first image or the histogram of the first image, it also includes: determining that the highlight map of the first image and the backlight brightness information do not exist in the electronic device; the highlight map is a grayscale map of the first image and the pixel points on the grayscale map whose pixel values ​​are within a first preset range correspond to the pixel points in the highlight area on the first image.

[0045] In an embodiment of the present application, after the electronic device determines the first image to be displayed, it can first determine whether a highlight map and backlight brightness information are stored. If not, the highlight area and backlight brightness information are determined based on the image content and / or histogram of the first image. If so, the highlight map and backlight brightness information are read, which is more efficient.

[0046] In a second aspect, an electronic device is further provided, including:

[0047] a processor, a memory, and one or more programs;

[0048] The one or more programs are stored in the memory, and the one or more programs include instructions. When the instructions are executed by the processor, the electronic device executes the method steps provided in the first aspect above.

[0049] In a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program. When the computer program is run on a computer, the computer is caused to execute the method according to the first aspect.

[0050] In a fourth aspect, a computer program product is provided, comprising a computer program, which, when executed on a computer, enables the computer to execute the method described in the first aspect.

[0051] In the fifth aspect, a chip is also provided, which is coupled to a memory in an electronic device and is used to call a computer program stored in the memory and execute the technical solution of the first aspect of the embodiment of the present application. In the embodiment of the present application, "coupling" refers to the direct or indirect combination of two components with each other.

[0052] For the technical effects that can be achieved in the above-mentioned second to fifth aspects, please refer to the description of the technical effects that can be achieved by the corresponding design scheme in the above-mentioned first aspect, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] FIG1A is a schematic diagram of the hardware structure of an electronic device provided in one embodiment of the present application;

[0054] FIG1B is a schematic diagram of a software structure of an electronic device provided in an embodiment of the present application;

[0055] FIG2 is a schematic diagram of a flow chart of an image display method and an electronic device provided in one embodiment of the present application;

[0056] FIG3 is a schematic diagram of a mobile phone display interface provided in an embodiment of the present application;

[0057] FIG4 is a schematic diagram of a first image and a highlighted map provided by an embodiment of the present application;

[0058] FIG5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] Below, some terms used in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.

[0060] The at least one involved in the embodiments of the present application includes one or more; wherein, more than one means greater than or equal to two. In addition, it should be understood that, in the description of this specification, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as expressing or implying relative importance, nor can they be understood as expressing or implying order. For example, the first moment and the second moment do not represent the importance of the two or the order of the two, but are only for distinguishing the description. In the embodiments of the present application, "and / or" is only a description of the association relationship, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects related to each other are in an "or" relationship.

[0061] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the specification. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0062] As used in this specification, the terms “when” or “after” may be interpreted to mean “if” or “after” or “in response to determining that” or “in response to detecting that”, depending on the context. Similarly, the phrases “upon determining that” or “if (stated condition or event) is detected” may be interpreted to mean “if it is determined that” or “in response to determining that” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.

[0063] The image display method provided in the embodiment of the present application is applicable to electronic devices. The electronic device may have a display screen. For example, the electronic device may be a portable electronic device such as a mobile phone, a tablet computer, a laptop computer, or a wearable device such as a watch or a bracelet, or a virtual reality (VR) device, an augmented reality (AR) device, a mixed reality (MR) device, etc. In short, the embodiment of the present application does not limit the specific type of electronic device. For the convenience of description, this article mainly takes the electronic device as an example.

[0064] FIG1A is a schematic diagram showing the hardware structure of an electronic device. The electronic device may be, for example, a mobile phone. As shown in FIG1A , the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0065] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The controller may serve as the nerve center and command center of the electronic device. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. The processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. This memory may store instructions or data that have just been used or are being recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces the processor 110's waiting time, and thus improves system efficiency.

[0066] Among them, the processor 110 can execute the process of the image display method provided in the embodiment of the present application. For example, the processor 110 can determine the first image to be displayed, and can also determine whether the first image is a third-party image. The third-party image is not a locally captured image, for example, it may include an image received from other devices (for example, a mobile phone) through the wireless communication module 160 or an image downloaded from the Internet or a local screenshot image of an electronic device, etc. After the processor 110 determines that the first image to be displayed is a third-party image, it determines the highlight area of ​​the first image and the backlight brightness information of the display screen 194 based on the image content and / or histogram of the first image. Then, the processor 110 reduces the brightness of the non-highlight area on the first image, and the brightness of the highlight area remains unchanged to obtain a second image. Moreover, the processor 110 adjusts the backlight brightness of the display screen 194 according to the backlight brightness information, and displays the second image through the display screen 194. Thus, when the second image is displayed on display screen 194, the highlighted areas of the second image appear brighter due to the brightness of the display screen backlight. Furthermore, the brightness of the display screen backlight compensates for the dimming of the non-highlighted areas, preventing the non-highlighted areas from being too dark. Consequently, the brightness contrast between the highlighted and non-highlighted areas is enhanced, thereby improving the dynamic range of the image display. The specific implementation process will be described later.

[0067] In some embodiments, the processor 110 may include one or more interfaces. The 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.

[0068] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C busses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device.

[0069] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0070] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, thereby enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0071] 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 communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0072] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the electronic device's camera function. The processor 110 and the display 194 communicate via the DSI interface to implement the electronic device's display function.

[0073] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0074] USB port 130 is an interface that complies with USB standards and may be a Mini USB port, a Micro USB port, a USB Type-C port, or the like. USB port 130 can be used to connect a charger to charge an electronic device, transfer data between the electronic device and peripherals, connect headphones to play audio, and connect other electronic devices, such as augmented reality devices.

[0075] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only for illustrative purposes and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0076] The wireless communication function of the electronic device can be implemented using antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, a modem processor, and a baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antenna can be used in conjunction with a tuning switch.

[0077] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied in electronic devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0078] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0079] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150 , and antenna 2 is coupled to wireless communication module 160 , so that the electronic device can communicate with the network and other devices through wireless communication technology.

[0080] Display screen 194 is used to display an application interface, etc. Display screen 194 includes a display panel. In some embodiments, the electronic device may include one or more display screens 194. In embodiments of the present application, the backlight brightness of display screen 194 is adjustable, for example, based on backlight brightness information. Assuming that the backlight brightness information is a backlight brightening factor, such as x1, x2, etc., the greater the backlight brightening factor, the greater the backlight brightness.

[0081] The electronic device can realize the shooting function through the ISP, camera 193, video codec, GPU, display 194 and application processor, etc. Among them, the ISP is used to process the data fed back by the camera 193.

[0082] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and the software code of at least one application, etc. The data storage area can store data (such as images, videos, etc.) generated during the use of the electronic device. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash memory, etc.

[0083] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as pictures and videos can be stored on the external memory card.

[0084] The electronic device can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0085] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0086] Speaker 170A, also called a "horn," is used to convert audio electrical signals into sound signals. An electronic device can listen to music or make hands-free calls or other external speaker scenarios through one or more speakers 170A.

[0087] The receiver 170B, also called a "handset", may be one or more and is used to convert audio electrical signals into sound signals. When the electronic device receives a call or voice message, the voice can be heard by placing the receiver 170B close to the human ear.

[0088] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0089] The headphone jack 170D is used to connect a wired headphone.

[0090] The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .

[0091] The gyro sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the gyro sensor 180B can be used to determine the angular velocity of the electronic device around three axes (i.e., the x, y, and z axes). The gyro sensor 180B can also be used for anti-shake photography.

[0092] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0093] The magnetic sensor 180D includes a Hall sensor. For example, the electronic device can use the magnetic sensor 180D to detect the opening and closing of a flip leather case.

[0094] The acceleration sensor 180E can detect the magnitude of the electronic device's acceleration in various directions (generally three axes) and the magnitude and direction of gravity when the electronic device is stationary.

[0095] The distance sensor 180F is used to measure distance. The electronic device can measure distance using infrared or laser.

[0096] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device emits infrared light through the light emitting diode. The electronic device uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device.

[0097] The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness.

[0098] The fingerprint sensor 180H is used to collect fingerprints.

[0099] The temperature sensor 180J is used to detect temperature.

[0100] The touch sensor 180K, also known as a "touch panel," can be mounted on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch screen." The touch sensor 180K is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event.

[0101] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone mass in a human vocal part.

[0102] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device may receive button inputs and generate key signal inputs related to the user settings and function control of the electronic device. The motor 191 may generate vibration prompts. The motor 191 may be used for incoming call vibration prompts or for touch vibration feedback. The indicator 192 may be an indicator light that may be used to indicate the charging status, power level changes, messages, missed calls, notifications, and the like. The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into or removed from the SIM card interface 195 to connect to or disconnect from the electronic device.

[0103] It is understood that the components shown in FIG1A do not constitute a specific limitation on the electronic device. The electronic device in the embodiments of the present application may include more or fewer components than those shown in FIG1A. In addition, the combination / connection relationship between the components in FIG1A can also be adjusted and modified.

[0104] FIG1B is a schematic diagram of the software structure of an electronic device provided in an embodiment of the present application. The electronic device may be, for example, a mobile phone. As shown in FIG1B , the software structure of the electronic device may be a layered structure, wherein the layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through software interfaces. The layered architecture may be, for example, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application is based on a layered architecture. The system is used as an example to illustrate the software structure of the electronic device. In some embodiments, The system is divided into five layers, from top to bottom: application layer, application framework layer, Android runtime and system library, kernel layer and hardware layer.

[0105] The application layer may include a series of application packages. As shown in FIG1B , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.

[0106] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. As shown in Figure 1B, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and so on. The window manager manages window programs. It can obtain the display screen size, determine whether there is a status bar, lock the screen, take screenshots, and so on. The content provider stores and retrieves data and makes this data accessible to applications. This data may include video, images, audio, dialed and received calls, browsing history and bookmarks, and the phone book. The view system includes visual controls, such as controls for displaying text and images. The view system can be used to build applications. The display interface can be composed of one or more views. For example, the display interface including a text message notification icon may include a view for displaying text and a view for displaying images. The telephony manager provides communication functions for the electronic device, such as managing call status (including connected and hung up). The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on. The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0107] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and management of the Android system. The core library consists of two parts: one for Java-based functions and the other for the Android core library. The application layer and the application framework layer run in the virtual machine. The virtual machine executes Java files from the application layer and application framework layer as binary files. The virtual machine performs functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection. The system library includes multiple functional modules, such as the surface manager, media libraries, 3D graphics libraries (such as OpenGL ES), and 2D graphics engines (such as SGL). The surface manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of various common audio and video formats, as well as still image files. The media library supports a variety of audio and video codecs, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing. The 2D graphics engine is a drawing engine for 2D drawing.

[0108] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0109] The hardware layer includes various hardware, such as Wi-Fi transceivers, cameras, displays, etc.

[0110] It is understood that the software structure shown in FIG1B does not constitute a specific limitation on the software structure of an electronic device. The software structure of the electronic device in the embodiments of the present application may include more or fewer modules than shown in FIG1B , for example, more or fewer layers than shown in FIG1B , or a layer may include more or fewer modules than shown in FIG1B , etc. In addition, the combination / connection relationship between the modules in FIG1B can also be adjusted and modified.

[0111] In Figure 1B, the application framework layer or system library can be used to execute the process of the image display method provided in the embodiment of the present application. Here, the application framework layer is mainly used as an example. When the touch sensor in the hardware layer (i.e., the touch sensor 180K in Figure 1A) receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into an input event (including touch coordinates, timestamp of the touch operation, and other information). The application framework layer obtains the input event from the kernel layer, identifies the object corresponding to the input event (such as a control, icon, etc.), and distributes the input event to the corresponding application. Taking the touch operation as a touch click operation, and the object corresponding to the click operation is a thumbnail in the gallery application (see Figure 3 below) as an example, the input event is distributed to the gallery application in the application layer. The gallery application calls the interface of the application framework layer, so that the application framework layer determines whether the first image (the image corresponding to the clicked thumbnail) is a third-party image. If it is a third-party image, the highlight area of ​​the first image and the backlight brightness information of the display screen are determined based on the image content and / or histogram of the first image. After the application framework layer determines the highlighted area, it reduces the brightness of the non-highlighted area on the first image, and keeps the brightness of the highlighted area unchanged, thereby obtaining a second image. In addition, the application framework layer also calls the display screen in the hardware layer (i.e., display screen 194 in FIG1A ), and adjusts the backlight brightness of the display screen according to the backlight brightness information, and then displays the second image through the display screen. In this way, when the display screen displays the second image, due to the effect of the display screen backlight brightness, the highlighted area on the second image is brighter, and the display screen backlight brightness compensates for the darkening of the non-highlighted area, so that the non-highlighted area is not too dark, so the brightness contrast between the highlighted area and the non-highlighted area is enhanced, that is, the dynamic range of the image display is improved.

[0112] The following takes a mobile phone as an example and describes the image display method provided by the embodiment of the present application in conjunction with the accompanying drawings.

[0113] Please refer to Figure 2, which is a flow chart of an image display method provided in one embodiment of the present application. The method can be executed by a mobile phone, which can have the hardware structure of Figure 1A and / or the software structure of Figure 1B. As shown in Figure 2, the method includes:

[0114] S200, acquiring an image.

[0115] Mobile phones can capture images in many ways, such as by capturing them with a local camera, downloading them from the internet, receiving them from other devices, or taking screenshots. This article refers to images not captured by a local camera as third-party images. For example, images downloaded from the internet, received from other devices, or taken through screenshots are all considered third-party images.

[0116] It should be understood that after obtaining an image, the mobile phone can store the image in the mobile phone's gallery application. Generally, the mobile phone will store the image as a file in a certain image format, such as the Joint Photographic Experts Group (JPEG) format or the Portable Network Graphics (PNG) format. Taking the JPEG format as an example, after the mobile phone stores the image as a file in the JPEG format, the file extension is .jpeg or .jpg.

[0117] Continuing with the JPEG format as an example, in an embodiment of the present application, after the mobile phone stores the image as a file in JPEG format, the file includes a flag. The flag is used to indicate whether the image is a locally captured image or a third-party image. The flag can be represented in binary, such as 00 or 01. When the flag is 00, it represents that the image is a third-party image, and when the flag is 01, it represents that the image is a locally captured image. One possible implementation method is that after the mobile phone takes an image through a local camera, the image is stored as a file in JPEG format, and the flag in the file is set to 01 to indicate that the image is a locally captured image. After the mobile phone downloads an image (i.e., a third-party image) from the Internet, receives it from other devices, or takes a screenshot, it stores the image as a file in JPEG format, and sets the flag in the file to 00 to indicate that the image is a third-party image.

[0118] The embodiment of the present application does not limit the specific position of the flag bit in the file in JPEG format. It is understandable that, based on the JPEG standard, the file in JPEG format includes multiple markers (markers), a marker can be understood as a field, and each marker is composed of 2 or more bytes. For example, the file in JPEG format includes at least an SOI marker and an EOI marker, the SOI marker is used to indicate the beginning of the image, and the EOI marker is used to indicate the end of the image. In the embodiment of the present application, the flag bit can be located in any marker (or field) in the file in JPEG format. For example, there are reserved markers (reserved markers) in the file in JPEG format, and the flag bit can be stored in the reserved markers. Assuming that the reserved markers include multiple fields such as 0xFF02-0xFFBF, the flag bit can be stored in a field in 0xFF02-0xFFBF.

[0119] S201: Receive a first operation, where the first operation is used to open a first image.

[0120] For example, referring to Figure 3, a mobile phone displays the interface of a gallery application, which includes multiple thumbnails. Thumbnails can be understood as reduced versions of images stored in the gallery application. Taking Figure 3 as an example, the mobile phone receives a first operation, which may be a click operation on a thumbnail. For example, the first operation is a click operation on thumbnail 301, that is, the first operation is used to open the image corresponding to thumbnail 301 (i.e., the first image).

[0121] S202: Determine whether the first image is a third-party image or a locally captured image. If the first image is a third-party image, execute S203; if the first image is a locally captured image, execute S206.

[0122] As previously mentioned, mobile phones store images in JPEG format as files. These files include a flag indicating whether the image is a third-party image or a locally captured image. Therefore, after the mobile phone determines the first image to be displayed, it reads the flag from the file corresponding to the first image to be displayed. If the flag is 01, the first image is determined to be a locally captured image. If the flag is 00, the first image is determined to be a third-party image.

[0123] Optionally, S202 may or may not be executed, so S202 is indicated by a dotted line in Figure 2. If S202 is not executed, after the mobile phone determines the first image to be displayed, S203 is executed regardless of whether the first image is a third-party image or a locally captured image.

[0124] S203: Determine whether the first image is a photographic image or a non-photographic image based on its image content. If it is a photographic image, execute S204; if it is a non-photographic image, display the first image.

[0125] For example, the mobile phone determines that the image content of the first image includes text, avatars, emoticons, TV series, movie scenes, or short video scenes, and determines that the first image belongs to a non-photographic scene. The mobile phone determines that the image content of the first image includes scenery (green plants, sea water, sky, buildings, etc.), people, animals, etc., and determines that the first image belongs to a photographic scene. In this embodiment of the present application, for non-photographic images, the mobile phone can directly display the image without executing subsequent steps.

[0126] Optionally, the mobile phone may include an algorithm model that can identify whether an image is photographic or non-photographic. For example, the algorithm model's input parameter is an image, and its output parameter is either 1 or 0. When the output parameter is 1, it indicates that the input image is photographic, and when the output parameter is 0, it indicates that the input image is non-photographic. One possible implementation involves the mobile phone running the algorithm model with an image as input. The algorithm model accesses a database containing a large number of non-photographic and photographic images. The algorithm module then compares the input image's features with those in the database. If the input image matches features of non-photographic images in the database, the algorithm outputs 0, indicating non-photographic classification; if the input image matches features of photographic images in the database, the algorithm outputs 1, indicating photographic classification. Exemplarily, matching features of the input image with non-photographic images in the database may include: if the non-photographic images in the database include features such as text, emoticons, subtitles, or avatars, and if the input image includes at least one of these features, then the input image is determined to match features of non-photographic images in the database. Similarly, the feature matching between the input image and the photographic images in the database may include: the photographic images in the database include features such as green plants, sky, buildings, sea water, desert, people, animals, etc. If the input image includes at least one of these features, it is determined that the input image matches the features of the photographic images in the database.

[0127] Optionally, S203 may be executed or not, which is not limited in the embodiment of the present application, so S203 is represented by a dotted line in FIG2 .

[0128] S204, determining whether the mobile phone has the highlight map and backlight brightness information of the first image, if yes, executing S205a, otherwise executing S205b.

[0129] One possible implementation is to take a first image stored in JPEG format as a first file (with a file extension of .jpeg or .jpg) as an example. The mobile phone can query the first file to see whether the highlight map information (storage path, image size, etc.) and backlight brightness information of the first image are present. As previously mentioned, the JPEG file (i.e., the first file) includes multiple markers. The highlight map information (storage path, image size, etc.) and backlight brightness information can be located in any one or more of the multiple markers. For example, the JPEG file contains reserved markers, and the highlight map information and backlight brightness information can be located in the reserved markers. Assuming that the reserved markers include multiple fields such as 0xFF02-0xFFBF, the highlight map information and backlight brightness information can be located in a field between 0xFF02-0xFFBF, such as stored in 0xFF08. Optionally, the highlight map information, backlight brightness information and flag (used to indicate whether the first image is a third-party image or a locally captured image) of the first image may be located in the same mark or different marks, which is not limited in the embodiment of the present application.

[0130] The highlight map of the first image can be understood as a grayscale image of the first image. Some pixels in the grayscale image have relatively high pixel values ​​(e.g., RGB values), such as those in the range of 230-255, and appear white or nearly white. Other pixels have relatively low pixel values ​​(e.g., RGB values), such as those in the range of 0-30, and appear black or nearly black. The pixels in the grayscale image correspond one-to-one with the pixels in the first image. For example, pixels with relatively high pixel values ​​(e.g., those in the range of 230-255) in the grayscale image correspond to pixels in the highlight region of the first image. In other words, the positions of pixels with relatively high pixel values ​​(e.g., those in the range of 230-255) in the grayscale image are the same as the positions of pixels in the highlight region of the first image. For example, see Figure 4 (a), which shows a schematic diagram of the first image, and Figure 4 (b), which shows a schematic diagram of the highlight map of the first image. The first image in FIG4 (a) includes a light source. In the highlighted map of the first image in FIG4 (b), the pixels in the area where the light source is located are white or nearly white, and the pixels in other areas are black or nearly black. Taking the first image in FIG4 (a) as an example, the process by which the mobile phone obtains the highlighted map of the first image shown in FIG4 (b) may include: the mobile phone uses the first image as an input parameter to run algorithm model A, algorithm model A recognizes objects in the first image through image semantic recognition, and recognizes that the first image includes a light source. Algorithm model A adjusts the pixel values ​​of the pixels in the area where the light source is located on the first image to a first pixel value, which may be, for example, any value in the range of 230-255, and adjusts the pixel values ​​of the pixels in other areas to a second pixel value, which may be, for example, any value in the range of 0-30, to obtain the highlighted map of the first image, as shown in FIG4 (b). Therefore, the area where the light source is located in the highlighted map of the first image appears white or close to white (because the pixel value is adjusted to any value in the range of 230-255), and the other areas appear black or close to black (because the pixel value is adjusted to any value in the range of 0-30).

[0131] Backlight brightness information is used to indicate the backlight brightness of the display. Backlight brightness information can be a backlight brightening factor or a backlight brightness value. Backlight brightening factors include 1x (expressed as x1), 2x (expressed as x2), and so on. It should be understood that the larger the backlight brightening factor, the higher the backlight brightness of the display. The backlight brightness value is different from the backlight brightening factor. The backlight brightness value refers to the specific value of the backlight brightness of the display. This article mainly uses the backlight brightness information as the backlight brightening factor as an example.

[0132] Optionally, S204 may or may not be executed, so S204 is indicated by a dotted line in FIG2 . Furthermore, the present embodiment does not limit the execution order of S202, S203, and S204. For example, S204 may be executed before S203, or before S202. It should be noted that if S204 is executed before S202, then after S204 is executed, S205a or S205b may be executed directly without executing S202 and S203.

[0133] S205a: Determine a highlight area on the first image according to the highlight map of the first image.

[0134] Optionally, if the mobile phone searches for information (storage path, image size, etc.) of the highlighted map of the first image in the first file in S204, the highlighted map of the first image is read according to the storage path. After the mobile phone reads the highlighted map of the first image, it can determine the highlighted area on the first image based on the highlighted map. For example, the mobile phone determines a first pixel point (one or more pixel points) on the highlighted map whose pixel value is within a first preset range (for example, within the range of 230-255), and based on the first pixel point, determines a corresponding second pixel point (including one or more pixel points) on the first image. The position of the first pixel point on the highlighted map is the same as the position of the second pixel point on the first image, and the area where the second pixel point is located on the first image is the highlighted area.

[0135] S205b: Determine the highlight area and backlight brightness information of the first image according to the image content of the first image and / or the histogram of the first image.

[0136] Mode A: determining the highlight area and backlight brightness information of the first image according to the image content of the first image.

[0137] (1) The mobile phone determines a highlight area of ​​the first image based on the image content of the first image.

[0138] In an embodiment of the present application, the mobile phone can identify objects contained in the first image through image semantic recognition and determine a highlight area of ​​the first image based on the recognition result. For example, when the mobile phone recognizes that the first image includes a light source, the area where the light source is located is determined to be a highlight area. For example, when the mobile phone recognizes that the first image includes clouds, the area where the clouds are located is determined to be a highlight area.

[0139] One possible approach is for the mobile phone to determine whether the first image includes a preset object using an image semantic recognition method. If so, the area within the first image where the preset object is located is determined to be a highlighted area. The preset object may be the sun, moon, streetlight, cloud, snowy landscape, wall, etc. Optionally, the preset object may be pre-stored in the mobile phone at the factory.

[0140] Optionally, the mobile phone may include an algorithm model A, which is used to determine a highlight map of the image based on the image content. For example, the input parameter of algorithm model A is an image, and the output parameter is a highlight map. For details about the highlight map, please refer to the description above. Taking the first image shown in (a) of FIG. 4 as an example, the mobile phone uses the first image as an input parameter to run algorithm model A. Algorithm model A recognizes the first image through image semantic recognition and identifies that the first image includes a preset object (e.g., a street lamp). Therefore, algorithm model A adjusts the pixel values ​​of the pixels in the area where the street lamp is located on the first image to a first pixel value, which can be, for example, any value in the range of 230-255, and adjusts the pixel values ​​of the pixels in other areas to a second pixel value, which can be, for example, any value in the range of 0-30, to obtain a highlight map of the first image, as shown in (b) of FIG. 4. After the mobile phone obtains the highlight map of the first image through algorithm model A, it can determine the highlighted area on the first image based on the highlight map. For details, please refer to S205a above.

[0141] Another possible approach is to refine the preset objects into a first preset object and a second preset object. For example, the first preset object includes the sun, moon, streetlight, etc. The second preset object includes clouds, snow scenes, walls, etc. The mobile phone can first determine whether the first image is a high dynamic range image or a low dynamic range image. For example, the mobile phone can use the minMaxLoc function to find the brightest and darkest pixels in the first image, and then determine whether the brightness difference between the brightest and darkest pixels exceeds a preset brightness difference. If so, the first image is determined to be a high dynamic range image; otherwise, the first image is determined to be a low dynamic range image. Optionally, the preset brightness difference can be pre-set. If the first image is a high dynamic range image, the mobile phone uses image semantic recognition methods to determine whether the first preset object is included in the first image. If so, the area in the first image containing the first preset object is determined to be a highlight area. If the first image is a low dynamic range image, the mobile phone uses image semantic recognition methods to determine whether the first image contains the second preset object. If so, the area in the first image containing the second preset object is determined to be a highlight area.

[0142] Optionally, the mobile phone may include two algorithm models, for example, algorithm model B and algorithm model C. The input parameter of algorithm model B is a high dynamic range image, and the output parameter is a highlight map. The input parameter of algorithm model C is a low dynamic range image, and the output parameter is a highlight map. Therefore, after the mobile phone determines the first image to be displayed, it can first determine whether the first image is a high dynamic range image or a low dynamic range image. If the first image is a high dynamic range image, it is calculated by algorithm model B. If the first image is a low dynamic range image, it is calculated by algorithm model C. Among them, the calculation principles of algorithm model B and algorithm model C are the same as those of algorithm model A in the previous article. The only difference is that algorithm model A uses a preset object, algorithm model B uses the first preset object, and algorithm model C uses the second preset object. Taking algorithm model B as an example, when the mobile phone determines that the first image is a high dynamic range image, it uses the first image as an input parameter to run algorithm model B. Algorithm model B uses an image semantic recognition algorithm to identify the first image. Assuming that the first image includes a first preset object (e.g., a street lamp), algorithm model B adjusts the pixel values ​​of the pixels in the area where the street lamp is located on the first image to a first pixel value (e.g., any value in the range of 230-255) and adjusts the pixel values ​​of the pixels in other areas to a second pixel value (e.g., any value in the range of 0-30), thereby obtaining a highlight map of the first image. After the mobile phone obtains the highlight map of the first image through algorithm model B, it determines the highlight area on the first image based on the highlight map of the first image. For details, please refer to S205a above.

[0143] Optionally, after the mobile phone obtains the highlighted map of the first image, it can store the highlighted map. The next time the mobile phone detects that the user wants to open the first image, it determines through S204 that the highlighted map of the first image is stored in the mobile phone, reads the highlighted map of the first image, and then determines the highlighted area of ​​the first image based on the highlighted map (i.e., S205a). There is no need to determine the highlighted area of ​​the first image based on the image content and / or histogram. For example, after the mobile phone stores the highlighted map of the first image in the memory, it can write the storage path, image size, and other information of the highlighted map into the JPEG format file of the first image. For example, the JPEG format file includes multiple markers, and the information of the highlighted map (storage path, image size, etc.) can be located in any of the multiple markers. For example, the information of the highlighted map can be located in reserved markers.

[0144] (2) The mobile phone determines backlight brightness information based on the image content of the first image.

[0145] In an embodiment of the present application, the mobile phone can identify the environment of the first image through image semantic recognition and determine the backlight brightness information based on the recognition result. The environment of the first image refers to the shooting environment reflected by the first image, such as indoors, outdoors, daytime, nighttime, etc.

[0146] As mentioned above, the backlight brightness information can be a backlight brightening multiple or a backlight brightness value. Taking the backlight brightness information as the backlight brightening multiple as an example, if the mobile phone recognizes that the environment in which the first image is located is daytime and / or indoors, it determines that the backlight brightening multiple is multiple A; if the mobile phone recognizes that the environment in which the first image is located is nighttime and / or outdoors, it determines that the backlight brightening multiple is multiple B. Multiple A is higher than multiple B, for example, multiple A is 4 times, and multiple B is 3 times. One possible implementation method is that the mobile phone can include an algorithm model D. The input parameter of the algorithm model D is an image, and the output parameter is the backlight brightening multiple. Taking the first image shown in (a) of Figure 4 as an example, the mobile phone uses the first image as an input parameter to run algorithm model D. Algorithm model D identifies the environment of the first image through image semantic recognition, and different environments are represented by different environmental parameters. For example, if the environment is daytime, the corresponding environmental parameter is 00, if the environment is nighttime, the corresponding environmental parameter is 11, if the environment is indoors, the corresponding environmental parameter is 01, and if the environment is outdoor, the corresponding environmental parameter is 10. After determining the environmental parameters of the first image, algorithm model D determines the backlight brightening multiple corresponding to the environmental parameters of the first image based on the pre-stored correspondence between the environmental parameters and the backlight brightening multiple, and outputs the backlight brightening multiple.

[0147] Of course, the image environment can be further subdivided. For example, night can be subdivided into late night, evening, etc. If the mobile phone recognizes that the first image is in evening, the backlight brightening factor is determined to be factor C. If the first image is in late night, the backlight brightening factor is determined to be factor D. Factor C is higher than factor D.

[0148] Optionally, in an embodiment of the present application, after the mobile phone determines the backlight brightness information, it can store the backlight brightness information. The next time the mobile phone detects that the user wants to open the first image, it determines through S204 that the backlight brightness information is stored in the mobile phone, and then reads the backlight brightness information. There is no need to determine the backlight brightness information based on the image content and / or histogram of the first image. Optionally, the mobile phone can store the backlight brightness information in a JPEG format file corresponding to the first image. For example, the JPEG format file includes multiple markers, and the backlight brightness information can be in any of the multiple markers. For example, there are reserved markers in the JPEG format file, and the backlight brightness information can be stored in the reserved markers.

[0149] Mode B: determining the highlight area and backlight brightness information of the first image according to the histogram of the first image.

[0150] To facilitate understanding, let's first briefly explain histograms. A histogram counts the number of pixels in an image for each pixel value between 0 and 255. For example, we count the number of pixels with a value of 0 and the number of pixels with a value of 255. The resulting count is then plotted in a coordinate system to form a histogram. The horizontal axis of the coordinate system represents the pixel value, and the vertical axis represents the number of pixels. For example, if there are 100 pixels with a value of 255 in an image, we would plot a point in the coordinate system with a horizontal coordinate of 255 and a vertical coordinate of 100. Histograms include global histograms and local histograms. The difference is that global histograms count the entire image, while local histograms divide the image into multiple regions and count each region separately. Suppose an image is divided into 6x6 regions. We count the number of pixels in the first row and first column for each pixel value between 0 and 255. We also count the number of pixels in the first row and second column for each pixel value between 0 and 255, and so on.

[0151] (1) The mobile phone determines a highlight area of ​​the first image according to a histogram of the first image.

[0152] For example, the mobile phone divides the first image into N areas, where N is a positive integer, and the specific value of N can be set in advance. The mobile phone counts the number of pixels of each pixel value in the range of 0-255 in each of the N areas to obtain a local histogram of the first image. Based on the local histogram, the mobile phone determines M areas in the N areas, where M is a positive integer less than or equal to N, and each of the M areas satisfies: the average pixel value is higher than a threshold value 1 (for example, 230), and / or the number of pixels with a pixel value higher than the threshold value 1 exceeds a preset number W1, for example, at least half of the pixels in each area have a pixel value higher than the threshold value 1 (for example, 230). After the mobile phone determines the M areas, it can determine that the M areas are highlight areas of the first image.

[0153] Optionally, in different situations, the value of the above-mentioned threshold 1 may be different. For example, the mobile phone can determine whether the first image is a high dynamic range image or a low dynamic range image. If it is a high dynamic range image, the value of threshold 1 is X1, and if it is a low dynamic range image, the value of threshold 1 is X2, and X1 can be lower than X2. This is because the brightness difference of objects in low dynamic range images is not obvious, so only when the value of threshold 1 is larger can the highlight area be determined more accurately. However, due to the large brightness difference on the high dynamic range image, the background is generally darker, so the threshold 1 does not need to be large to determine the highlight area. Optionally, the mobile phone can use the minMaxLoc function to find the brightest pixel and the darkest pixel on the first image, and then determine whether the brightness difference between the brightest pixel and the darkest pixel is higher than the preset brightness difference. If so, the first image is determined to be a high dynamic range image; otherwise, the first image is determined to be a low dynamic range image.

[0154] Another possible way is that after the mobile phone determines M areas, it can determine K areas in the M areas according to the global histogram, where K is a positive integer less than or equal to M, and determine the K areas as highlight areas. Among them, one possible way for the mobile phone to determine K areas in the M areas according to the global histogram is to perform the following process for each area in the M areas: 1. Determine the number of pixels in the area whose pixel values ​​are higher than the threshold 1 as S1. 2. The mobile phone determines the total number of pixels in the entire image of the first image whose pixel values ​​are higher than the threshold 1 as S2 according to the global histogram. 3. Determine whether S1 / S2 is higher than the threshold 2 (for example, 5%). If so, determine that this area meets the conditions; otherwise, determine that this area does not meet the conditions. The above process is performed once for each area in the M areas, and K areas that meet the conditions are determined in the M areas.

[0155] Optionally, the value of the threshold 2 can be different in different situations. For example, the mobile phone can determine whether the first image is a high dynamic range image or a low dynamic range image. If it is a high dynamic range image, the value of threshold 2 is X3, and if it is a low dynamic range image, the value of threshold 2 is X4. X3 can be lower than X4. For example, for high dynamic range images, threshold 2 can be a value within 5%-10%, and for low dynamic range images, threshold 2 can be a value within 50%-60%. This is because, considering that in general, the number of pixels in the highlight area (such as the area where the light source is located) of a high dynamic range image is relatively small, for example, accounting for 5%-10% of the total number of pixels in the entire image, so the value of threshold 2 is lower, while the number of pixels in the highlight area (such as the area where the cloud or snow scene is located) of a low dynamic range image is relatively large, for example, accounting for 50%-60% of the total number of pixels in the entire image, so the value of threshold 2 is higher.

[0156] Optionally, the value of threshold 2 may be related to the value of N. For example, when N is larger, that is, an image is divided into more areas and the number of pixels in each area is smaller, then S1 decreases and S1 / S2 becomes smaller (S2 is fixed), so the value of threshold 2 is smaller; conversely, when N is smaller, that is, an image is divided into fewer areas and the number of pixels in each area is larger, then S1 increases and S1 / S2 becomes larger (S2 is fixed), so the value of threshold 2 is larger.

[0157] (2) The mobile phone determines backlight brightness information based on the histogram of the first image.

[0158] For example, after the mobile phone determines the global histogram of the first image, it determines based on the global histogram that the number of pixels in the first image with pixel values ​​above a threshold of 3 (e.g., 230) exceeds a preset number W2, and / or the ratio of the number of pixels in the first image with pixel values ​​above the threshold of 3 (e.g., 230) to the total number of pixels in the first image exceeds a preset ratio P1, indicating that the first image is bright overall. The backlight brightening factor is determined to be a factor E. As described above, the backlight brightness information can be a backlight brightening factor or a backlight brightness value. Here, the backlight brightness information is taken as an example of a backlight brightening factor. For another example, the mobile phone determines based on the global histogram that the number of pixels in the first image with pixel values ​​below a threshold of 4 (e.g., 30) exceeds a preset number W3, and / or the ratio of the number of pixels in the first image with pixel values ​​below the threshold of 4 (e.g., 30) to the total number of pixels in the first image exceeds a preset ratio P2, indicating that the first image is dark overall. The backlight brightening factor is determined to be a factor F. Multiple E is higher than multiple F. Optionally, threshold 3 may be higher than threshold 4. For example, threshold 3 is any value in the range of 230-255, and threshold 4 is any value in the range of 0-30. The specific values ​​of the preset number W2, the preset number W3, the preset ratio P1, and the preset ratio P2 are not limited in this embodiment of the application.

[0159] S206 : Determine the highlight area and backlight brightness information of the first image according to the Exif information of the first image.

[0160] It should be noted that when a mobile phone uses a local camera to capture an image, it stores the parameters used when capturing the image. These parameters, such as exposure information, aperture value, flash, lens focal length, depth of field, and shutter times, form Exchangeable Image File Format (Exif) information and are stored in the mobile phone. Therefore, for locally captured images, the mobile phone can determine the image's highlight area and backlight brightness information based on the image's Exif information. For third-party images, since they are not captured locally on the mobile phone, the mobile phone does not have the corresponding Exif information for the third-party images. Therefore, for third-party images, the highlight area and backlight brightness information are determined by the image content or histogram.

[0161] Optionally, the mobile phone determines the highlight area of ​​the first image according to the Exif information of the first image by, for example, determining, according to exposure information, an area with a higher exposure intensity on the first image as the highlight area.

[0162] Optionally, the mobile phone may determine the backlight brightness information based on the Exif information of the first image by determining the backlight brightness information based on the exposure information. For example, the mobile phone may store a correspondence between the exposure information and the backlight brightness information, and the backlight brightness information may be determined based on the exposure information in the Exif information and the correspondence.

[0163] S207: Reduce the brightness of the non-highlighted area of ​​the first image and keep the brightness of the highlighted area unchanged, thereby obtaining a second image. The non-highlighted area refers to the area other than the highlighted area on the first image.

[0164] Optionally, a possible implementation of S207 is that the mobile phone reduces the grayscale value of each pixel in the non-highlight area on the first image, and keeps the grayscale value of each pixel in the highlight area unchanged, to obtain a second image. Optionally, before reducing the grayscale value of the pixel in the non-highlight area, the mobile phone may first determine how much the grayscale value is reduced, that is, the grayscale change value Δ. One possible way is that the mobile phone determines the grayscale change value Δ based on the backlight brightness information, that is, the grayscale change value Δ is related to the backlight brightness information. Taking the backlight brightness information as the backlight brightening multiple as an example, the process of the mobile phone determining the grayscale change value Δ based on the backlight brightening multiple includes: the mobile phone stores a correspondence between the backlight brightening multiple and the grayscale change value Δ, and based on the correspondence, determines the grayscale change value Δ corresponding to the backlight brightening multiple. Exemplarily, the correspondence is pre-stored in the mobile phone, and the correspondence can be, for example, the following table:

[0165] Assuming that the mobile phone determines that the backlight brightening factor of the display screen is x1, based on the above table, the grayscale value of each pixel in the non-highlight area of ​​the first image is reduced by 10. Assuming that the mobile phone determines that the backlight brightening factor of the display screen is x2, based on the above table, the grayscale value of each pixel in the non-highlight area of ​​the first image is reduced by 20.

[0166] Therefore, in an embodiment of the present application, the grayscale change value Δ of the non-highlighted area on the first image is related to the backlight brightness information (for example, the backlight brightening multiple), and the higher the backlight brightening multiple, the larger the grayscale change value Δ of the non-highlighted area. This is because, in order to make the brightness of the highlighted area on the image higher when the mobile phone displays the image, it is necessary to increase the backlight brightness of the display screen. However, after the backlight brightness of the display screen is increased, the overall brightness of the first image is increased, that is, the brightness of both the highlighted area and the non-highlighted area is increased, and the brightness contrast (that is, the dynamic range) between the highlighted area and the non-highlighted area cannot be enhanced. Therefore, in an embodiment of the present application, before displaying the image, the mobile phone first reduces the grayscale value of the pixel point in the non-highlighted area on the image, and the grayscale value of the pixel point in the highlighted area remains unchanged to obtain a new image, and then adjusts the backlight brightness of the display screen according to the backlight brightening multiple, and displays the new image on the display screen. Since the grayscale change value Δ in non-highlight areas is determined by the backlight boost factor, and the higher the backlight boost factor, the larger the grayscale change value Δ. For example, in the table above, with a backlight boost factor of x1 and a grayscale change value of 10, when the grayscale value of the non-highlight area in the image decreases by 10, the non-highlight area becomes darker. However, when the backlight boost factor is x1, the backlight brightness of the display just compensates for the dimming of the non-highlight area. Therefore, when the phone displays a new image, the non-highlight area in the new image can be restored to its original brightness. This is because, although the grayscale value of the non-highlight area in the new image decreases, causing the non-highlight area to darken, the backlight brightness of the display compensates for the dimming. Furthermore, since the grayscale value of the highlight area in the new image remains unchanged, the highlight area in the new image appears brighter due to the backlight brightness. This enhances the brightness contrast between the highlight and non-highlight areas when the new image is displayed, improving the dynamic range of the image display.

[0167] As mentioned above, when the mobile phone recognizes that the environment in which the first image is located is daytime and / or indoors, it determines that the backlight brightening multiple is multiple A; when the mobile phone recognizes that the environment in which the first image is located is nighttime and / or outdoor, it determines that the backlight brightening multiple is multiple B. Multiple A is higher than multiple B. This is because, in the embodiment of the present application, the mobile phone needs to first reduce the brightness of the non-highlighted area on the image (i.e., reduce the grayscale value of the pixels in the non-highlighted area). Since the pixel change value Δ in the non-highlighted area is positively correlated with the backlight brightening multiple, that is, the more the brightness of the non-highlighted area is reduced, the greater the backlight brightening multiple. Therefore, if an image is located in a dark environment (such as (a) in Figure 4), since the details on the image itself are unclear, if the brightness of the non-highlighted area is reduced too much, more details will be lost. Therefore, if the brightness of the non-highlighted area is reduced less (i.e., the grayscale change value Δ is smaller), the corresponding backlight brightening multiple can be smaller. If an image is taken during the day, since there are more details in the image, the brightness of the non-highlight areas will be reduced more, so the details will not be lost easily. Therefore, the brightness of the non-highlight areas will be reduced less (that is, the grayscale change value Δ is larger), and the corresponding backlight brightening factor can be larger. Therefore, if an image is taken at night, the grayscale change value Δ is small, and the corresponding backlight brightening factor is low. If an image is taken during the day, the grayscale change value Δ is large, and the corresponding backlight brightening factor is high.

[0168] Another possible implementation is that the mobile phone reduces the grayscale value of each pixel in the first image (for example, by reducing the grayscale change value Δ) to obtain a third image, and then the mobile phone splices the image blocks in the highlighted area of ​​the first image with the image blocks in the first area of ​​the third image to obtain the second image. The first area of ​​the third image is located at the same position as the non-highlighted area of ​​the first image.

[0169] S208: Adjust the backlight brightness of the display screen according to the backlight brightness information.

[0170] As mentioned above, the backlight brightness information can be a backlight brightening multiple or a backlight brightness value. Taking the backlight brightness information as an example, if the backlight brightening multiple is x2 and the current multiple of the display is x1, the backlight brightness multiple of the display will be increased to x2.

[0171] Optionally, one implementation of S208 is that the mobile phone includes a microcontroller unit (MCU), which is responsible for adjusting the brightness of the backlight of the display screen. The backlight is a light source located behind the display screen, that is, an auxiliary light-emitting device, and its lighting effect will affect the visual effect of the display screen. Regarding the backlight, this application will not go into details. The MCU can adjust the brightness of the backlight according to the backlight brightness information. Optionally, taking the process shown in Figure 2 as an example, the processor (for example, the central processing unit) in the mobile phone is executed. After the processor executes S207, it can send an instruction to the MCU, which includes the backlight brightness information. After receiving the instruction, the MCU adjusts the brightness of the backlight according to the backlight brightness information.

[0172] S209: Display the second image on the display screen.

[0173] Compared to the first image, the brightness of the highlighted areas in the second image remains unchanged, while the non-highlighted areas darken (the grayscale value decreases by Δ). Therefore, after the phone adjusts the display backlight brightness, when the second image is displayed on the screen, the display backlight brightness compensates for the darkening of the non-highlighted areas. Furthermore, since the grayscale value of the highlighted areas remains unchanged, the display backlight brightness makes the highlighted areas brighter. As a result, when the second image is displayed on the screen, the contrast between the highlighted and non-highlighted areas is enhanced, which improves the dynamic range.

[0174] Optionally, in an embodiment of the present application, a switch may be further provided in the mobile phone. When the switch is in the on state, the mobile phone uses the image display method provided in the embodiment of the present application for display, that is, the mobile phone executes the process of Figure 2. When the switch is in the off state, one way is that when the mobile phone receives an operation for opening the first image, the first image is directly displayed without executing the process of Figure 2; or, the mobile phone may also execute part of the process in Figure 2, for example, after the mobile phone receives an operation for opening the first image, it determines whether the first image is a third-party image or a locally captured image. If it is a third-party image, the first image is directly displayed; if it is a locally captured image, it is displayed using the method of S206-S209.

[0175] Figure 5 is a structural diagram of an electronic device 500 provided in an embodiment of the present application. The electronic device 500 may be the mobile phone mentioned above. As shown in Figure 5, the electronic device 500 may include: one or more processors 501; one or more memories 502; a communication interface 503, and one or more computer programs 504, and the above-mentioned devices may be connected via one or more communication buses 505. The one or more computer programs 504 are stored in the above-mentioned memory 502 and are configured to be executed by the one or more processors 501, and the one or more computer programs 504 include instructions. For example, when the electronic device 500 is the mobile phone mentioned above, the instruction can be used to execute the relevant steps of the mobile phone in the corresponding embodiment above, for example, the steps of the mobile phone in the embodiment shown in Figure 2. The communication interface 503 is used to realize communication between the electronic device 500 and other devices, for example, the communication interface may be a transceiver.

[0176] In the embodiments provided in the present application above, the method provided in the embodiment of the present application is introduced from the perspective of an electronic device (e.g., a mobile phone) as an execution subject. In order to implement the various functions in the method provided in the embodiment of the present application above, the electronic device may include a hardware structure and / or a software module to implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether a function of the above functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.

[0177] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented 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 the present invention 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 computer-readable storage medium. 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 a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)). In the absence of conflict, the solutions of the above embodiments can be used in combination.

[0178] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0179] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.

[0180] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0181] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0182] Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include these modifications and variations.

Claims

1. An image display method, characterized in that: Applied to an electronic device, the electronic device has a display screen, and the method comprises: determining a first image to be displayed; Determine, according to the image content of the first image or the histogram of the first image, a highlight area of ​​the first image and backlight brightness information of the display screen, wherein the highlight area is an area on the first image whose brightness value is greater than a first threshold; The brightness of the non-highlighted area on the first image is reduced, and the brightness of the highlighted area is kept unchanged, to obtain a second image, wherein the non-highlighted area is other area on the first image except the highlighted area; Adjusting the backlight brightness of the display screen according to the backlight brightness information; The second image is displayed on the display screen.

2. The method according to claim 1, characterized in that Determining a highlight area of ​​the first image according to image content of the first image includes: According to the image content of the first image, it is determined whether the first image contains a preset object; if so, it is determined that the area where the preset object is located on the first image is a highlighted area.

3. The method according to claim 1, characterized in that Determining a highlight area of ​​the first image according to image content of the first image includes: The first algorithm model is run with the first image as an input parameter to obtain a highlight map of the first image; the first algorithm model is used to adjust the pixel values ​​of the pixels in the area where the preset object is located on the first image to a first pixel value, and adjust the pixel values ​​of the pixels in other areas to a second pixel value when recognizing that the first image contains a preset object, to obtain the highlight map, wherein the first pixel value is lower than the second pixel value; According to the highlight map, a highlight area of ​​the first image is determined.

4. The method according to claim 3, characterized in that: Determining a highlight area of ​​the first image according to the highlight map includes: Determine a first pixel point on the highlighted map whose pixel value is the first pixel value; Determine a second pixel point on the first image according to the first pixel point, wherein a position of the second pixel point on the first image is the same as a position of the first pixel point on the highlight map; Determine the area where the second pixel point is located as the highlight area.

5. The method according to claim 1, characterized in that Determining a highlight area of ​​the first image according to a histogram of the first image includes: Dividing the first image into N regions, and determining a local histogram of each of the N regions, where N is a positive integer; According to the local histogram, M regions are determined from the N regions, where M is a positive integer less than or equal to N, and each of the M regions satisfies: an average pixel value is higher than a second threshold, and / or the number of pixel points with pixel values ​​higher than the second threshold exceeds a preset number; The M areas are determined to be the highlight areas.

6. The method according to claim 5, characterized in that Before determining the M areas as the highlighted areas, the method further includes: Determine K regions from the M regions according to a global histogram of the first image, where K is a positive integer less than or equal to M, wherein each of the K regions satisfies: a ratio of S1 to S2 is higher than a first ratio, S1 is the number of pixels in each region whose pixel values ​​are higher than the second threshold, and S2 is the number of all pixels on the first image whose pixel values ​​are higher than the second threshold; Determining the M areas as the highlighted areas includes: The K regions are determined to be highlight regions of the first image.

7. The method according to claim 5 or 6, characterized in that: The first image is a high dynamic range image, and the value of the second threshold is a first value; The first image is a low dynamic range image, the second threshold is a second value, and the first value is lower than the second value.

8. The method according to claim 6, characterized in that The first image is a high dynamic range image, and the first ratio is a third value; The first image is a low dynamic range image, the first ratio is a fourth value, and the third value is lower than the fourth value.

9. The method according to any one of claims 1 to 8, characterized in that: Determining backlight brightness information of the display screen according to image content of the first image includes: Determining an environment in which the first image is located according to image content of the first image; Backlight brightness information is determined according to the environment.

10. The method according to claim 9, characterized in that The backlight brightness information includes a backlight brightening multiple; When the environment is outdoors or during the day, determining the backlight brightening multiple to be a first multiple; When the environment is indoors or at night, the backlight brightening multiple is determined to be a second multiple, and the first multiple is higher than the second multiple.

11. The method according to any one of claims 1 to 8, characterized in that: Determining backlight brightness information of the display screen according to the histogram of the first image includes: Determine, according to a global histogram of the first image, a second ratio of the number of pixels on the first image having pixel values ​​lower than a third threshold to the total number of pixels in the first image, and determine the backlight brightness information according to the second ratio; or, A third ratio of the number of pixels on the first image having pixel values ​​higher than a fourth threshold to the total number of pixels on the first image is determined according to the global histogram of the first image, and the backlight brightness information is determined according to the third ratio.

12. The method according to any one of claims 1 to 11, characterized in that: Before reducing the brightness of the non-highlighted area on the first image, the method further includes: Determine a grayscale change value Δ according to the backlight brightness information; The grayscale value of each pixel in the non-highlight area is subtracted from the grayscale change value Δ.

13. The method according to claim 12, characterized in that The step of determining the grayscale change value Δ according to the backlight brightness information includes: The grayscale change value Δ corresponding to the backlight brightness information is determined according to the backlight brightness information and the corresponding relationship between the backlight brightness information and the grayscale change value.

14. The method according to any one of claims 1 to 13, characterized in that: Before determining the highlight area of ​​the first image and the backlight brightness information of the display screen according to the image content of the first image or the histogram of the first image, the method further includes: It is determined that the first image is a third-party image, and the third-party image is not an image taken locally by the electronic device.

15. The method according to claim 14, characterized in that Determining that the first image is a third-party image includes: Reading a flag bit in the first file, and determining, according to the flag bit, that the first image is a third-party image; The first file is a file formed by the electronic device storing the first image in a first image format, and the flag is used to indicate whether the first image is a third-party image or a locally captured image.

16. The method according to any one of claims 1 to 15, characterized in that: Before determining the highlight area of ​​the first image and the backlight brightness information of the display screen according to the image content of the first image or the histogram of the first image, the method further includes: According to the image content of the first image, it is determined that the first image is a photographic image, where the photographic image refers to an image including at least one of scenery, people and animals.

17. The method according to claim 16, characterized in that The method further comprises: When it is determined according to the image content of the first image that the first image is not a photographic image, the first image is displayed on the display screen.

18. The method according to claim 3, characterized in that The method further comprises: The highlight map of the first image and the backlight brightness information are stored.

19. The method according to claim 18, characterized in that The method further comprises: In response to a first operation, canceling display of the second image on the display screen; When receiving an operation for reopening the first image, reading the highlight map and the backlight brightness information; Determine a highlight area on the first image according to the highlight map; The brightness of the non-highlighted area on the first image is reduced, and the brightness of the highlighted area is kept unchanged, to obtain a third image, wherein the non-highlighted area is other area on the first image except the highlighted area; Adjusting the backlight brightness of the display screen according to the backlight brightness information; The third image is displayed on the display screen.

20. The method according to any one of claims 1 to 19, characterized in that: Before determining the highlight area of ​​the first image and the backlight brightness information of the display screen according to the image content of the first image or the histogram of the first image, the method further includes: Determine that the electronic device does not have a highlight map of the first image and the backlight brightness information; wherein the highlight map is a grayscale image of the first image and the pixel points on the grayscale image whose pixel values ​​are within a first preset range are in a first preset range and the highlight area on the first image The pixels inside correspond.

21. An electronic device, characterized in that: include: a processor, a memory, and one or more programs; The one or more programs are stored in the memory, and the one or more programs include instructions, which, when executed by the processor, enable the electronic device to perform the method steps as described in any one of claims 1 to 20.

22. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 20.

23. A computer program product, characterized in that The method comprises a computer program, which, when being run on a computer, causes the computer to execute the method according to any one of claims 1 to 20.

Citation Information

Patent Citations

  • Method and device for adjusting image brightness and mobile terminal

    CN104658487A

  • Liquid crystal display brightness control method, apparatus and the liquid crystal display device

    CN106409240A

  • Image display method and device, terminal and readable storage medium

    CN112164007A

  • Image display method and device, terminal and readable storage medium

    CN112348759A

  • High dynamic range video generation method and device

    CN112449120A

Cited By

  • Backlight brightness control method and system based on reinforcement learning

    CN120895004A

  • Backlight brightness control method and system based on reinforcement learning

    CN120895004B