Image display method and device, electronic equipment and storage medium
By dynamically considering the maximum brightness parameters of the screen during tone mapping, the problem of inaccurate picture brightness in the prior art is solved, and a more accurate and efficient image display effect is achieved.
Patent Information
- Application Number
- CN202311459749.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-03
- Publication Date
- 2025-05-06
AI Technical Summary
The prior art fails to effectively consider the characteristic of inconstant maximum brightness of the screen during tone mapping, resulting in inaccurate brightness of the final displayed picture.
By obtaining the maximum screen brightness parameters corresponding to each video frame, dynamic tone mapping of the image, and selecting a tone mapping relationship suitable for the maximum brightness of the current screen to ensure the accuracy of the picture brightness.
Improves the accuracy and effect of image display, ensuring accurate mapping of screen brightness when the maximum screen brightness changes.
Smart Images

Figure CN119941592A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to an image display method, device, electronic device and storage medium. Background Art
[0002] High-dynamic-range (HDR) technology is a technology introduced by multiple standard combinations and private companies. An important feature of HDR signals (video, images, etc.) is that they contain image information with relatively high brightness. However, the maximum display brightness of many electronic devices is not that high. Therefore, it is necessary to convert HDR signals into signals suitable for display by electronic devices with lower display brightness. This conversion process is called tone mapping.
[0003] For electronic devices with non-constant maximum display brightness display capabilities, the display capability of the screen's maximum display brightness will be dynamically adjusted according to the displayed content. The tone mapping method in the relevant technology does not take into account the non-constant characteristics of the screen's maximum display brightness, which results in inaccurate brightness of the final displayed image after tone mapping. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides an image display method, device, electronic device and storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an image display method.
[0006] Acquire a first image, where the first image includes brightness information, the first image is any video frame in a video, and a maximum screen brightness parameter changes with a change of the video frame;
[0007] Based on the maximum screen brightness parameter corresponding to the first image, tone mapping is performed on the first image to obtain a second image corresponding to the first image; wherein the screen brightness of the second image is the target screen brightness after the brightness information in the first image is mapped;
[0008] The second image is displayed.
[0009] In some embodiments, the performing tone mapping on the first image based on the maximum screen brightness parameter corresponding to the first image to obtain a second image corresponding to the first image includes:
[0010] Based on the maximum screen brightness parameter corresponding to the first image, selecting a target tone mapping relationship from a plurality of tone mapping relationships; wherein the tone mapping relationship is used to characterize the relationship between brightness information and picture brightness, and the maximum picture brightness mapped by the plurality of tone mapping relationships is different;
[0011] Performing tone mapping on the first image based on the target tone mapping relationship to obtain the second image.
[0012] In some embodiments, the target tone mapping relationship includes at least two first tone mapping relationships, and the step of performing tone mapping on the first image based on the target tone mapping relationship to obtain the second image includes:
[0013] Performing weighted processing on the at least two first tone mapping relationships to obtain a second tone mapping relationship;
[0014] Perform tone mapping on the first image based on the second tone mapping relationship to obtain the second image.
[0015] In some embodiments, the target tone mapping relationship includes at least two first tone mapping relationships, and the step of performing tone mapping on the first image based on the target tone mapping relationship to obtain the second image includes:
[0016] Performing tone mapping on the first image based on the at least two first tone mapping relationships respectively to obtain a third image mapped by each of the first tone mapping relationships;
[0017] The third image mapped according to the at least two first tone mapping relationships is subjected to weighted processing to obtain the second image.
[0018] In some embodiments, performing tone mapping on the first image based on the target tone mapping relationship to obtain the second image includes:
[0019] Performing tone mapping on the brightness information based on the target tone mapping relationship to obtain the target picture brightness;
[0020] The target image brightness is used as the image brightness of the first image to obtain the second image.
[0021] In some embodiments, selecting a target tone mapping relationship from a plurality of tone mapping relationships based on a maximum screen brightness parameter corresponding to the first image includes:
[0022] Determine the maximum picture brightness of each tone mapping relationship mapping;
[0023] Determine at least one first maximum picture brightness among a plurality of maximum picture brightnesses that is greater than the maximum screen brightness parameter, and at least one second maximum picture brightness among the plurality of maximum picture brightnesses that is less than the maximum screen brightness parameter;
[0024] The tone mapping relationship corresponding to the first maximum picture brightness and the tone mapping relationship corresponding to the second maximum picture brightness are determined as the target tone mapping relationship.
[0025] In some embodiments, before selecting a target tone mapping relationship from a plurality of tone mapping relationships based on the maximum screen brightness parameter corresponding to the first image, the method further includes at least one of the following:
[0026] Performing low-pass filtering on the maximum screen brightness parameter corresponding to the first image to obtain a filtered maximum screen brightness parameter;
[0027] The tone mapping relationship is subjected to low-pass filtering to obtain a filtered tone mapping relationship.
[0028] In some embodiments, the electronic device has a peak brightness function, and before tone mapping the first image based on the maximum screen brightness parameter corresponding to the first image to obtain the second image corresponding to the first image, the method further includes:
[0029] When the peak brightness function is not enabled, obtaining a real-time maximum brightness parameter of a first screen of the electronic device, and determining the first maximum brightness parameter of the screen as the maximum brightness parameter of the screen corresponding to the first image; or
[0030] When the peak brightness function is turned on, the first screen maximum brightness parameter is adjusted based on the gain parameter to obtain the second screen maximum brightness parameter, and the second screen maximum brightness parameter is determined as the screen maximum brightness parameter corresponding to the first image.
[0031] In some embodiments, before adjusting the first screen maximum brightness parameter to obtain the second screen maximum brightness parameter, the method further includes:
[0032] The gain parameter is subjected to low-pass filtering to obtain a filtered gain parameter.
[0033] In some embodiments, before performing tone mapping on the first image based on the maximum screen brightness parameter corresponding to the first image to obtain a second image corresponding to the first image, the method further includes:
[0034] Obtaining the real-time maximum brightness parameter of the third screen of the electronic device;
[0035] The difference between the third screen maximum brightness parameter and the preset value is determined as the screen maximum brightness parameter.
[0036] In some embodiments, the image data in the first image is in a nonlinear relationship with the brightness information, and before performing tone mapping on the first image based on the maximum screen brightness parameter corresponding to the first image to obtain the second image corresponding to the first image, the method further includes:
[0037] Based on a first preset function, linear transformation is performed on the image data in the first image to obtain a transformed first image, wherein the image data in the transformed first image is in a linear relationship with the brightness information.
[0038] According to a second aspect of an embodiment of the present disclosure, there is provided an image display device, the device comprising:
[0039] An image acquisition module is configured to acquire a first image, wherein the first image includes brightness information, the first image is any frame in a video, and a maximum screen brightness parameter changes with changes in the video frame;
[0040] a tone mapping module, configured to perform tone mapping on the first image based on a maximum screen brightness parameter corresponding to the first image, to obtain a second image corresponding to the first image; wherein the screen brightness of the second image is a target screen brightness after the brightness information in the first image is mapped;
[0041] The image display module is configured to display the second image.
[0042] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0043] processor;
[0044] a memory for storing processor-executable instructions;
[0045] The processor is configured to execute the method as described in the first aspect of the embodiment of the present disclosure.
[0046] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in the first aspect of the embodiment of the present disclosure.
[0047] The above method of the present disclosure has the following beneficial effects:
[0048] The method provided by the embodiment of the present disclosure obtains a first image, which is any frame of video in a video, performs tone mapping on the first image based on the maximum screen brightness parameter corresponding to the first image, obtains a second image corresponding to the first image, and displays the second image, wherein the screen brightness of the second image is the target screen brightness after the brightness information in the first image is mapped. The non-constant characteristic of the maximum brightness of the screen is taken into consideration, that is, the maximum screen brightness parameter will change with the change of the video frame during the display process. Therefore, in the tone mapping process, the maximum screen brightness parameter corresponding to each frame of the image is introduced. For any frame of the image, the image is tone mapped based on the maximum screen brightness parameter corresponding to the image, so that the brightness of the target screen after mapping is more accurate, thereby improving the display effect of the image.
[0049] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0051] Figure 1 is a flow chart of an image display method according to an exemplary embodiment;
[0052] Figure 2 is a flow chart of an image display method according to an exemplary embodiment;
[0053] Figure 3 is a schematic diagram showing a relationship between image data and brightness information according to an exemplary embodiment;
[0054] Figure 4 is a schematic diagram of a tone mapping curve according to an exemplary embodiment;
[0055] Figure 5 is a schematic diagram of a tone mapping curve according to an exemplary embodiment;
[0056] Figure 6 is a schematic diagram of a tone mapping curve according to an exemplary embodiment;
[0057] Figure 7 is a schematic diagram of a tone mapping curve according to an exemplary embodiment;
[0058] Figure 8 is a schematic diagram showing a connection relationship of a processing module according to an exemplary embodiment;
[0059] Fig. 9 is a block diagram of an image display device according to an exemplary embodiment;
[0060] Fig.10 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0061] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0062] There are many HDR formats. Taking the widely used HDR10 format as an example, the HDR signal carries the maximum content light level (MaxCLL) and the maximum average frame light level (MaxFALL) of the image. MaxCLL can accurately describe the absolute brightness information of the image in combination with the image data of the image. Therefore, according to MaxCLL and the maximum brightness that the electronic device can display, the HDR signal can be converted into a signal suitable for display by the electronic device through tone mapping processing, and the brightness of the content in the image whose absolute brightness information is lower than the maximum brightness of the electronic device can be accurately displayed.
[0063] In the related art, a simple tone mapping method is to directly discard the content in the HDR signal whose absolute brightness information exceeds the maximum brightness of the electronic device. If the absolute brightness information of the content whose absolute brightness information exceeds the maximum brightness of the screen is compressed to a range slightly lower than the maximum brightness of the screen, more bright content in the image can be displayed, but the brightness and level of this part of the content are inaccurate. There are other ways, such as extracting the high-frequency information of the content whose absolute brightness information exceeds the maximum brightness of the screen and superimposing it on the displayed image, which can display the texture information in the higher brightness image to a certain extent, but the brightness of the high-brightness content is also inaccurate at this time.
[0064] Some electronic devices with partitioned backlight technology also have a peak brightness function. The basic principle of partitioned backlight technology is to divide the backlight of the image into many small areas, each of which can independently control the brightness. When the image content brightness of the corresponding area is relatively low, that is, when the pixel value is relatively small, the backlight brightness of the corresponding area is reduced. At the same time, by increasing the pixel value and improving the image brightness, the effect of the backlight reduction on the image brightness is compensated, so that the actual brightness of the image does not change significantly. In this way, the brightness of the backlight can be reduced while the image brightness remains basically unchanged, thereby saving energy. In addition, in some very dark images, due to the reduced backlight brightness, the common light leakage problem of LCD screens can be improved, and the image effect can be improved.
[0065] Peak brightness function When the backlight brightness of the partition backlight is relatively low, the overall power consumption of the backlight is reduced, the power supply is sufficient, the backlight brightness is also sufficient, and the brightness of the image is normal, then the backlight brightness can be increased to obtain a brighter image. For example, under the premise of ensuring the safe operation of the hardware, multiplying the backlight brightness by a gain greater than 1, such as 2, can double the brightness of the image. This gain can be called the peak gain or gain parameter. The peak gain is usually not constant and will change in real time according to the influence and limitations of multiple factors such as the actual content of the image and the working status of the partition backlight.
[0066] In addition to electronic devices with peak brightness functions, there are also some self-luminous display devices, such as early plasma TVs, and the current common OLED and QD OLED display screens. Many of them also adopt similar dynamic maximum brightness processing methods. In images with relatively low average brightness, the maximum brightness of the image is increased, thereby preventing excessive power when displaying an overall bright image, improving screen heating, and increasing screen life. When displaying dark images, local bright content can be brighter. In other words, the lower the average brightness of the displayed image, the greater the maximum brightness value that the screen can display.
[0067] This electronic device with non-constant maximum brightness display capability will dynamically adjust the display capability of the screen's maximum brightness according to the displayed content. The tone mapping method in the related technology does not take into account the non-constant maximum brightness of the screen, which results in inaccurate picture brightness after tone mapping.
[0068] In view of the above problems, the embodiments of the present disclosure provide an image display method applicable to electronic devices with non-constant maximum brightness display capability, for example, electronic devices include televisions, mobile phones, laptops, computer monitors, flat panel displays, vehicle-mounted display devices, head-mounted display devices and other fixed and mobile devices with display screens. Specifically, the electronic device can be an LCD TV with a partitioned backlight function, an OLED (Organic Light-Emitting Diode) TV in a self-luminous form, and other electronic devices with non-constant maximum brightness display capability.
[0069] Figure 1 is a flowchart of an image display method according to an exemplary embodiment, which is executed by an electronic device, see Figure 1 , the method comprises the following steps:
[0070] Step S101, obtaining a first image, the first image including brightness information, the first image being any video frame in a video, and the maximum brightness parameter of the screen changes with the change of the video frame.
[0071] The first image is an image that the electronic device needs to display, the first image is a high dynamic range image, and the first image is any frame in the video. The brightness information is used to characterize the brightness of the first image, and the brightness information may include a maximum content brightness level, that is, the brightness information is the brightness of the brightest pixel in the first image. Of course, the brightness information may also include a maximum average frame brightness level or other information used to characterize the brightness of the first image.
[0072] For a video, the video includes multiple video frames, and the first image is any one of the multiple video frames. When the electronic device is a device with a non-constant maximum brightness display capability, in the process of displaying multiple video frames, the maximum screen brightness parameter of the electronic device changes with the change of the video frames. Among them, the maximum screen brightness parameter is used to characterize the maximum brightness of the screen of the electronic device, and the maximum screen brightness parameter corresponding to the video frame characterizes the maximum brightness of the screen when displaying the video frame.
[0073] Step S102, based on the maximum screen brightness parameter corresponding to the first image, tone mapping is performed on the first image to obtain a second image corresponding to the first image; wherein the screen brightness of the second image is the target screen brightness after the brightness information in the first image is mapped.
[0074] In the disclosed embodiment, the non-constant maximum brightness of the screen is taken into account, that is, the maximum brightness parameter of the screen will change with the change of the video frame during the display process. When tone mapping is performed on the first image, the first image is tone mapped based on the maximum brightness parameter of the screen corresponding to the first image, so that the first image is converted into a second image. Compared with the first image, the brightness of the second image changes, and the second image is converted into a low dynamic range image. For example, the range of the brightness information of the first image is L 1min -L 1max , then the range of the brightness information of the converted second image is L 2min -L 2max , and L 2max Less than or equal to L 1max .
[0075] Step S103: display the second image.
[0076] When the second image is displayed, the screen brightness of the second image is the target screen brightness.
[0077] The method provided by the embodiment of the present disclosure obtains a first image, which is any frame of video in a video, performs tone mapping on the first image based on the maximum screen brightness parameter corresponding to the first image, obtains a second image corresponding to the first image, and displays the second image, wherein the screen brightness of the second image is the target screen brightness after the brightness information in the first image is mapped. The non-constant characteristic of the maximum brightness of the screen is taken into consideration, that is, the maximum screen brightness parameter will change with the change of the video frame during the display process. Therefore, in the tone mapping process, the maximum screen brightness parameter corresponding to each frame of the image is introduced. For any frame of the image, the image is tone mapped based on the maximum screen brightness parameter corresponding to the image, so that the brightness of the target screen after mapping is more accurate, thereby improving the display effect of the image.
[0078] Figure 2 is a flowchart of an image display method according to an exemplary embodiment, which is executed by an electronic device, see Figure 2 , the method comprises the following steps:
[0079] Step S201, obtaining a video, where the video includes multiple video frames, and the first image is any video frame in the video.
[0080] The acquired video is a high dynamic range signal, and the video may be a video shot in real time by the electronic device, or a video sent to the electronic device by other devices.
[0081] In some embodiments, the first image is a video frame in the video, and the brightness information included in the first image may be the brightness information of the entire video, or the brightness information of the scene where the first image is located, or the brightness information of the first image itself. The scene includes a continuous series of video frames in a single background, which can also be understood as a continuous series of video frames with no drastic changes in content.
[0082] In some embodiments, the image format of the first image may be RGB (Red Green Blue) format, YUV (a color encoding mode) format, or other formats. The embodiments of the present disclosure do not limit the image format.
[0083] Step S202: performing linear transformation on the image data in the first image based on a first preset function to obtain a transformed first image.
[0084] In the embodiments of the present disclosure, considering that the received first image may not be the same as the actual image, for example, a high dynamic range image includes a large amount of information, in order to transmit the image through a network or store the image in a storage medium, the image needs to be compressed or encoded, and the compressed or encoded image may lose part of the information. In some embodiments, in order to minimize the information lost during the encoding or compression process, a second preset function may be used to compress or encode the original image. The second preset function is a well-known nonlinear function relationship such as an international standard.
[0085] After receiving the first image, the image data in the first image is the image data processed based on the second preset function, and the image data in the first image has a nonlinear relationship with the brightness information, for example, the nonlinear relationship complies with the SMPTE ST 2084 or ST 2086 specification. In order to obtain the original image, the image data in the first image is linearly transformed based on the first preset function to obtain the transformed first image, and the transformed first image is the original image. The image data in the converted first image has a linear relationship with the brightness information.
[0086] For example, see Figure 3 The relationship between the image data and the brightness information is shown in FIG. Figure 3 The horizontal axis is the image data in the first image after conversion, and the vertical axis is the brightness information corresponding to the image data. Figure 3 It can be seen that the image data in the converted first image is linearly related to the brightness information.
[0087] Step S203, obtaining the maximum screen brightness parameter corresponding to the first image.
[0088] In the disclosed embodiment, when acquiring the maximum screen brightness parameter corresponding to the first image, it is necessary to consider whether the electronic device has a peak brightness function.
[0089] In some embodiments, when the electronic device does not have a peak brightness function, a real-time maximum screen brightness parameter is obtained, and the real-time maximum screen brightness parameter is used as the maximum screen brightness parameter corresponding to the first image. The real-time maximum screen brightness parameter refers to the maximum screen brightness parameter when the first image needs to be displayed.
[0090] In some embodiments, when an electronic device has a peak brightness function, it is possible to adjust the real-time maximum screen brightness parameter according to the image content to be displayed, the power margin of the hardware, and other control parameters. In this case, when the peak brightness function is not turned on, the real-time maximum brightness parameter of the first screen of the electronic device is obtained, and the first maximum brightness parameter of the screen is determined as the maximum brightness parameter of the screen corresponding to the first image; when the peak brightness function is turned on, the first maximum brightness parameter of the screen is adjusted based on the gain parameter to obtain the second maximum brightness parameter of the screen, and the second maximum brightness parameter of the screen is determined as the maximum brightness parameter of the screen corresponding to the first image. Among them, the gain parameter is determined according to the image content to be displayed, the power margin of the hardware, and other control parameters.
[0091] Optionally, based on the gain parameter, the maximum brightness parameter of the first screen is adjusted to obtain the maximum brightness parameter of the second screen, including: taking the product of the gain parameter and the maximum brightness parameter of the first screen as the maximum brightness parameter of the second screen. For example, the maximum brightness parameter of the screen can be expressed as: PL=PLmax*PG, wherein PL is the maximum brightness parameter of the second screen, PLmax is the maximum brightness parameter of the first screen, and PG is the gain parameter.
[0092] In some embodiments, the real-time maximum brightness parameter of the third screen of the electronic device is obtained; the difference between the third maximum brightness parameter of the screen and the preset value is determined as the maximum brightness parameter of the screen corresponding to the first image. The maximum brightness parameter of the screen obtained in this way is smaller than the actual maximum brightness parameter of the third screen, so that when tone mapping is performed later, the screen brightness will be considered to be low, and the low brightness of the screen will be offset by increasing the brightness of the image, so that the accuracy of the brightness of the image finally displayed is higher.
[0093] In some embodiments, considering that in the process of continuously displaying multiple frames of images, that is, playing videos, the tone mapping relationship will affect the brightness of the image displayed on the screen, thereby affecting the maximum brightness parameter of the screen, and the maximum brightness parameter of the screen will in turn affect the tone mapping relationship, that is, the tone mapping relationship and the maximum brightness parameter of the screen will affect each other, so that in the process of image display, when the image content in the screen changes, the screen may flicker. In order to reduce the transmission of screen flicker, low-pass filtering can be used to reduce the change speed of the maximum screen brightness parameter. Optionally, the maximum screen brightness parameter corresponding to the first image is low-pass filtered to obtain the filtered maximum screen brightness parameter, and tone mapping can be performed based on the filtered maximum screen brightness parameter later; and / or, the gain parameter is low-pass filtered to obtain the filtered gain parameter, that is, when adjusting the first maximum screen brightness parameter, the filtered gain parameter can be used for processing.
[0094] Step S204: selecting a target tone mapping relationship from a plurality of tone mapping relationships based on a maximum screen brightness parameter corresponding to the first image.
[0095] In the embodiment of the present disclosure, when selecting a target tone mapping relationship, one or more tone mapping relationships may be selected as the target tone mapping relationship. The tone mapping relationship is a preset mapping relationship, which is used to characterize the relationship between brightness information and screen brightness. Screen brightness is the brightness when an electronic device displays an image. The maximum screen brightness mapped by multiple tone mapping relationships is different, and the maximum screen brightness can be regarded as a maximum screen brightness parameter, that is, the maximum screen brightness parameters corresponding to multiple tone mapping relationships are different.
[0096] An electronic device with a non-constant maximum screen brightness display capability, the maximum screen brightness parameter of the electronic device will change with different images to be displayed. Therefore, in the embodiment of the present disclosure, when it is necessary to display a first image, based on the maximum screen brightness parameter corresponding to the first image, a target tone mapping relationship is selected from multiple tone mapping relationships. The difference between the maximum picture brightness mapped by the target tone mapping relationship and the maximum screen brightness parameter is smaller than the difference between the maximum picture brightness parameter mapped by other unselected tone mapping relationships and the maximum screen brightness parameter, and the target tone mapping relationship may include one or more selected tone mapping relationships.
[0097] In some embodiments, the maximum picture brightness of each tone mapping relationship is determined, at least one first maximum picture brightness greater than the screen maximum brightness parameter among the multiple maximum picture brightnesses is determined, and at least one second maximum picture brightness less than the screen maximum brightness parameter among the multiple maximum picture brightnesses is determined; the tone mapping relationship corresponding to the first maximum picture brightness and the tone mapping relationship corresponding to the second maximum picture brightness are determined as the target tone mapping relationship. That is, the screen maximum brightness parameter is between the maximum picture brightnesses of the selected at least two tone mapping relationships.
[0098] Optionally, during the image display process, the screen may flicker when the picture content on the screen changes. In order to reduce the transmission of screen flicker, the tone mapping relationship is low-pass filtered to obtain a filtered tone mapping relationship. The filtered tone mapping relationship is used in subsequent processing to reduce the change rate of the maximum screen brightness parameter.
[0099] In an example, the tone mapping relationship may be a tone mapping curve.
[0100] For example, for any tone mapping curve, the tone mapping curve see Figure 4 , Figure 4 The horizontal axis is the brightness information (maximum content brightness level), and the vertical axis is the screen brightness (output brightness). Figure 4 Correspondingly, multiple tone mapping curves can be found in Figure 5 , Figure 5 In the figure, three tone mapping curves are used as examples. The maximum screen brightness mapped by these three tone mapping curves are a, b and c respectively. a, b and c can be regarded as different maximum screen brightness parameters. When the maximum screen brightness parameter PL is between a and b, you can select tone mapping curve 1 and tone mapping curve 2 as the target tone mapping curve, or select tone mapping curve 1, tone mapping curve 2 and tone mapping curve 3 as the target tone mapping curve; when the maximum screen brightness parameter PL is between b and c, you can select tone mapping curve 2 and tone mapping curve 3 as the target tone mapping curve, or select tone mapping curve 1, tone mapping curve 2 and tone mapping curve 3 as the target tone mapping curve.
[0101] Above Figure 4 and Figure 5 In the tone mapping curve shown, the oblique straight line represents the brightness range of the image after tone mapping. The horizontal line connected to the right end of the oblique straight line represents that the image level is compressed to the minimum, and the brightness information greater than the maximum brightness parameter of the screen cannot be reflected and distinguished in the displayed image. Among them, the maximum brightness information of the screen corresponds to the maximum value of the brightness of the displayed image, that is, the maximum brightness of the image.
[0102] For another example, for any tone mapping curve, the tone mapping curve can be found in Figure 6 , Figure 6 The horizontal axis is the brightness information (maximum content brightness level), and the vertical axis is the screen brightness (output brightness). Figure 6 Correspondingly, multiple tone mapping curves can be found in Figure 7 , Figure 7 In the figure, three tone mapping curves are used as examples. The maximum screen brightness mapped by these three tone mapping curves are a, b and c respectively. a, b and c can be regarded as different maximum screen brightness parameters. When the maximum screen brightness parameter PL is between a and b, you can select tone mapping curve 1 and tone mapping curve 2 as the target tone mapping curve, or select tone mapping curve 1, tone mapping curve 2 and tone mapping curve 3 as the target tone mapping curve; when the maximum screen brightness parameter PL is between b and c, you can select tone mapping curve 2 and tone mapping curve 3 as the target tone mapping curve, or select tone mapping curve 1, tone mapping curve 2 and tone mapping curve 3 as the target tone mapping curve.
[0103] Above Figure 6 and Figure 7 The tone mapping curve shown is compared to Figure 4 and Figure 5 The tone mapping curve shown in FIG. 1 adds a curve when approaching the maximum screen brightness parameter, such as Figure 6 and Figure 7 The curved dotted line in the image can make the brightness information of the part of the image that exceeds the maximum brightness parameter of the screen be displayed after compression. For example, see Figure 6 , the brightness information of the image below the brightness information A can be reflected in the picture brightness, and A is greater than the maximum screen brightness parameter, among which the level of brightness information greater than the maximum screen brightness parameter and less than the brightness information A is reflected in the picture brightness after compression.
[0104] Step S205 , tone mapping is performed on the first image based on the target tone mapping relationship to obtain a second image.
[0105] The target tone mapping relationship includes at least one tone mapping relationship.
[0106] In some embodiments, when the target tone mapping relationship includes a tone mapping relationship, tone mapping is performed on the first image based on the tone mapping relationship to obtain the second image.
[0107] In some embodiments, when the target tone mapping relationship includes at least two first tone mapping relationships, weighted processing is performed on the at least two first tone mapping relationships to obtain a second tone mapping relationship; tone mapping is performed on the first image based on the second tone mapping relationship to obtain a second image. The first tone mapping relationship is a tone mapping relationship selected from a plurality of tone mapping relationships.
[0108] For example, the target tone mapping relationship includes two first tone mapping relationships, and the following formula is used to perform weighted processing on the two first tone mapping relationships:
[0109] To=Tc*(PL-a) / (ca)+Ta*(c-PL) / (ca)
[0110] Among them, To is the second tone mapping relationship, Ta and Tc are the first tone mapping relationship, PL is the maximum brightness parameter of the screen, the maximum picture brightness mapped by Tc is c, and the maximum picture brightness mapped by Ta is a.
[0111] In some embodiments, when the target tone mapping relationship includes at least two first tone mapping relationships, tone mapping is performed on the first image based on the at least two first tone mapping relationships to obtain a third image after each first tone mapping; and weighted processing is performed on the third image after at least two first tone mapping relationships to obtain a second image. For example, the following formula is used to weight the third images after the two first tone mapping relationships are mapped:
[0112] L=L1*(PL-a) / (ca)+L2*(c-PL) / (ca)
[0113] Among them, L is the second image, PL is the maximum brightness parameter of the screen, the maximum picture brightness mapped by the first tone mapping relationship Tc is c, the maximum picture brightness mapped by the first tone mapping relationship Ta is a, L1 is the third image mapped by the first tone mapping relationship Tc, and L2 is the third image mapped by the first tone mapping relationship Ta.
[0114] Optionally, when the first image is an image in RGB format, tone mapping is performed on the RGB information based on the target tone mapping relationship to obtain the second image, wherein the RGB information includes brightness information. When the first image is an image in YUV format, tone mapping is performed on the brightness information (i.e., Y information) based on the target tone mapping relationship to obtain the target screen brightness, and the target screen brightness is used as the screen brightness of the first image to obtain the second image. Of course, the first image can also be in other formats, and the present disclosure does not limit this.
[0115] In some embodiments, the image data in the second image is linearly related to the picture brightness. To facilitate subsequent processing, the image data in the second image may be converted to nonlinear, that is, after conversion, the image data in the second image is nonlinearly related to the picture brightness.
[0116] Step S206: display the second image.
[0117] It should be noted that the embodiment of the present disclosure is only described using a first image as an example. For a video, when playing each video frame in the video, each video frame can also be processed in accordance with the processing method of the first image, so that each video frame in the played video has a more accurate picture brightness, thereby making the video have a better playback effect.
[0118] Another point that needs to be explained is that, for an electronic device with a zoned backlight function, the above-mentioned implementation can be used to perform tone mapping on the image displayed in each zone.
[0119] In addition, in some embodiments, the electronic device may include an image receiving module, a linear conversion module, a screen brightness acquisition module, and a tone mapping module, see Figure 8 , the image receiving module is connected to the linear conversion module, the linear conversion module is connected to the tone mapping module, and the screen brightness acquisition module is connected to the tone mapping module. The image receiving module is used to perform the operation of step S201, the linear conversion module is used to perform the operation of step S202, the screen brightness acquisition module is used to perform the operation of step S203, and the tone mapping module is used to perform the operations of S204-S206. The electronic device may also include a display module, the tone mapping module is connected to the display module, and the display module is used to perform the operation of step S207.
[0120] The method provided by the embodiment of the present disclosure takes into account the non-constant maximum brightness of the screen during the tone mapping process of the first image, introduces a maximum screen brightness parameter, and the target tone mapping relationship selected based on the maximum screen brightness parameter corresponding to the first image is more suitable for the current first image than other tone mapping relationships, so that the target screen brightness of the second image obtained by mapping based on the target tone mapping relationship is more accurate, thereby improving the display effect of the second image. In addition, when the maximum screen brightness parameter is increased, the selected tone mapping parameter will also be adjusted, that is, the maximum screen brightness mapped by the selected tone mapping parameter will also increase, thereby retaining more bright image content, allowing more brightness information in the image to be displayed, and making the brightness levels in the image richer.
[0121] Furthermore, in the related art, the influence of the maximum brightness parameter of the screen is not considered. When the maximum brightness parameter of the screen changes, the picture brightness of the displayed image does not change. However, in the embodiment of the present disclosure, the influence of the maximum brightness parameter of the screen is taken into consideration. When the maximum brightness parameter of the screen changes, the picture brightness of the displayed image changes accordingly, thereby compensating for the influence of the change of the maximum brightness of the screen on the displayed image.
[0122] Fig. 9 is a block diagram of an image display device according to an exemplary embodiment, which is configured in an electronic device, see Fig. 9 , the device comprises:
[0123] The image acquisition module 901 is configured to acquire a first image, the first image includes brightness information, the first image is any frame in the video, and the maximum brightness parameter of the screen changes with the change of the video frame;
[0124] The tone mapping module 902 is configured to perform tone mapping on the first image based on the maximum screen brightness parameter corresponding to the first image to obtain a second image corresponding to the first image; wherein the screen brightness of the second image is the target screen brightness after the brightness information in the first image is mapped;
[0125] The image display module 903 is configured to display the second image.
[0126] In some embodiments, the tone mapping module 902 is configured to:
[0127] Based on the maximum screen brightness parameter corresponding to the first image, a target tone mapping relationship is selected from a plurality of tone mapping relationships; wherein the tone mapping relationship is used to characterize the relationship between brightness information and picture brightness, and the maximum picture brightness mapped by the plurality of tone mapping relationships is different;
[0128] Tone mapping is performed on the first image based on the target tone mapping relationship to obtain a second image.
[0129] In some embodiments, the tone mapping module 902 is configured to:
[0130] Perform tone mapping on the brightness information based on the target tone mapping relationship to obtain the target picture brightness;
[0131] The target image brightness is used as the image brightness of the first image to obtain the second image.
[0132] In some embodiments, the target tone mapping relationship includes at least two first tone mapping relationships, and the tone mapping module 902 is configured to:
[0133] Performing weighted processing on at least two first tone mapping relationships to obtain a second tone mapping relationship;
[0134] Perform tone mapping on the first image based on the second tone mapping relationship to obtain a second image.
[0135] In some embodiments, the target tone mapping relationship includes at least two first tone mapping relationships, and the tone mapping module 902 is configured to:
[0136] Performing tone mapping on the first image based on at least two first tone mapping relationships respectively to obtain a third image mapped by each first tone mapping relationship;
[0137] A weighted process is performed on the third images mapped according to at least two first tone mapping relationships to obtain a second image.
[0138] In some embodiments, the tone mapping module 902 is configured to:
[0139] Perform tone mapping on the brightness information based on the target tone mapping relationship to obtain the target picture brightness;
[0140] The target image brightness is used as the image brightness of the first image to obtain the second image.
[0141] In some embodiments, the tone mapping module 902 is configured to:
[0142] Determine the maximum picture brightness mapped by each tone mapping relationship;
[0143] Determine at least one first maximum picture brightness among the plurality of maximum picture brightnesses that is greater than the maximum screen brightness parameter, and at least one second maximum picture brightness among the plurality of maximum picture brightnesses that is less than the maximum screen brightness parameter;
[0144] The tone mapping relationship corresponding to the first maximum picture brightness and the tone mapping relationship corresponding to the second maximum picture brightness are determined as the target tone mapping relationship.
[0145] In some embodiments, the apparatus further comprises a filtering module, the filtering module being configured to perform at least one of the following:
[0146] Performing low-pass filtering on the maximum screen brightness parameter corresponding to the first image to obtain a filtered maximum screen brightness parameter;
[0147] The tone mapping relationship is subjected to low-pass filtering to obtain a filtered tone mapping relationship.
[0148] In some embodiments, the electronic device has a peak brightness function, and the device further comprises:
[0149] The screen brightness acquisition module is configured to acquire the real-time maximum brightness parameter of the first screen of the electronic device when the peak brightness function is not turned on, and determine the first maximum brightness parameter of the screen as the maximum brightness parameter of the screen corresponding to the first image; or
[0150] The screen brightness acquisition module is also configured to adjust the first screen maximum brightness parameter based on the gain parameter when the peak brightness function is turned on, obtain the second screen maximum brightness parameter, and determine the second screen maximum brightness parameter as the screen maximum brightness parameter corresponding to the first image.
[0151] In some embodiments, the apparatus further comprises:
[0152] The filtering module is configured to perform low-pass filtering on the gain parameter to obtain a filtered gain parameter.
[0153] In some embodiments, the apparatus further comprises:
[0154] A screen brightness acquisition module, configured to acquire a real-time maximum brightness parameter of a third screen of the electronic device;
[0155] The screen brightness acquisition module is also configured to determine the difference between the third screen maximum brightness parameter and the preset value as the screen maximum brightness parameter corresponding to the first image.
[0156] In some embodiments, the image data in the first image is nonlinearly related to the brightness information, and the apparatus further comprises:
[0157] The linear conversion module is configured to perform linear conversion on the image data in the first image based on a first preset function to obtain a converted first image, wherein the image data in the converted first image is linearly related to the brightness information.
[0158] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0159] An embodiment of the present disclosure further provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the image display method in the above embodiment.
[0160] Fig.10 is a block diagram of an electronic device 1000 according to an exemplary embodiment.
[0161] Reference Fig.10, the electronic device 1000 may include one or more of the following components: a processing component 1002 , a memory 1004 , a power component 1006 , a multimedia component 1008 , an audio component 1010 , an input / output (I / O) interface 1012 , a sensor component 1014 , and a communication component 1016 .
[0162] The processing component 1002 generally controls the overall operation of the electronic device 1000, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1002 may include one or more processors 1020 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1002 may include one or more modules to facilitate the interaction between the processing component 1002 and other components. For example, the processing component 1002 may include a multimedia module to facilitate the interaction between the multimedia component 1008 and the processing component 1002.
[0163] The memory 1004 is configured to store various types of data to support operations on the electronic device 1000. Examples of such data include instructions for any application or method operating on the electronic device 1000, contact data, phone book data, messages, pictures, videos, etc. The memory 1004 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0164] The power supply component 1006 provides power to various components of the electronic device 1000. The power supply component 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1000.
[0165] The multimedia component 1008 includes a screen that provides an output interface between the electronic device 1000 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1008 includes a front camera and / or a rear camera. When the electronic device 1000 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0166] The audio component 1010 is configured to output and / or input audio signals. For example, the audio component 1010 includes a microphone (MIC), and when the electronic device 1000 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1004 or sent via the communication component 1016. In some embodiments, the audio component 1010 also includes a speaker for outputting audio signals.
[0167] I / O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0168] The sensor assembly 1014 includes one or more sensors for providing various aspects of status assessment for the electronic device 1000. For example, the sensor assembly 1014 can detect the open / closed state of the electronic device 1000, the relative positioning of components, such as the display and keypad of the electronic device 1000, and the sensor assembly 1014 can also detect the position change of the electronic device 1000 or a component of the electronic device 1000, the presence or absence of user contact with the electronic device 1000, the orientation or acceleration / deceleration of the electronic device 1000, and the temperature change of the electronic device 1000. The sensor assembly 1014 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 1014 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1014 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0169] The communication component 1016 is configured to facilitate wired or wireless communication between the electronic device 1000 and other devices. The electronic device 1000 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1016 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1016 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0170] In an exemplary embodiment, the electronic device 1000 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0171] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1004 including instructions, and the instructions can be executed by the processor 1020 of the electronic device 1000 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0172] The embodiments of the present disclosure further provide a non-temporary computer-readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the image display method in the above embodiments.
[0173] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0174] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. An image display method, characterized in that: The method comprises: Acquire a first image, where the first image includes brightness information, the first image is any video frame in a video, and a maximum screen brightness parameter changes with a change of the video frame; Based on the maximum screen brightness parameter corresponding to the first image, tone mapping is performed on the first image to obtain a second image corresponding to the first image; wherein the screen brightness of the second image is the target screen brightness after the brightness information in the first image is mapped; The second image is displayed.
2. The method according to claim 1, characterized in that The step of performing tone mapping on the first image based on the maximum screen brightness parameter corresponding to the first image to obtain a second image corresponding to the first image includes: Based on the maximum screen brightness parameter corresponding to the first image, selecting a target tone mapping relationship from a plurality of tone mapping relationships; wherein the tone mapping relationship is used to characterize the relationship between brightness information and picture brightness, and the maximum picture brightness mapped by the plurality of tone mapping relationships is different; Performing tone mapping on the first image based on the target tone mapping relationship to obtain the second image.
3. The method according to claim 2, characterized in that The target tone mapping relationship includes at least two first tone mapping relationships, and the tone mapping is performed on the first image based on the target tone mapping relationship to obtain the second image, including: Performing weighted processing on the at least two first tone mapping relationships to obtain a second tone mapping relationship; Perform tone mapping on the first image based on the second tone mapping relationship to obtain the second image.
4. The method according to claim 2, characterized in that The target tone mapping relationship includes at least two first tone mapping relationships, and the tone mapping is performed on the first image based on the target tone mapping relationship to obtain the second image, including: Performing tone mapping on the first image based on the at least two first tone mapping relationships respectively to obtain a third image mapped by each of the first tone mapping relationships; The third image mapped according to the at least two first tone mapping relationships is subjected to weighted processing to obtain the second image.
5. The method according to claim 2, characterized in that: The step of performing tone mapping on the first image based on the target tone mapping relationship to obtain the second image includes: Performing tone mapping on the brightness information based on the target tone mapping relationship to obtain the target picture brightness; The target image brightness is used as the image brightness of the first image to obtain the second image.
6. The method according to claim 2, characterized in that The selecting a target tone mapping relationship from a plurality of tone mapping relationships based on a maximum screen brightness parameter corresponding to the first image includes: Determine the maximum picture brightness of each tone mapping relationship mapping; Determine at least one first maximum picture brightness among a plurality of maximum picture brightnesses that is greater than the maximum screen brightness parameter, and at least one second maximum picture brightness among the plurality of maximum picture brightnesses that is less than the maximum screen brightness parameter; The tone mapping relationship corresponding to the first maximum picture brightness and the tone mapping relationship corresponding to the second maximum picture brightness are determined as the target tone mapping relationship.
7. The method according to claim 2, characterized in that: Before selecting a target tone mapping relationship from a plurality of tone mapping relationships based on a maximum screen brightness parameter corresponding to the first image, the method further includes at least one of the following: Performing low-pass filtering on the maximum screen brightness parameter corresponding to the first image to obtain a filtered maximum screen brightness parameter; The tone mapping relationship is subjected to low-pass filtering to obtain a filtered tone mapping relationship.
8. The method according to any one of claims 1 to 7, characterized in that: The electronic device has a peak brightness function. Before tone mapping the first image based on the maximum screen brightness parameter corresponding to the first image to obtain the second image corresponding to the first image, the method further includes: When the peak brightness function is not enabled, obtaining a real-time maximum brightness parameter of a first screen of the electronic device, and determining the first maximum brightness parameter of the screen as the maximum brightness parameter of the screen corresponding to the first image; or When the peak brightness function is turned on, the first screen maximum brightness parameter is adjusted based on the gain parameter to obtain the second screen maximum brightness parameter, and the second screen maximum brightness parameter is determined as the screen maximum brightness parameter corresponding to the first image.
9. The method according to claim 8, characterized in that Before adjusting the first screen maximum brightness parameter based on the gain parameter to obtain the second screen maximum brightness parameter, the method further includes: The gain parameter is subjected to low-pass filtering to obtain a filtered gain parameter.
10. The method according to any one of claims 1 to 7, characterized in that: Before performing tone mapping on the first image based on the maximum screen brightness parameter corresponding to the first image to obtain a second image corresponding to the first image, the method further includes: Obtaining the real-time maximum brightness parameter of the third screen of the electronic device; The difference between the third screen maximum brightness parameter and the preset value is determined as the screen maximum brightness parameter corresponding to the first image.
11. The method according to any one of claims 1 to 7, characterized in that: The image data in the first image is in a nonlinear relationship with the brightness information. Before tone mapping is performed on the first image based on the maximum brightness parameter of the screen corresponding to the first image to obtain a second image corresponding to the first image, the method further includes: Based on a first preset function, linear transformation is performed on the image data in the first image to obtain a transformed first image, wherein the image data in the transformed first image is in a linear relationship with the brightness information.
12. An image display device, characterized in that: The device comprises: An image acquisition module is configured to acquire a first image, wherein the first image includes brightness information, the first image is any frame in a video, and a maximum screen brightness parameter changes with changes in the video frame; a tone mapping module, configured to perform tone mapping on the first image based on a maximum screen brightness parameter corresponding to the first image, to obtain a second image corresponding to the first image; wherein the screen brightness of the second image is a target screen brightness after the brightness information in the first image is mapped; The image display module is configured to display the second image.
13. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the method as claimed in any one of claims 1 to 11.
14. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as claimed in any one of claims 1 to 11.