An image display method and an electronic device

By adjusting the screen color temperature frame by frame to match the ambient light environment, the problem of image color distortion and visual fatigue caused by the difference between the screen color temperature and the ambient color temperature is solved, thereby improving the user's visual experience and protecting the eyes.

CN120071786BActive Publication Date: 2026-02-27HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311588138.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2026-02-27
Estimated Expiration
2043-11-23

AI Technical Summary

Technical Problem

When the color temperature of an electronic device's screen differs significantly from the ambient color temperature, it causes color distortion in the image perceived by the user, increases visual fatigue, may damage the eyes, and affects the user's visual experience.

Method used

By adjusting the screen color temperature frame by frame to match the ambient light environment, and using a non-linear color temperature change curve and color temperature conversion matrix to process the image, the screen color temperature gradually matches the target color temperature as the light environment changes, reducing visual abruptness.

Benefits of technology

It enhances the user's visual experience, reduces visual fatigue, ensures that image colors match the ambient light environment, and protects the user's eyes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120071786B_ABST
    Figure CN120071786B_ABST
Patent Text Reader

Abstract

The application discloses an image display method and an electronic device, relates to the display field, and is used for matching the screen color temperature of an electronic device and the RGB value of an image displayed by the electronic device with a light environment in which the electronic device is located. The method comprises the following steps: firstly, the electronic device displays a first image in a first light environment. Then, when the light environment in which the electronic device is located changes from the first light environment to a second light environment, the electronic device acquires a target screen color temperature corresponding to target light information. Finally, after the electronic device displays the first image, the electronic device displays N frames of second images frame by frame, and adjusts the screen color temperature frame by frame according to a nonlinear color temperature change curve in the process of displaying the N frames of second images, until the screen color temperature of the electronic device reaches the target screen color temperature when the electronic device displays the Nth frame of second image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the display field, and particularly relate to an image display method and an electronic device. BACKGROUND

[0002] At present, most electronic devices (such as mobile phones) have display functions, and more and more users browse images (such as pictures or videos, etc.) through electronic devices. In the process of displaying images, the screen color temperature of the electronic device may be quite different from the ambient color temperature, which may cause the user to perceive image color distortion (such as the hue of the image being yellow), and also increase the user's visual fatigue, and even harm the user's eyes. In summary, when the screen color temperature of the electronic device is quite different from the ambient color temperature, the user's visual experience will be affected. SUMMARY

[0003] Embodiments of the present application provide an image display method and an electronic device, which are used to match the screen color temperature of the electronic device and the RGB value of the image displayed by the electronic device with the light environment in which the electronic device is located.

[0004] To achieve the above object, embodiments of the present application adopt the following technical solutions:

[0005] In a first aspect, an image display method is provided, which comprises:

[0006] First, the electronic device displays a first image in a first light environment. The RGB value of the first image matches the first light environment in which the electronic device is located. The ambient light information in different light environments is different, and the ambient light information can include ambient light luminance and ambient color temperature;

[0007] Then, when the light environment in which the electronic device is located changes from the first light environment to a second light environment, the electronic device obtains a target screen color temperature corresponding to target light information. The target light information can include ambient light information in the second light environment, and the target screen color temperature matches the second light environment.

[0008] Finally, the electronic device displays the N frames of second images frame by frame after displaying the first image, and adjusts the screen color temperature frame by frame according to the non-linear color temperature change curve during the display of the N frames of second images, until the screen color temperature of the electronic device reaches the target screen color temperature when the electronic device displays the Nth frame of second image. Wherein, each frame of second image is obtained by processing each frame of third image by using corresponding color temperature conversion matrix. Each frame of third image is the original image of the corresponding each frame of second image. The non-linear color temperature change curve includes the non-linear screen color temperature corresponding to each frame of third image, and the non-linear screen color temperature corresponding to each frame of third image is obtained by performing non-linear processing on the linear screen color temperature corresponding to the third image by using the current screen color temperature of the electronic device when displaying the first image and the target screen color temperature. The linear screen color temperature corresponding to the third image is included in the linear color temperature change line. The linear color temperature change line is obtained based on the current screen color temperature, the target screen color temperature and the display time length of the N frames of second images.

[0009] By using the image display method in the embodiments of the present application, the target screen color temperature of the electronic device after the change matches the changed light environment, and the screen color temperature of the electronic device is non-linearly changed in the whole change process. In this way, the whole change process of the visual screen color temperature is not abrupt, and the visual experience of the user is good. At the same time, each frame of second image displayed frame by frame on the electronic device is obtained by processing each frame of third image by using corresponding color temperature conversion matrix. In this way, the RGB value of the last frame of second image displayed on the electronic device matches the second light environment in which the electronic device is located. Therefore, when the user browses the image in the current light environment, the eyes of the user will not appear to be acid and sour, thereby reducing the visual fatigue of the user and further improving the visual experience of the user.

[0010] In a possible implementation manner of the first aspect, the target light information can further include the screen display brightness of the electronic device in the second light environment. That is to say, in some possible implementation manners, the target light information can include the ambient illuminance, the ambient color temperature and the screen display brightness in the second light environment. Based on this, the accuracy of the target screen color temperature obtained by the electronic device is higher.

[0011] In another possible implementation manner of the first aspect, the electronic device obtaining the target screen color temperature corresponding to the target light information can include: the electronic device substitutes the target light information into the first mapping relationship to obtain the target screen color temperature. Wherein, the first mapping relationship indicates the mapping relationship between the plurality of groups of light information and the screen color temperature.

[0012] The first mapping relationship can be directly stored in the electronic device, at this time, the electronic device directly calls the first mapping relationship, which is convenient and fast. Of course, the first mapping relationship can also be obtained by the electronic device through calculation processing.

[0013] In a possible implementation of the first aspect, the first mapping relationship is not pre-stored in the electronic device, and thus the electronic device needs to obtain the first mapping relationship before obtaining the target screen color temperature corresponding to the target light information.

[0014] In this case, the image display method can further include performing linear interpolation processing on the target mapping table to obtain the first mapping relationship. The target mapping table is a mapping table between light information and screen color temperature.

[0015] In this implementation, the target mapping table and the specific manner of linear interpolation processing are related to the light information. For example, when the light information includes ambient light intensity and ambient color temperature, the target mapping table is a mapping relationship between the ambient light intensity and the ambient color temperature and the screen color temperature. In this case, performing two-dimensional linear interpolation processing on the target mapping table can obtain the first mapping relationship.

[0016] For another example, when the light information includes ambient light intensity, ambient color temperature, and screen display brightness, the target mapping table is a mapping relationship between the ambient light intensity, the ambient color temperature, and the screen display brightness and the screen color temperature. In this case, performing three-dimensional linear interpolation processing on the target mapping table can obtain the first mapping relationship.

[0017] In a possible implementation of the first aspect, before displaying the N frames of second images frame by frame, the image display method can further include: the electronic device substitutes the absolute value of the difference between the target screen color temperature and the current screen color temperature corresponding to the first image into the second mapping relationship to obtain the display duration of the N frames of second images. The second mapping relationship is a mapping relationship between the change amount of the screen color temperature and the transformation duration.

[0018] In a possible implementation of the first aspect, before substituting the absolute value of the difference between the target screen color temperature and the current screen color temperature into the second mapping relationship to obtain the display duration of the N frames of second images, the image display method further includes:

[0019] First, the electronic device determines a target scene corresponding to the light environment change according to the first ambient light intensity and the second ambient light intensity, or the first ambient color temperature and the second ambient color temperature. Then, the electronic device determines the second mapping relationship according to the target scene, and a mapping relationship between a scene and a change amount of a screen color temperature and a transformation duration. The first ambient color temperature is an ambient color temperature in a first light environment, the first ambient light intensity is an ambient light intensity in the first light environment, the second ambient color temperature is an ambient color temperature in a second light environment, and the second ambient light intensity is an ambient light intensity in the second light environment.

[0020] Based on this, the accuracy of the second mapping relationship determined by the electronic device is higher, so that the matching degree of the RGB value of each frame of second image displayed subsequently with the second light environment is higher.

[0021] In a possible implementation manner of the first aspect, the target scene corresponding to the light environment change is determined according to the first ambient illuminance and the second ambient illuminance, or the first ambient color temperature and the second ambient color temperature, and can include the following implementation manners.

[0022] If the second ambient illuminance is greater than the first illuminance, and the first ambient illuminance is less than the second illuminance, the target scene is a light-on scene. If the second ambient illuminance is less than the second illuminance, and the first ambient illuminance is greater than the first illuminance, the target scene is a light-off scene. If the second ambient illuminance is less than the first illuminance, and the first ambient illuminance is greater than the second illuminance, the target scene is an illuminance enhancement scene. If the second ambient illuminance is greater than the second illuminance, and the first ambient illuminance is less than the first illuminance, the target scene is an illuminance attenuation scene. If the second ambient color temperature is greater than the first ambient color temperature, the target scene is a color temperature enhancement scene. If the second ambient color temperature is less than the first ambient color temperature, the target scene is a color temperature attenuation scene. Wherein, the first illuminance is greater than the second illuminance.

[0023] In a possible implementation manner of the first aspect, before displaying the N frames of second images frame by frame, the image display method can further include the following implementation manners.

[0024] First, the electronic device determines the product of the display duration and the screen refresh rate as the total number N of frames of the third images displayed by the electronic device in the display duration. Then, the electronic device determines the difference between the target screen color temperature and the current screen color temperature as the first screen color temperature change amount. Next, the electronic device determines the quotient of the first screen color temperature change amount and the total number of frames as the second screen color temperature change amount. Finally, the electronic device determines the sum of the first screen color temperature and the second screen color temperature change amount corresponding to each frame of the third image as the linear screen color temperature corresponding to each frame of the third image.

[0025] Wherein, the first screen color temperature corresponding to the first frame of the N frames of third images is the current screen color temperature corresponding to the first image. The first screen color temperature corresponding to the Lth frame of the N frames of third images is the linear screen color temperature corresponding to the (L-1)th frame of the N frames of third images. L is a positive integer greater than or equal to 2 and less than or equal to N.

[0026] In a possible implementation manner of the first aspect, before displaying the N frames of second images frame by frame, the image display method can further include the following implementation manners.

[0027] Wherein, the nonlinear conversion formula is:

[0028]

[0029]

[0030]

[0031]

[0032] noLinearTargetCCT = TargetCCT - CurrentCCT2, linearTargetCCT = noLinearTargetCCT / K, wherein noLinearTargetCCT is the nonlinear screen color temperature corresponding to each frame of the third image; TargetCCT is the target screen color temperature; CurrentCCT2 is the current screen color temperature; linearTargetCCT is the linear screen color temperature corresponding to each frame of the third image; and K is the nonlinear variation rate of the screen color temperature.

[0033] In a possible implementation form of the first aspect, before displaying the N frames of the second image frame by frame, the image display method further includes:

[0034] According to the nonlinear screen color temperature corresponding to each frame of the third image, the color deviation value, and the first color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image, the N color temperature conversion matrices are determined. The first color coordinate is the color coordinate of the white point in the RGB color space. The fourth screen color temperature of the Mth frame of the third image is the nonlinear screen color temperature of the M-1th frame of the third image, M is a positive integer greater than or equal to 2 and less than N.

[0035] In a possible implementation form of the first aspect, the determining the N color temperature conversion matrices according to the nonlinear screen color temperature corresponding to each frame of the third image, the color deviation value, and the first color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image includes:

[0036] Firstly, the electronic device obtains XYZ values of the white point corresponding to the fourth screen color temperature of each frame of the third image according to the first color coordinate of the white point corresponding to the fourth screen color temperature of each frame of the third image. Secondly, the electronic device substitutes the XYZ values of the white point corresponding to the fourth screen color temperature of each frame of the third image into a color gamut conversion formula to obtain RGB values of the white point corresponding to the fourth screen color temperature of each frame of the third image. Thirdly, the electronic device determines second color coordinates of the white point corresponding to the nonlinear screen color temperature of each frame of the third image according to the nonlinear screen color temperature, the color deviation value and the third color temperature threshold corresponding to each frame of the third image. Then, the electronic device obtains XYZ values of the white point corresponding to the nonlinear screen color temperature of each frame of the third image according to the second color coordinates of the white point corresponding to the nonlinear screen color temperature of each frame of the third image. Then, the electronic device substitutes the XYZ values of the white point corresponding to the nonlinear screen color temperature of each frame of the third image into the color gamut conversion formula to obtain RGB values of the white point corresponding to the nonlinear screen color temperature of each frame of the third image. Finally, the electronic device obtains the color temperature conversion matrix corresponding to each frame of the third image according to the RGB values of the white point corresponding to the fourth screen color temperature of each frame of the third image and the RGB values of the white point corresponding to the nonlinear screen color temperature of each frame of the third image.

[0037] The second color coordinate is a color coordinate of the white point corresponding to each frame of the third image in an xy coordinate system of an XYZ color space under the nonlinear screen color temperature corresponding to each frame of the third image.

[0038] The color gamut conversion formula is:

[0039]

[0040] The (R, G, B) is the RGB value; and the (X, Y, Z) is the XYZ value. The color gamut conversion matrix is a color gamut conversion matrix between the XYZ color space and the RGB color space.

[0041] In a possible implementation of the first aspect, the method further includes: determining the second color coordinates of the white point corresponding to the nonlinear screen color temperature of each frame of the third image according to the nonlinear screen color temperature corresponding to each frame of the third image, the color deviation value and the third color temperature threshold.

[0042] Firstly, the electronic device substitutes the nonlinear screen color temperature corresponding to each frame of the third image into the color coordinate calculation formula to obtain the first preset color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image. Then, if the color deviation value is less than the first threshold value, the electronic device directly determines the first preset color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image as the second color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image. If the color deviation value is greater than the first threshold value, the electronic device determines the second color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image according to the first preset color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image, the nonlinear screen color temperature corresponding to each frame of the third image, the third color temperature threshold value, and the color deviation value.

[0043] The first preset color coordinate is an estimated color coordinate of the white point of each frame of the third image in an xy coordinate system of an XYZ color space under the nonlinear screen color temperature corresponding to each frame of the third image.

[0044] The color coordinate calculation formula is as follows:

[0045]

[0046]

[0047] The preset color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image is (x predicted , y predicted ); CCTm is the second screen color temperature corresponding to each frame of the third image; A1, A2, A3, B1, B2, C1, C2, C3, D, E1, E2, F, and G are constants; and H is the second color temperature threshold value.

[0048] In a possible implementation form of the first aspect, the determination of the second color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image according to the first preset color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image, the nonlinear screen color temperature corresponding to each frame of the third image, the third color temperature threshold value, and the color deviation value can include:

[0049] Firstly, the electronic device substitutes the first preset color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image into the first coordinate conversion formula to obtain the third color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space. Secondly, the electronic device determines the sum of the nonlinear adjustment screen color temperature corresponding to each frame of the third image and the third color temperature threshold value. Thirdly, the electronic device substitutes the nonlinear adjustment screen color temperature corresponding to each frame of the third image into the color coordinate calculation formula to obtain the second preset color coordinate of the white point under the nonlinear screen adjustment color temperature corresponding to each frame of the third image. Fourthly, the electronic device substitutes the second preset color coordinate of the white point under the nonlinear screen adjustment color temperature corresponding to each frame of the third image into the first coordinate conversion formula to obtain the fourth color coordinate of the white point under the nonlinear screen adjustment color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space. Finally, the electronic device determines the second color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image according to the third color coordinate corresponding to each frame of the third image, the fourth color coordinate corresponding to each frame of the third image, and the color deviation value.

[0050] wherein the nonlinear adjustment screen color temperature is a correction value of the nonlinear screen color temperature.

[0051] wherein the first coordinate conversion formula is:

[0052]

[0053] wherein (u predicted , v predicted ) is the color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space; a, b, c, and d are constants.

[0054] In a possible implementation form of the first aspect, the electronic device determines the second color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image according to the third color coordinate corresponding to each frame of the third image, the fourth color coordinate corresponding to each frame of the third image, and the color deviation value, which can include:

[0055] Firstly, the electronic device determines a difference between u3 in the third color coordinate and u4 in the fourth color coordinate corresponding to each frame of the third image as a first variation. Secondly, the electronic device determines a difference between v3 in the third color coordinate and v4 in the fourth color coordinate corresponding to each frame of the third image as a second variation. Thirdly, the electronic device calculates a first ratio between the first variation and the second variation corresponding to each frame of the third image. Then, the electronic device determines a fifth color coordinate of a white point under a nonlinear screen color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space according to the color deviation value, the first ratio corresponding to each frame of the third image, and the third color coordinate. Then, the electronic device substitutes the fifth color coordinate corresponding to each frame of the third image into the second conversion formula to calculate a second color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image.

[0056] wherein the fifth color coordinate is the corrected third color coordinate.

[0057] wherein the second conversion formula is:

[0058]

[0059] wherein (x_target, y_target) is the second color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image; (u_target, v_target) is the fifth color coordinate corresponding to each frame of the third image; f, g, h, and m are constants.

[0060] In a possible implementation of the first aspect, the electronic device determines the fifth color coordinate of the white point under the second screen color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space according to the color deviation value, the first ratio corresponding to each frame of the third image, and the third color coordinate, and the method comprises the following steps.

[0061] Firstly, the electronic device substitutes the color deviation value and the first ratio corresponding to each frame of the third image into the third conversion formula to calculate a third variation of u3 in the third color coordinate and u4 in the fourth color coordinate corresponding to each frame of the third image, and a fourth variation of v3 in the third color coordinate and v4 in the fourth color coordinate corresponding to each frame of the third image. Secondly, the electronic device determines u_target in the fifth color coordinate corresponding to each frame of the third image as a sum of u3 in the third color coordinate corresponding to each frame of the third image and the third variation corresponding to each frame of the third image. Finally, the electronic device determines v_target in the fifth color coordinate corresponding to each frame of the third image as a sum of v3 in the third color coordinate corresponding to each frame of the third image and the fourth variation corresponding to each frame of the third image.

[0062] wherein the third variation is the corrected first variation, and the fourth variation is the corrected second variation.

[0063] wherein the third conversion formula is:

[0064]

[0065] wherein du_new is the third variation corresponding to each frame of the third image; dv_new is the fourth variation corresponding to each frame of the third image; radio is the first ratio corresponding to each frame of the third image; and Duv is the color deviation value.

[0066] In a possible implementation of the first aspect, the XYZ value of the white point at the fourth screen color temperature corresponding to each frame of the third image can be obtained according to the first color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image, and the XYZ value of the white point at the fourth screen color temperature corresponding to each frame of the third image can comprise:

[0067] First, the electronic device substitutes the first color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image into the fourth coordinate conversion formula to obtain the sixth color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image. Then, the electronic device converts the sixth color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image according to the relationship between the sixth color coordinate of the white point and the XYZ value of the white point to obtain the XYZ value of the white point at the fourth screen color temperature corresponding to each frame of the third image.

[0068] wherein the sixth color coordinate is the color coordinate of the white point in the xy coordinate system of the XYZ color space at the fourth screen color temperature.

[0069] wherein the fourth coordinate conversion formula is:

[0070]

[0071] wherein (r1, g1, b1) is the first color coordinate of the white point corresponding to each frame of the third image; and (x1, y1) is the sixth color coordinate of the white point corresponding to each frame of the third image. is a conversion matrix between the color coordinates of the RGB color space and the color coordinates of the XYZ color space.

[0072] In a possible implementation of the first aspect, the color temperature conversion matrix corresponding to each frame of the third image can be obtained according to the RGB value of the white point at the fourth screen color temperature corresponding to each frame of the third image and the RGB value of the white point at the nonlinear screen color temperature corresponding to each frame of the third image, and the color temperature conversion matrix corresponding to each frame of the third image can comprise:

[0073] First, the electronic device calculates three second ratios between the RGB value of the white point at the nonlinear screen color temperature corresponding to each frame of the third image and the RGB value of the white point at the fourth screen color temperature corresponding to each frame of the third image. Then, the electronic device obtains the color temperature conversion matrix corresponding to each frame of the image according to the three second ratios corresponding to each frame of the image.

[0074] wherein the three second ratios are respectively: (R target , G target , B target ) are the RGB values of the white point under the nonlinear screen color temperature corresponding to each frame of the third image, and (R current , G current , B current ) are the RGB values of the white point under the fourth screen color temperature corresponding to each frame of the third image.

[0075] Therefore, the color temperature conversion matrix is:

[0076]

[0077] In a possible implementation of the first aspect, the displaying the N frames of second images frame by frame can include: first, the electronic device adjusts the RGB values of each pixel in each frame of the third image by using each color temperature conversion matrix to obtain each frame of the second image. Then, the electronic device displays each frame of the second image.

[0078] In a possible implementation of the first aspect, before the target screen color temperature corresponding to the target light information is obtained, the image display method can further include:

[0079] First, the electronic device obtains a current ambient illuminance and a current ambient color temperature of a light environment in which the electronic device is located. Second, the electronic device determines the absolute value of the difference between the current ambient illuminance and a historical ambient illuminance as a variation of the ambient illuminance, and determines the absolute value of the difference between the current ambient color temperature and a historical ambient color temperature as a variation of the ambient color temperature. Third, the electronic device determines that the light environment in which the electronic device is located changes from a first light environment to a second light environment based on that the variation of the ambient illuminance exceeds an illuminance threshold and / or the variation of the ambient color temperature exceeds a first color temperature threshold. Alternatively, the electronic device determines that the light environment in which the electronic device is located is the first light environment based on that the variation of the ambient illuminance does not exceed the illuminance threshold and / or the variation of the ambient color temperature does not exceed the first color temperature threshold.

[0080] wherein the current ambient illuminance is an ambient illuminance of a light environment in which the electronic device is located at a current collection time, and the current ambient color temperature is an ambient color temperature of the light environment in which the electronic device is located at the current collection time. The historical ambient illuminance is an ambient illuminance at a historical collection time, and the historical ambient color temperature is an ambient color temperature at the historical collection time. The historical collection time is a previous collection time of the current collection time.

[0081] In a possible implementation of the first aspect, the image display method can further include: based on that the light environment in which the electronic device is located is the first light environment, the electronic device does not adjust the screen color temperature.

[0082] In a possible implementation form of the first aspect, the color and color temperature interface of the electronic device comprises a preset switch. The current ambient illuminance and the current ambient color temperature of the light environment in which the electronic device is located can be obtained by the following steps:

[0083] When the preset switch is in the on state, the current ambient illuminance and the current ambient color temperature of the light environment in which the electronic device is located are obtained.

[0084] In a second aspect, an electronic device is provided, comprising a display screen, an ambient light sensor, a processor and a memory. The display screen is configured to display an image. The ambient light sensor is configured to obtain an ambient illuminance and an ambient color temperature, and send the ambient illuminance and the ambient color temperature to the processor. The memory stores instructions. When the processor executes the instructions, the method of the first aspect and any one of the implementation forms thereof is executed.

[0085] In a third aspect, a computer readable storage medium is provided, comprising instructions, which, when executed on an electronic device, cause the electronic device to perform the method of the first aspect and any one of the implementation forms thereof.

[0086] In a fourth aspect, a computer program product is provided, comprising instructions, which, when executed on the electronic device, cause the electronic device to perform the method of the first aspect and any one of the implementation forms thereof.

[0087] In a fifth aspect, a chip system is provided, comprising a processor configured to support the electronic device to implement the functions involved in the first aspect. In a possible design, the electronic device further comprises an interface circuit, which can be configured to receive a signal from another device (e.g., a memory) or send a signal to another device (e.g., a communication interface). The chip system can comprise a chip, and can further comprise other discrete devices.

[0088] The technical effects of the second aspect to the fifth aspect can refer to the technical effects of the first aspect and any one of the implementation forms thereof, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0089] Figure 1 A display interface of an electronic device in a first light environment in the prior art is shown;

[0090] Figure 2 A display interface of an electronic device in a second light environment in the prior art is shown;

[0091] Figure 3 A hardware structure of an electronic device provided by an embodiment of the present application is shown;

[0092] Figure 4 A software architecture of an electronic device provided by an embodiment of the present application is shown;

[0093] Figure 5 A flowchart of an image display method provided by an embodiment of the present application;

[0094] Figure 6 A flowchart of an image display method provided by an embodiment of the present application;

[0095] Figure 7 An interface diagram of an electronic device provided by an embodiment of the present application;

[0096] Figure 8 A diagram of a change in a light environment provided by an embodiment of the present application;

[0097] Figure 9 A flowchart of an image display method provided by an embodiment of the present application;

[0098] Figure 10 A diagram of two-dimensional linear interpolation provided by an embodiment of the present application;

[0099] Figure 11 A diagram of a mapping relationship between an ambient light intensity, an ambient color temperature, a screen display brightness and a screen color temperature of an electronic device provided by an embodiment of the present application;

[0100] Figure 12 A diagram of three-dimensional linear interpolation provided by an embodiment of the present application;

[0101] Figure 13 A diagram of a corresponding relationship between a change amount of a screen color temperature and a conversion time length provided by an embodiment of the present application;

[0102] Figure 14 A flowchart of an image display method provided by an embodiment of the present application;

[0103] Figure 15 A flowchart of an image display method provided by an embodiment of the present application;

[0104] Figure 16 A comparative diagram of a nonlinear conversion and a linear conversion of a screen color temperature provided by an embodiment of the present application;

[0105] Figure 17 An effect diagram of a screen color temperature conversion provided by an embodiment of the present application;

[0106] Figure 18 A flowchart of an image display method provided by an embodiment of the present application;

[0107] Figure 19A structural schematic diagram of a chip system is provided in the embodiments of the present application. DETAILED DESCRIPTION

[0108] The terms "first", "second", etc. used in the embodiments of the present application are only used for distinguishing the same type of features, and should not be interpreted as indicating relative importance, quantity, order, etc.

[0109] The terms "exemplary" or "for example" used in the embodiments of the present application are used to represent that an embodiment or design scheme is an example, illustration or description. Any embodiment or design scheme described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or advantageous than other embodiments or design schemes. In fact, the terms "exemplary" or "for example" are used to present relevant concepts in a specific manner.

[0110] The terms "coupling", "connection" used in the embodiments of the present application should be interpreted in a broad sense, for example, can refer to a physical direct connection, or an indirect connection through an electronic device, for example, a connection through a resistor, inductor, capacitor or other electronic device.

[0111] First, some concepts related to the embodiments of the present application are introduced.

[0112] Color temperature: Color temperature is a unit of measurement indicating the color component contained in light, which can represent the color quality of a light source, and the unit is K (Kelvin).

[0113] White point: White point refers to the point representing white color in the chromaticity diagram. The position of the white point in the chromaticity diagram (i.e. white point coordinates or white point color coordinates) will affect the display of most colors of the display screen.

[0114] Illuminance: Illuminance refers to the luminous flux received by a unit area of an illuminated object. The unit of illuminance is lux.

[0115] Screen display brightness: Screen display brightness refers to the physical quantity of the light intensity on the surface of the display screen (i.e. the light emitting object). The unit of brightness is candela per square meter or nit.

[0116] RGB color space: RGB color space is the abbreviation of red, green, blue color space. RGB color space can also be referred to as CIE1931-RGB system. RGB color space refers to a space system capable of quantitatively describing color vision through red, green and blue. In RGB color space, color can be represented in coordinate form.

[0117] XYZ color space: XYZ color space refers to a new colorimetric color system established on the basis of RGB color space with three imaginary primary color lights X, Y, Z. XYZ color space can also be referred to as CIE1931-XYZ system. In short, X, Y, Z in XYZ color space are respectively a linear transformation of R, G, B in RGB color space. X, Y, Z also respectively represent the concept of R, G, B three primary color stimulus values.

[0118] At present, most electronic devices (such as mobile phones) have display functions, and more and more users browse images (such as pictures or videos, etc.) through electronic devices. In the process of displaying images, the screen color temperature of the electronic device is greatly different from the ambient color temperature, which may cause the user to perceive the color distortion of the image (such as the color tone of the image being yellow), and also increase the visual fatigue of the user, and even harm the eyes of the user. In summary, when the screen color temperature of the electronic device is greatly different from the ambient color temperature, the visual experience of the user will be affected. The following takes the electronic device as a mobile phone as an example for illustration.

[0119] Figure 1 A display interface schematic diagram of an electronic device in a first light environment in a conventional technology is shown. As shown in Figure 1 The mobile phone 100 is in a first light environment (such as a dark light environment). The ambient color temperature of the first light environment is low. The display interface 110 of the mobile phone 100 displays a first image 111. The ambient color temperature is low, and the screen color temperature of the mobile phone 100 is high (not shown in the figure), so that the color tone of the first image 111 perceived by the user is cold (such as the color tone being blue). Figure 1 In this way, when the user browses the first image 111 in the first light environment, not only will the color tone of the image perceived by the user be inconsistent with the true color tone of the image, but also the eyes of the user will have symptoms such as dryness and itching, thereby increasing the visual fatigue of the user.

[0120] In addition, since the ambient color temperature is low and the screen color temperature is high, when the user browses the first image 111 in the first light environment, the blue light source in the white light displayed by the mobile phone 100 cannot be filtered through the pupil of the eye, and the damage to the eye is greater.

[0121] It should be noted that the light environment refers to the ambient light condition of the light environment in which the display screen of the electronic device is located. The light environment can include artificial light environment and natural light environment, but is not limited thereto. For example, the artificial light environment can include the light environment. The natural light environment can include the sunlight environment, the moonlight environment, etc. The above-mentioned dark light environment can be a light environment in which the light is turned off in a dark room, or a light environment in which the light is poor when the weather is gloomy, but is not limited thereto.

[0122] Figure 2A display interface of an electronic device in a second light environment in the prior art is shown. As shown in Figure 2 The mobile phone 100 is in a second light environment (e.g., a bright light environment). The second light environment has a high ambient color temperature. The display interface 110 of the mobile phone 100 displays a second image 210. The screen color temperature of the mobile phone 100 is lower (not shown in the prior art). The ambient color temperature is high, and the screen color temperature of the mobile phone 100 is low, so that the user perceives a warm color tone (e.g., a yellow color tone) of the second image 210. Figure 2

[0123] That is, when the ambient color temperature is high and the screen color temperature of the mobile phone 100 is low, the color tone of the image perceived by the user is inconsistent with the true color tone of the image, which affects the visual experience of the user when browsing the second image.

[0124] It should be noted that, based on the above introduction of the light environment, the bright light environment can be a light environment in which a light is turned on in a dark room or a light environment in which the outdoor light is good when the weather is fine, but is not limited thereto.

[0125] In summary, when a user browses an image through an electronic device, if the screen color temperature of the electronic device is greatly different from the ambient color temperature, the color tone of the image perceived by the user is distorted, the visual fatigue of the user is increased, and even the eyes of the user are damaged, which seriously affects the visual experience of the user.

[0126] To solve the above problems, the embodiments of the present application provide an image display method and an electronic device. The electronic device is in a bright screen state, and when the light environment in which the electronic device is located changes from a first light environment to a second light environment: first, the electronic device can obtain a target screen color temperature matched with the changed second light environment according to the ambient illuminance and the ambient color temperature in the first light environment. Then, the electronic device can obtain N color temperature transformation matrices respectively corresponding to N frames of original images in a process in which the electronic device changes the screen color temperature from a current screen color temperature to the target screen color temperature according to the target screen color temperature and the current screen color temperature (i.e., the screen color temperature corresponding to the first light environment). Next, the electronic device can process each frame of original image by using each color temperature transformation matrix respectively, and display N frames of target images corresponding to the N frames of original images frame by frame. At the same time, the electronic device adjusts the screen color temperature frame by frame according to a non-linear color temperature change curve in the process of displaying the N frames of target images frame by frame, until the screen color temperature of the electronic device reaches the target screen color temperature when the electronic device displays the Nth frame of target image.

[0127] ​It can be seen that, on the one hand, the screen color temperature change process of the electronic device provided in the embodiment of the present application is nonlinear change, so that the whole change process of the screen color temperature is not conspicuous, and the visual experience of the user can be improved. At the same time, the target screen color temperature of the electronic device is determined by the ambient illuminance and the ambient color temperature of the changed second light environment, so that the accuracy of the target screen color temperature is higher, so that the target screen color temperature is more matched with the second light environment. On the other hand, the RGB value (or color adaptation degree) of the target image finally browsed by the user is matched with the changed second light environment. In this way, the visual fatigue of the user can be reduced, and the visual experience of the user can be further improved. In short, the electronic device provided in the embodiment of the present application can improve the visual experience of the user when browsing images.

[0128] The electronic device related to the embodiment of the present application can be a device with display function and data processing function. The electronic device can be mobile or fixed. The electronic device can be deployed on land (such as indoor or outdoor, handheld or vehicle-mounted, etc.), water surface (such as ship, etc.), or air (such as airplane, balloon, etc.). The electronic device can be referred to as user equipment (user equipment, UE), access terminal, terminal unit, subscriber unit, terminal station, mobile station (mobile station, MS), mobile station, terminal agent or terminal device, etc. For example, the electronic device can be a mobile phone, a tablet computer, a notebook computer, etc. The specific type and structure of the electronic device are not limited in the embodiment of the present application. A possible structure of the electronic device is described below.

[0129] Taking the electronic device as a mobile phone as an example, Figure 3 A hardware structure schematic diagram of an electronic device 300 provided in the embodiment of the present application is shown. The electronic device 300 can include a processor 310, a memory 320, a universal serial bus (universal serial bus, USB) interface 330, a power management module 340, an antenna, a communication module 350, a display screen 360, an audio module 370, a camera 380, a sensor module 390, etc.

[0130] It can be understood that the structure shown in the embodiment does not constitute a specific limitation on the electronic device 300. In other embodiments, the electronic device 300 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software or a combination of software and hardware.

[0131] The processor 310 can include one or more processing units, for example: the processor 310 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors. The controller can be the nervous system and command center of the electronic device 300. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.

[0132] The processor 310 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. The memory can hold instructions or data that the processor 310 has just used or recycled. If the processor 310 needs to use the instructions or data again, it can directly call them from the memory. This avoids repeated access and reduces the waiting time of the processor 310, thus improving the efficiency of the system.

[0133] In some embodiments, the processor 310 can include one or more interfaces. The interfaces can 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 330, etc.

[0134] It can be understood that the interface connection relationship between the modules shown in the embodiments is only illustrative and does not constitute a structural limitation on the electronic device. In other embodiments, the electronic device can also use different interface connection manners or combinations of multiple interface connection manners.

[0135] The memory 320 can be configured to store computer-executable program code including instructions. The processor 310 performs various functional applications and data processing of the electronic device by running the instructions stored in the memory 320. The memory 320 can include a program storage area and a data storage area. The program storage area can store an operating system and at least one application program required by a function (such as a sound playing function, an interface display function, etc.). The data storage area can store data (such as a notification message) created during use of the electronic device. In addition, the memory 320 can include a high-speed random access memory, and can also include a non-volatile memory such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0136] The power management module 340 is configured to connect the battery and the processor 310. The power management module 340 receives the battery and / or power input to supply power to the processor 310, the memory 320, the communication module 350, the display screen 360, the display screen 360, and the camera 380, etc. The power management module 340 can also be configured to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In other embodiments, the power management module 340 can also be arranged in the processor 310.

[0137] The communication module 350 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The communication module 350 can be one or more devices that integrate at least one communication processing module. The communication module 350 receives electromagnetic waves via an antenna, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 310. The communication module 350 can also receive signals to be transmitted from the processor 310, frequency-modulate them, amplify them, and radiate them as electromagnetic waves via an antenna.

[0138] In some embodiments, the antenna and the communication module 350 of the electronic device 300 are coupled, such that the electronic device 300 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, global navigation satellite system (GNSS), WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include global positioning system (GPS), beidou navigation satellite system (BDS), global navigation satellite system (GLONASS), and / or Galileo satellite navigation system (GALILEO).

[0139] The electronic device 300 implements a display function through a GPU, a display 360, and an application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display 360 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 can include one or more GPUs, which execute program instructions to generate or change display information.

[0140] The display screen 360 is configured to display images, videos, and the like. The display screen 360 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Mini-LED, a Micro-OLED, a quantum dot light emitting diode (QLED), or the like.

[0141] The electronic device 300 can implement a photographing function through an ISP, the camera 380, a video codec, a GPU, the display screen 360, and an application processor.

[0142] The audio module 370 is configured to convert digital audio information into an analog audio signal output, and to convert an analog audio input into a digital audio signal. The audio module 370 can also be configured to encode and decode audio signals. In some embodiments, the audio module 370 can be disposed in the processor 310, or some functional modules of the audio module 370 can be disposed in the processor 310.

[0143] The camera 380 is configured to capture still images or videos. An object generates an optical image through a lens and projects the optical image onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to an ISP to convert the electrical signal into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into an image signal in a standard format, such as RGB, YUV, or the like.

[0144] The sensor module 390 can include an ambient light sensor, a pressure sensor, a gravity sensor, and the like. Among them, the ambient light sensor can acquire ambient light information of a light environment in which the electronic device is located. The ambient light information can include ambient light illumination, ambient color temperature, and the like.

[0145] In some embodiments, one ambient light sensor can acquire all ambient light information such as ambient light illumination and ambient color temperature. In this case, the sensor module 390 can include one ambient light sensor. In other embodiments, one ambient light sensor can acquire one kind of ambient light information. In this case, the sensor module 390 can include at least two kinds of ambient light sensors, which respectively acquire ambient light information such as ambient light illumination and ambient color temperature. In other embodiments, one ambient light sensor can acquire multiple kinds of ambient light information. In this case, the sensor module 390 can include at least one kind of ambient light sensor. In the embodiments of the present application, one ambient light sensor can acquire all ambient light information at the same time as an example.

[0146] It can be understood that, in general, the implementation of the functions of the electronic device needs the support of hardware and the cooperation of software.

[0147] The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiments of the present application take a layered architecture of Android as an example to exemplarily illustrate the software structure of the electronic device.

[0148] Figure 4 A software architecture diagram of the electronic device running is shown.

[0149] The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, as shown in Figure 4 , the Android is divided into five layers, from top to bottom, which are the application layer, the application framework layer, the Android runtime system library, the hardware abstraction layer, and the kernel layer.

[0150] Among them, the application layer can include a series of application packages. As shown in Figure 4 , the application package can include: camera, gallery, calendar, call, map, navigation, settings, Bluetooth, music, video, short message, desktop launcher, media database (Media Library), and other applications.

[0151] Specifically, the content in the application can be sent to the display screen for display, so as to be browsed by the user. For example, the images in the gallery and the video can be displayed on the display screen.

[0152] In some embodiments, the setting application can include a preset switch (such as a natural color display). The switch state of the preset switch is related to whether the application framework layer obtains the ambient light intensity (such as the current ambient light intensity) and the ambient color temperature (such as the current ambient color temperature) from the sensor driver of the kernel layer.

[0153] For example, the setting application can set the switch state of the preset switch in response to the switch operation of the user. The setting application can send the switch state of the preset switch to the application framework layer. For example, the setting application can send the switch state of the preset switch to the application framework layer at a fixed frequency. Alternatively, the setting application can send the switch state of the preset switch to the application framework layer after the switch state of the preset switch changes, but is not limited thereto.

[0154] The application framework layer provides an application programming interface (API) and a programming framework for the application program of the application program layer. The application framework layer includes some pre-defined functions.

[0155] As shown in FIG. 1, the application framework layer can include a color adjustment module, but is not limited thereto. The color adjustment module pre-stores the image display method provided in the embodiments of the present application. Figure 4

[0156] In an embodiment, the color adjustment module can obtain the screen state of the display screen and the screen parameters of the display screen from the display driver of the kernel layer. The screen state can be a black screen state or a bright screen state. When the screen state is the bright screen state: first, the color adjustment module can obtain the ambient light intensity and the ambient color temperature from the sensor driver of the kernel layer. Then, the color adjustment module obtains the screen color temperature of the electronic device in the first light environment based on the change of the light environment of the mobile phone from the first light environment to the second light environment from the display driver of the kernel layer. Next, the color adjustment module can obtain N color temperature conversion matrices based on the ambient light intensity, the ambient color temperature, the screen color temperature and the screen parameters in the second light environment. Finally, the color adjustment module adjusts each of the N frames of original images based on each color temperature conversion matrix to obtain N frames of target images matched with the changed second light environment, and sends the N frames of target images to the display screen for display.

[0157] In another embodiment, the color adjustment module can also obtain the switch state of the preset switch from the application program layer. The switch state of the preset switch can be an on state or an off state. When the screen state is the bright screen state and the preset switch is in the on state, the color adjustment module will execute the image display process in the above embodiment.

[0158] ​In another embodiment, the color adjustment module can further obtain the screen display brightness of the display screen in the second light environment from the display driver of the kernel layer. At this time, the color adjustment module can obtain the N color temperature conversion matrices based on the ambient light intensity, the ambient color temperature, the screen color temperature, the screen parameter and the screen display brightness in the second light environment. The other processes remain unchanged, and the embodiments of the present application will not be described here.

[0159] The Android Runtime includes a core library and a virtual machine. The Android Runtime is responsible for scheduling and management of the Android system.

[0160] The core library includes two parts: one part is the function function called by the java language, and the other part is the core library of the Android.

[0161] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java file of the application layer and the application framework layer into a binary file. The virtual machine is used to execute the management of the object life cycle, the stack management, the thread management, the security and the exception management, and the garbage collection and the like.

[0162] The system library can include a plurality of function modules. For example: a surface manager, media libraries, a three-dimensional graphics processing library (for example: OpenGL ES), a 2D graphics engine (for example: SGL) and the like.

[0163] The surface manager is used for managing the display subsystem, and provides a fusion of 2D and 3D layers for a plurality of applications.

[0164] The media library supports a plurality of commonly used audio, video format playback and recording, and static image files and the like. The media library can support a plurality of audio and video coding formats, for example: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG and the like.

[0165] The media library can include a media provider, which saves the data of multimedia files, such as audio, video, image data and the like.

[0166] The three-dimensional graphics processing library is used for realizing three-dimensional graphics drawing, image rendering, synthesis, and layer processing and the like.

[0167] The 2D graphics engine is a drawing engine for 2D drawing.

[0168] The hardware abstraction layer can include a display screen hardware abstraction module and a light sensor hardware abstraction module.

[0169] The kernel layer is a layer between hardware and software. The kernel layer can include a display screen driver and a sensor driver.

[0170] Specifically, the display screen driver is configured to drive the display screen to display the original image and the target image. The sensor driver is configured to drive the ambient light sensor to collect ambient light, and obtain ambient illuminance (e.g., current ambient illuminance) and ambient color temperature (e.g., current ambient color temperature) based on the ambient light.

[0171] Next, the following describes Figures 5-19 An image display method provided by an embodiment of the present application is introduced. Figure 5 An image display method provided by an embodiment of the present application is introduced. Figure 5 As shown in the figure, the image display method can include the following steps.

[0172] S501: The electronic device displays a first image in a first light environment.

[0173] The ambient light information in different light environments is different. The ambient light information can represent the ambient light condition of the light environment in which the electronic device is located. Generally, the ambient light information can include ambient illuminance and ambient color temperature.

[0174] The value (i.e., RGB value) of the first image matches the first light environment in which the electronic device is located.

[0175] S502: The electronic device obtains current ambient illuminance and current ambient color temperature of the light environment in which the electronic device is located.

[0176] The current ambient illuminance refers to the ambient illuminance of the light environment in which the electronic device is located at the current collection time. The current ambient color temperature refers to the ambient color temperature of the light environment in which the electronic device is located at the current collection time.

[0177] Specifically, the electronic device can be provided with an ambient light sensor. The ambient light sensor can collect ambient light of the surrounding environment, and obtain ambient illuminance and ambient color temperature based on the ambient light. That is, at the current collection time, the ambient light sensor collects ambient light (hereinafter referred to as current ambient light) of the light environment in which the electronic device is located, and obtains current ambient illuminance and current ambient color temperature based on the current ambient light.

[0178] It should be noted that how the ambient light sensor obtains ambient illuminance and ambient color temperature based on ambient light can be referred to the related description in the prior art, and the embodiment of the present application will not be repeated.

[0179] In an embodiment, when the electronic device is in the screen-on state, the ambient light sensor can collect ambient light of the light environment in which the electronic device is located at a fixed frequency, and obtain the ambient illuminance and the ambient color temperature based on the ambient light. That is, based on the electronic device being in the screen-on state, the electronic device can obtain the ambient illuminance and the ambient color temperature of the light environment in which the electronic device is located at different collection times, without always obtaining the ambient illuminance and the ambient color temperature of the light environment in which the electronic device is located. In this way, the computational load of the electronic device can be reduced, and the system resources and power consumption of the electronic device can be saved.

[0180] In addition, the electronic device can store the ambient light information such as the ambient illuminance and the ambient color temperature obtained at different collection times in the memory of the electronic device. When the electronic device needs this ambient light information, it can be called from the memory. In this way, it is not only convenient, but also fast, and the efficiency of the electronic device is improved.

[0181] In another embodiment, when the electronic device is in the screen-off state, the user will not browse images through the electronic device, so the electronic device does not need to adjust the screen color temperature, nor does it need to adjust the images in the electronic device. That is, when the electronic device is in the screen-off state, the electronic device does not need to perform the image display method provided in the embodiments of the present application. Based on this, when the electronic device is in the screen-off state, the electronic device does not obtain the current ambient illuminance and the current ambient color temperature of the light environment in which the electronic device is located. In this way, the computational load of the electronic device can be further reduced, and the system resources and power consumption of the electronic device can be saved.

[0182] Further, Figure 6 A flowchart of another embodiment of the image display method provided in the embodiments of the present application is shown.

[0183] Optionally, in combination with Figure 5 As shown in Figure 6 S502 can be replaced by the following S601.

[0184] S601, based on the preset switch being in the on state, the electronic device obtains the current ambient illuminance and the current ambient color temperature of the light environment in which the electronic device is located.

[0185] When the electronic device is in the screen-on state, whether the electronic device obtains the current ambient illuminance and the current ambient color temperature is related to the switch state of the preset switch.

[0186] In this embodiment, when the electronic device is in the screen-on state and the preset switch is in the on state, the electronic device will obtain the current ambient illuminance and the current ambient color temperature of the light environment in which the electronic device is located through the ambient light sensor. Conversely, the electronic device will not obtain the current ambient illuminance and the current ambient color temperature of the light environment in which the electronic device is located through the ambient light sensor.

[0187] The electronic device can switch the switch state of the preset switch in response to a switch operation of the preset switch by a user. For example, the preset switch is switched from an on state to an off state, or the preset switch is switched from an off state to an on state. The electronic device can acquire the switch state of the preset switch at a fixed frequency. Alternatively, the electronic device can acquire the switch state of the preset switch again after determining that the switch state of the preset switch has changed.

[0188] Figure 7 An interface of an electronic device is shown.

[0189] In one embodiment, as shown in A of Figure 7 The setting interface 710 of the mobile phone 100 includes a first control 711 (such as display and brightness), as shown in B of Figure 7 The mobile phone 100 switches from the setting interface 710 to the display and brightness interface 720 in response to a trigger operation on the first control 711, as shown in B of Figure 7 The mobile phone 100 switches from the display and brightness interface 720 to the color and color temperature interface 730 in response to a trigger operation on the second control 721, as shown in C of Figure 7 The mobile phone 100 switches from the off state to the on state in response to an opening operation on the preset switch 731, as shown in D of

[0190] At this time, the mobile phone 100 is in a screen-on state, and the preset switch 731 is in the on state, so the mobile phone 100 can acquire the current ambient illuminance and the current ambient color temperature of the light environment in which the mobile phone 100 is located.

[0191] In this embodiment, the electronic device can acquire the current ambient illuminance and the current ambient color temperature based on the needs of the user, so as to execute the image display method provided in the embodiments of the present application, so that the screen color temperature of the electronic device conforms to the current light environment, and the image color perceived by the user is consistent with the actual color of the image, or the visual fatigue of the user is reduced, even the damage to the eyes of the user is reduced, and finally the visual experience of the user is improved.

[0192] In S503, the electronic device determines the absolute value of the difference between the current ambient illuminance and the historical ambient illuminance as the change amount of the ambient illuminance, and determines the absolute value of the difference between the current ambient color temperature and the historical ambient color temperature as the change amount of the ambient color temperature.

[0193] Historical ambient illuminance refers to the ambient illuminance of the electronic device's environment as obtained by the ambient light sensor at a historical acquisition time. Historical ambient color temperature refers to the ambient color temperature of the electronic device's environment as obtained by the ambient light sensor at a historical acquisition time. Historical acquisition time is the acquisition time preceding the current acquisition time.

[0194] S504. The electronic device determines the light environment in which it is located as the first light environment based on the fact that the change in ambient illuminance does not exceed the illuminance threshold and the change in ambient color temperature does not exceed the first color temperature threshold.

[0195] Specifically, when the change in ambient illuminance does not exceed the illuminance threshold and the change in ambient color temperature does not exceed the first color temperature threshold, the electronic device can determine that its lighting environment has not changed. Therefore, the electronic device is still in the first lighting environment.

[0196] S505. Based on the light environment in which the electronic device is located, which is the first light environment, the electronic device does not adjust the screen color temperature.

[0197] Among them, screen color temperature refers to one of the important standards for measuring the color display quality of electronic device displays. Users' perception of the same screen color will be different depending on the screen color temperature.

[0198] Specifically, when the lighting environment of an electronic device remains unchanged, the device does not need to adjust the screen's color temperature. Simultaneously, the device does not need to adjust the image displayed on the screen. This not only saves system resources but also ensures that the screen's color temperature and the displayed image match the lighting environment, improving the user's visual experience when viewing images on the electronic device.

[0199] S506. The electronic device acquires the target screen color temperature corresponding to the target light information based on the change in ambient light intensity exceeding an illuminance threshold and / or the change in ambient color temperature exceeding a first color temperature threshold.

[0200] Specifically, if at least one of the changes in ambient illuminance and ambient color temperature exceeds the corresponding threshold, it can indicate that the light environment in which the electronic device is located has changed, that is, the light environment in which the electronic device is located has changed from the first light environment to the second light environment.

[0201] Figure 8 This illustration shows a schematic diagram of a change in the light environment provided in an embodiment of this application.

[0202] In one embodiment, such as Figure 8As shown in Figure A, mobile phone 100 is in the third lighting environment. The ambient illuminance of the third lighting environment is 60,000 lux (lx), and the ambient color temperature of the third lighting environment is 4,000 correlated color temperature (CCT). Assume that the third lighting environment is the lighting environment in which mobile phone 100 was located at the previous acquisition time.

[0203] like Figure 8 As shown in Figure B, mobile phone 100 is in the fourth lighting environment. The ambient illuminance of the fourth lighting environment is 80,000 lx. The ambient color temperature of the fourth lighting environment is 5,000 CCT. Assume the fourth lighting environment is the lighting environment in which mobile phone 100 is located at the current acquisition moment. Therefore, the change in ambient illuminance between the fourth and third lighting environments is 20,000 lx, and the change in ambient color temperature between the fourth and third lighting environments is 1,000 CCT. Assume the illuminance threshold is 70 lx and the first color temperature threshold is 80 CCT. By comparison, it can be seen that the change in ambient illuminance between the fourth and third lighting environments exceeds the illuminance threshold, and the change in ambient color temperature between the fourth and third lighting environments exceeds the color temperature threshold. Therefore, the lighting environment of the electronic device has changed.

[0204] Or, such as Figure 8 As shown in Figure C, mobile phone 100 is in the fifth lighting environment. The ambient illuminance of the fifth lighting environment is 59980 lx. The ambient color temperature of the fifth lighting environment is 4050 CCT. Assume that the fifth lighting environment is the lighting environment in which mobile phone 100 is located at another current acquisition moment. Therefore, the change in ambient illuminance between the fifth and third lighting environments is 20 lx, and the change in ambient color temperature between the fifth and third lighting environments is 50 CCT. By comparison, it can be seen that the change in ambient illuminance between the fifth and third lighting environments does not exceed the illuminance threshold, and the change in ambient color temperature between the fifth and third lighting environments does not exceed the first color temperature threshold. Therefore, the lighting environment of the electronic device has not changed.

[0205] Specifically, the target screen color temperature is the screen color temperature that matches the current lighting environment (i.e., the second lighting environment). When the color temperature of the electronic device's display is the target screen color temperature, the colors of the images perceived by the user will not be distorted when browsing images through the electronic device, and it will reduce visual fatigue, protect the user's eyes, and improve the user's visual experience.

[0206] Figure 9 The third schematic flowchart of an image display method provided in this application embodiment is shown.

[0207] In an embodiment, the S506 can be replaced by the following S901. Figure 5 As Figure 9 , the S506 can be replaced by the following S901.

[0208] The S901, based on the change amount of the ambient light illumination exceeding the illumination threshold value and / or the change amount of the ambient color temperature exceeding the first color temperature threshold value, the electronic device substitutes the target light information into the first mapping relationship to obtain the target screen color temperature of the electronic device.

[0209] The first mapping relationship is used to indicate the mapping relationship between the multiple groups of light information and the screen color temperature. Different light information corresponds to different first mapping relationship. The following will be introduced in different cases.

[0210] Optionally, the light information can include the ambient light information (such as the ambient light illumination and the ambient color temperature), and therefore the target light information can include the ambient light information in the second environment (such as the current ambient light illumination and the current ambient color temperature). Based on this, the first mapping relationship can be the mapping relationship f(lux, cct) between the ambient light illumination and the ambient color temperature and the screen color temperature of the electronic device.

[0211] In an embodiment, the first mapping relationship can be obtained by the electronic device adopting the two-dimensional linear interpolation manner to process the target mapping table (which can be referred to as the first mapping table) between the ambient light illumination and the ambient color temperature and the screen color temperature of the electronic device. The target mapping table between the ambient light illumination and the ambient color temperature and the screen color temperature of the electronic device can be pre-stored in the electronic device.

[0212] Exemplarily, the mapping table can be as shown in Table 1:

[0213] Table 1

[0214]

[0215] As can be seen from Table 1, one ambient light illumination and one ambient color temperature can correspond to one screen color temperature. Since the data in Table 1 is some discrete data, in the embodiment of the present application, the first preset relationship f(lux, cct) is obtained by adopting the two-dimensional linear interpolation manner on the basis of Table 1.

[0216] Figure 10 A schematic diagram of the two-dimensional linear interpolation provided by the embodiment of the present application is shown.

[0217] Exemplarily, as Figure 10 shown, the horizontal coordinate is the ambient color temperature, the vertical coordinate is the ambient light illumination, and the intersection point of the horizontal coordinate and the vertical coordinate is the screen color temperature. The first preset relationship f(lux, cct) is obtained by adopting the two-dimensional linear interpolation manner on the basis of Table 1.

[0218] Then, the current ambient color temperature and the current ambient illuminance are substituted into the first preset relationship f(lux, cct), i.e., cct = Currentcct1 and lux = Currentlux1, so that the target screen color temperature can be obtained. That is, the target screen color temperature can be expressed by the following formula (1):

[0219] TargetCCT = f(Currentlux1, Currentcct1) (1)

[0220] In the formula, TargetCCT is the target screen color temperature, Currentlux1 is the current ambient illuminance, and Currentcct1 is the current ambient color temperature.

[0221] In some other embodiments, the mapping table between the ambient illuminance and the ambient color temperature and the screen color temperature of the electronic device is not pre-stored in the electronic device, but the first mapping relationship f(lux, cct) is directly pre-stored. In this way, the electronic device can directly call the first mapping relationship f(lux, cct). Based on this, the calculation amount of the electronic device can be greatly reduced, and the system resources and power consumption of the electronic device are further saved.

[0222] Optionally, based on the above-mentioned embodiments, the light information can further include device light information (such as screen display brightness). Therefore, the target light information can further include device light information (such as the current screen display brightness) in the second environment. Based on this, the first mapping relationship can be a mapping relationship f(lux, cct, nit) between the ambient illuminance, the ambient color temperature, the screen display brightness and the screen color temperature of the electronic device.

[0223] In an embodiment, the first mapping relationship can be obtained by the electronic device adopting a three-dimensional linear interpolation method to process a target mapping table (which can be referred to as a second mapping table) between the ambient illuminance, the ambient color temperature, the screen display brightness and the screen color temperature of the electronic device. The target mapping table between the ambient illuminance, the ambient color temperature, the screen display brightness and the screen color temperature of the electronic device can be pre-stored in the electronic device. In the embodiment of the present application, for the convenience of understanding, the second mapping table is shown in the form of a graph.

[0224] Figure 11 A schematic diagram of a mapping relationship between the ambient illuminance, the ambient color temperature, the screen display brightness and the screen color temperature of the electronic device is shown.

[0225] In an embodiment, as shown in Figure 11 the horizontal coordinate is the ambient illuminance, the vertical coordinate is the screen display brightness, and the vertical coordinate is the ambient color temperature. The intersection of the horizontal coordinate, the vertical coordinate and the vertical coordinate is the screen color temperature.

[0226] Specifically, by Figure 11 It can be known that one ambient illuminance, one ambient color temperature and one screen display brightness can correspond to one screen color temperature. Since Figure 11 The data in the table is some discrete data, therefore, in the embodiments of the present application, a three-dimensional linear interpolation method is adopted to obtain the first mapping relationship f(lux, cct, nit) based on the table. Figure 12

[0227] Figure 12 A schematic diagram of confirming a target screen color temperature based on a three-dimensional linear interpolation method is shown.

[0228] In one embodiment, as shown in Figure 12 , the current ambient color temperature, the current ambient illuminance and the current screen display brightness are substituted into the second mapping relationship f(lux, cct, nit), that is, cct = Currentcct1, lux = Currentlux1, and nit = Currentnit1, so that the target screen color temperature can be obtained. That is, the target screen color temperature can be represented by the following formula (2):

[0229] TargetCCT = f(Currentlux1, Currentcct1, Currentnit1) (2)

[0230] Wherein, TargetCCT is the target screen color temperature; Currentlux1 is the current ambient illuminance, Currentcct1 is the current ambient color temperature, and Currentnit1 is the current screen display brightness.

[0231] In other embodiments, the electronic device does not prestore the mapping table between the ambient illuminance, the ambient color temperature and the screen color temperature of the electronic device, but directly prestore the first mapping relationship f(lux, cct, nit). In this way, the electronic device can directly call the first mapping relationship f(lux, cct, nit). Based on this, the calculation amount of the electronic device can be greatly reduced, and the system resources and power consumption of the electronic device are further saved.

[0232] It should be noted that in other embodiments, S506 can also be replaced by S901, and the embodiments of the present application will not be repeated.

[0233] S507, the electronic device determines a target transformation duration according to the current screen color temperature, the target screen color temperature and a third preset relationship.

[0234] ​The current screen color temperature refers to a screen color temperature matched by a display screen of the electronic device with a light environment before the light environment changes. The target transformation duration refers to a transformation duration required for the screen color temperature of the electronic device to transform from the current screen color temperature to the target screen color temperature. Since the electronic device transforms from the current screen color temperature to the target screen color temperature, a plurality of images (for example, N frames of second images or N frames of third images) are displayed. Therefore, the target transformation duration can also be referred to as a display duration of the N frames of second images or a display duration of the N frames of third images.

[0235] In an embodiment, the screen color temperatures of the electronic device in different light environments are stored in a memory of the electronic device. Therefore, the electronic device can directly obtain the current screen color temperature from the memory, which is convenient and fast.

[0236] Optionally, S507 can include: first, the electronic device determines an absolute value of a difference between the current screen color temperature and the target screen color temperature as a variation of the third screen color temperature. Then, the electronic device substitutes the third screen color temperature variation into the second mapping relationship to obtain the target transformation duration.

[0237] The second mapping relationship is a corresponding relationship between a variation of a screen color temperature and a transformation duration. The second mapping relationship can be obtained by processing, by the electronic device, a mapping table of the variation of the screen color temperature and the transformation duration. The mapping table of the variation of the screen color temperature and the transformation duration can be pre-stored in the electronic device. The second mapping relationship can also be referred to as a target mapping relationship.

[0238] For example, the mapping table can be as shown in Table 2.

[0239] Table 2

[0240] Variation amount of screen color temperature Corresponding transformation duration of different variation amounts of screen color temperature Val_1 t1 Val_2 t2 Val_3 t3 Val_4 t4 Val_5 t5

[0241] Figure 13 A schematic diagram of a corresponding relationship between a variation of a screen color temperature and a transformation duration provided by an embodiment of the present application is shown.

[0242] In an embodiment, as shown in Figure 13 the horizontal coordinate is the variation of the screen color temperature, and the vertical coordinate is the transformation duration corresponding to the variation of the different screen color temperatures. Based on the data in Table 2, the corresponding relationship between the variation of the screen color temperature and the transformation duration can be represented by the following formula (3):

[0243]

[0244] where t is the target transformation duration, diff is the variation of the screen color temperature, Val_i is a constant and is the variation of the different screen color temperatures, ti is a constant and is the transformation duration corresponding to the variation of the different screen color temperatures, and i is a positive integer.

[0245] Then, the third screen color temperature change amount TargetACCT is substituted into the above formula (3), i.e., diff = TargetACCT in the above formula (3), so that the target conversion time length t = t target .

[0246] In some other embodiments, the mapping table between the screen color temperature change amount and the conversion time length is not pre-stored in the electronic device, but the second mapping relationship is directly pre-stored. In this way, the electronic device can directly call the second mapping relationship. Based on this, the calculation amount of the electronic device can be greatly reduced, and the system resources and power consumption of the electronic device are further saved.

[0247] Optionally, the image display method provided by the embodiment of the application further needs to perform scene recognition before S507 to determine the target scene corresponding to the change of the light environment in which the electronic device is located.

[0248] Figure 14 Fig. 5 shows a flowchart of an image display method provided by an embodiment of the application.

[0249] In one embodiment, in combination with Figure 5 As shown in Fig. 5, before S507, the image display method provided by the embodiment of the application can further include S1401 and S1402. Figure 14 S1401, the electronic device determines the target scene corresponding to the change of the light environment in which the electronic device is located according to the first ambient light illuminance and the second ambient light illuminance, or the first ambient color temperature and the second ambient color temperature.

[0250] The first ambient color temperature is the ambient color temperature in the first light environment, the first ambient light illuminance is the ambient light illuminance in the first light environment, the second ambient color temperature is the ambient color temperature in the second light environment, and the second ambient light illuminance is the ambient light illuminance in the second light environment. That is, the electronic device compares the ambient light information in the first light environment with the ambient light information in the second light environment, so as to determine the target scene corresponding to the change of the light environment in which the electronic device is located.

[0251]

[0252] ​Specifically, if the second ambient illuminance is greater than the first illuminance and the first ambient illuminance is less than the second illuminance, the target scene is a light-on scene. If the second ambient illuminance is less than the second illuminance and the first ambient illuminance is greater than the first illuminance, the target scene is a light-off scene. If the second ambient illuminance is less than the first illuminance and the first ambient illuminance is greater than the second illuminance, the target scene is an illuminance enhancement scene. If the second ambient illuminance is greater than the second illuminance and the first ambient illuminance is less than the first illuminance, the target scene is an illuminance attenuation scene. If the second ambient color temperature is greater than the first ambient color temperature, the target scene is a color temperature enhancement scene. If the second ambient color temperature is less than the historical ambient color temperature, the target scene is a color temperature attenuation scene. It should be noted that the target scene includes but is not limited to the above.

[0253] The first illuminance is greater than the second illuminance. For example, the first illuminance is 100 lux, and the second illuminance is 30 lux.

[0254] S1402, the electronic device determines a second mapping relationship according to a mapping relationship between the target scene, the scene, the change amount of the screen color temperature, and the conversion time length.

[0255] Specifically, under different scenes, the conversion time length required for the same change amount of the screen color temperature is different. That is, under different scenes, the corresponding relationship between the change amount of the screen color temperature and the conversion time length is different. In other words, when the light environment in which the electronic device is located changes, the corresponding scene is different, and the mapping table of the change amount of the screen color temperature and the conversion time length is different. In this embodiment, according to the target scene, a corresponding table 2 is determined, so as to obtain a second mapping relationship corresponding to the target scene. Based on this, the accuracy of the second mapping relationship obtained is higher, so that the accuracy of the target conversion time length determined according to the current screen color temperature and the target screen color temperature is higher.

[0256] It should be noted that, in the embodiment shown in Figure 6 , Figure 9 S1401 and S1402 can also be included before S508, and details are not repeated here.

[0257] S508, the electronic device determines N color temperature conversion matrices corresponding to N frames of third images respectively according to the target conversion time length, the current screen color temperature, the target screen color temperature, a first color coordinate of a white point under a fourth screen color temperature corresponding to each frame of third image, and a screen parameter.

[0258] The first color coordinate refers to the color coordinate of the white point in the RGB color space. Each color temperature conversion matrix refers to the conversion relationship between the values (i.e., RGB values) of the three primary colors of the white point in each frame of third image under the fourth screen color temperature and the second screen color temperature in the process of the target conversion time length.

[0259] The fourth screen color temperature refers to the initial screen color temperature of each frame of the third image during the non-linear screen color temperature transformation process. The second screen color temperature refers to the final screen color temperature of each frame of the third image during the non-linear screen color temperature transformation process. The initial screen color temperature of each frame is equivalent to the current screen color temperature of each frame, and the final screen color temperature of each frame is equivalent to the target screen color temperature of each frame. In some embodiments, the second screen color temperature of each frame of the third image can be referred to as the non-linear screen color temperature of each frame of the third image.

[0260] Screen parameters can include screen refresh rate and color deviation value. Color deviation value refers to the difference between the color coordinates of the white point in the XYZ color space and the target color temperature. Screen refresh rate refers to the number of times the electronic device's display refreshes the displayed content per unit of time.

[0261] Figure 15 The fifth illustration shows a flowchart of an image display method provided in an embodiment of this application.

[0262] In one embodiment, combined with Figure 5 ,like Figure 15 As shown, the above S508 may include the following S1501-S1503.

[0263] S1501. The electronic device determines the third screen color temperature when displaying each frame of the third image based on the target transformation duration, screen refresh rate, current screen color temperature, and target screen color temperature.

[0264] The third screen color temperature refers to the final screen color temperature of each frame of the third image during the linear transformation of screen color temperature. In some embodiments, the third screen color temperature of each frame of the third image can be referred to as the linear screen color temperature of each frame of the third image.

[0265] Specifically, the electronic device displays one frame of image each time its screen refreshes. Therefore, the total number of frames of the third image to be displayed on the electronic device's screen during the target transformation duration can be expressed by the following formula (4):

[0266] N = t target ×f (4)

[0267] Where N is the total number of frames of the third image to be displayed on the screen of the electronic device during the target conversion time, and N is a positive integer; f is the screen refresh rate of the electronic device; t target The target transition duration is defined as the product of the target transition duration and the screen refresh rate, which determines the total number of image frames N to be displayed by the electronic device within the target transition duration.

[0268] If the screen color temperature of the electronic device is linearly transformed from the current screen color temperature to the target screen color temperature, that is, the electronic device displays each frame of the third image, the change amount of the screen color temperature is the same, and in the target conversion time length, the third screen color temperature of each frame of the third image can be determined in the following manner:

[0269] Firstly, the electronic device determines the difference between the target screen color temperature and the current screen color temperature as the first screen color temperature change amount. Then, the electronic device determines the quotient of the first screen color temperature change amount and the total frame number as the second screen color temperature change amount. Finally, the sum of the first screen color temperature corresponding to each frame of the third image and the third screen color temperature change amount is determined as the third screen color temperature corresponding to each frame of the third image.

[0270] In summary, the first screen color temperature and the third screen color temperature of each frame of the third image to be displayed by the electronic device can be as shown in Table 3:

[0271] Table 3

[0272] Frame number First screen color temperature Third screen color temperature First frame CCT1 CCT1+ΔCCT Second frame CCT1+ΔCCT CCT1+2×ΔCCT …… …… …… Nth frame CCT1+N×ΔCCT CCTN

[0273] Wherein, the first frame is the first frame in the total frame number N, and thus the first screen color temperature CCT1 of the first frame is the current screen color temperature CurrentCCT2. That is, the first screen color temperature CCT1 of the first frame is the current screen color temperature when the electronic device displays the first image. The Nth frame is the last frame in the total frame number N, and thus the third screen color temperature CCTN in the Nth frame is the target screen color temperature TargetCCT. ΔCCT is the average change amount (or the second screen color temperature change amount) of the screen color temperature in the linear transformation process.

[0274] As can be seen from the above, the first screen color temperature refers to the initial screen color temperature of each frame of the third image in the linear transformation process of the screen color temperature. The third screen color temperature refers to the end screen color temperature of each frame of the third image in the linear transformation process of the screen color temperature. From the second frame to the Nth frame, the first screen color temperature of each frame of the image is the third screen color temperature of the previous frame of the image. That is, the first screen color temperature corresponding to the first frame of the Nth frame of the third image is the current screen color temperature, the first screen color temperature corresponding to the Lth frame of the Nth frame of the third image is the linear screen color temperature corresponding to the L-1th frame of the Nth frame of the third image, and L is a positive integer greater than or equal to 2 and less than or equal to N.

[0275] S1502, the electronic device performs nonlinear conversion processing on each third screen color temperature according to the current screen color temperature and the target screen color temperature to obtain each corresponding second screen color temperature.

[0276] The screen color temperature of the electronic device, in the process of transforming from the current screen color temperature to the target screen color temperature, if the linear transformation is adopted, the transformation time required for the same screen color temperature change amount is equal. Thus, the transformation process of the screen color temperature is relatively abrupt, and the user's visual experience is poor.

[0277] Therefore, in the embodiments of the present application, the third screen color temperature corresponding to each third image is nonlinearly converted. Based on this, in the transformation process of the screen color temperature of the electronic device, when the screen color temperature is close to the current screen color temperature and when the screen color temperature is close to the target screen color temperature, the transformation time required for the same screen color temperature change amount is relatively long. Conversely, the transformation time required for the same screen color temperature change amount is relatively short. The following will be introduced in combination with Figure 16 .

[0278] Figure 16 A comparison diagram of nonlinear transformation and linear transformation of screen color temperature provided by the embodiments of the present application is shown.

[0279] In an embodiment, as Figure 16 shown, the straight line (i.e. linear color temperature change line) represents that the transformation process of the screen color temperature is a linear transformation process. At this time, the transformation time required for the same screen color temperature change amount is equal. The curve (nonlinear color temperature change curve) represents that the transformation process of the screen color temperature is a nonlinear transformation process. At this time, when the screen color temperature of the electronic device is close to the current screen color temperature and when the screen color temperature of the electronic device is close to the target screen color temperature, the transformation time required for the same screen color temperature change amount is relatively long. However, when the screen color temperature of the electronic device is far away from the current screen color temperature and the target screen color temperature, the transformation time required for the same screen color temperature change amount is relatively short.

[0280] That is, when the transformation process of the screen color temperature is a nonlinear transformation process, the screen color temperature stays for a relatively long time when it is close to the current screen color temperature, the screen color temperature stays for a relatively long time when it is close to the target screen color temperature, and the screen color temperature stays for a relatively short time when it is far away from the current screen color temperature and the target screen color temperature. In this way, the screen color temperature perceived by the user is mainly the current screen color temperature and the target screen color temperature, so that the whole transformation process is relatively natural and smooth.

[0281] In an embodiment, the electronic device substitutes the current screen color temperature, the target screen color temperature and each third screen color temperature into the nonlinear conversion formula to obtain each second screen color temperature corresponding thereto.

[0282] Exemplarily, the nonlinear conversion formula can be represented by the following formula (5) to formula (8):

[0283]

[0284]

[0285]

[0286]

[0287] wherein, noLinearTargetCCT is the second screen color temperature corresponding to each frame of the third image; TargetCCT is the target screen color temperature; CurrentCCT2 is the current screen color temperature; t is the target transform duration; K is the non-linear change rate of the screen color temperature. target is the target transform duration; K is the non-linear change rate of the screen color temperature.

[0288] It should be noted that, from the second frame of the third image, the fourth screen color temperature of each frame of the third image is equivalent to the second screen color temperature of the previous frame of the third image. Therefore, the electronic device determines that the second screen color temperature of each frame of the third image is equivalent to the fourth screen color temperature of the next frame of the third image. That is, the fourth screen color temperature of the Mth frame of the third image is the non-linear screen color temperature of the M-1th frame of the third image, M is a positive integer greater than or equal to 2 and less than N.

[0289] For the first frame of the third image, the fourth screen color temperature of the first frame of the third image can still be calculated according to the above formula (5)-formula (8).

[0290] Figure 17 An effect diagram of screen color temperature transformation provided in the embodiment of the present application is shown.

[0291] As shown in Figure 17 , the horizontal axis is time, and the vertical axis is the change amount of the screen color temperature. Among them, curve 1 represents that when the change amount of the screen color temperature is 1000K, the required time is 1 second. Curve 2 represents that when the change amount of the screen color temperature is 2000K, the required time is 2 seconds. Curve 3 represents that when the change amount of the screen color temperature is 3000K, the required time is 3 seconds. Curve 4 represents that when the change amount of the screen color temperature is 4000K, the required time is 4 seconds. Curve 5 represents that when the change amount of the screen color temperature is 5000K, the required time is 5 seconds.

[0292] It can be seen that in the image display method provided in the embodiment of the present application, in the process of changing the screen color temperature from the current screen color temperature to the target screen color temperature: the time required for different screen color temperature change amounts is different, and the screen color temperature change rate (that is, the ratio between the change amount of the screen color temperature and the required time) is fixed. Based on this, the electronic device will be more comfortable and stable during the entire screen color temperature change process, improving the user's visual experience.

[0293] S1503. The electronic device determines N color temperature conversion matrices based on the color temperature of each second screen, the color deviation value, and the first color coordinates of the white point at the color temperature of the fourth screen corresponding to each frame of the image.

[0294] The calculation process for each color temperature conversion matrix is ​​the same. The following section combines... Figure 18 The calculation process for each color temperature conversion matrix is ​​explained.

[0295] Figure 18 The sixth illustration shows a flowchart of an image display method provided in an embodiment of this application.

[0296] Optional, combined Figure 15 ,like Figure 18 As shown, the above S1503 may include the following S1801-S1806:

[0297] S1801. The electronic device obtains the values ​​of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image based on the first color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image.

[0298] Specifically, S1801 may include the following steps:

[0299] First, the electronic device obtains the first color coordinates of the white point at the fourth screen color temperature corresponding to each frame of the third image. Then, it converts these first color coordinates into the sixth color coordinates of the white point at the same fourth screen color temperature. The sixth color coordinate refers to the color coordinates of the white point in the xy coordinate system of the XYZ color space at the fourth screen color temperature. In other words, at the fourth screen color temperature, the electronic device transforms the color coordinates of the white point from the RGB color space to the xy coordinate system of the XYZ color space.

[0300] For example, the electronic device substitutes the first color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image into the fourth coordinate transformation formula to obtain the sixth color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image. The fourth coordinate transformation formula can be expressed by the following formula (9):

[0301]

[0302] Where (r1, g1, b1) are the first color coordinates of the white point corresponding to each frame of the third image; (x1, y1) are the sixth color coordinates of the white point corresponding to each frame of the third image. This is the transformation matrix between RGB color coordinates and XYZ color coordinates.

[0303] Then, the electronic device converts the sixth color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image according to the relationship between the sixth color coordinate of the white point and the value of the three primary colors of the white point (i.e., the XYZ value), to obtain the value of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image.

[0304] For example, the relationship between the sixth color coordinate of the white point and the value of the three primary colors of the white point can be represented by the following formulas (10)-(12):

[0305] Y = 1 (10)

[0306]

[0307]

[0308] where (X, Y, Z) is the value of the three primary colors of the white point. By substituting the sixth color coordinate (x1, y1) of the white point corresponding to each frame of the third image into the above formulas (10)-(12), the value of the three primary colors (X1, Y1, Z1) of the white point at the fourth screen color temperature corresponding to each frame of the third image can be obtained.

[0309] S1802, the electronic device substitutes the value of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image into the gamut conversion formula to obtain the value of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image.

[0310] For example, the gamut conversion formula can be represented by the following formula (13):

[0311]

[0312] where (R, G, B) is the value of the three primary colors of the white point; (X, Y, Z) is the value of the three primary colors of the white point; is a gamut conversion matrix between the XYZ color space and the RGB color space.

[0313] By substituting the value of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image (X1, Y1, Z1) into the above formula (13), the value of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image (R current , G current , B current ) can be obtained.

[0314] S1803, the electronic device determines the second color coordinate of the white point at the second screen color temperature corresponding to each frame of the third image according to the second screen color temperature corresponding to each frame of the third image, the color deviation value, and the third color temperature threshold.

[0315] Specifically, S1803 can include the following steps:

[0316] Firstly, the electronic device substitutes the second screen color temperature corresponding to each frame of the third image into the color coordinate calculation formula to obtain the first preset color coordinates of the white point under the second screen color temperature corresponding to each frame of the third image. The first preset color coordinates refer to the estimated color coordinates of the white point in the xy coordinate system of the XYZ color space under the second screen color temperature.

[0317] For example, the color coordinate calculation formula can be represented by the following formula (14) and formula (15):

[0318]

[0319]

[0320] wherein (x predicted , y predicted ) are the preset color coordinates of the white point under the second screen color temperature corresponding to each frame of the third image. CCTm is the second screen color temperature corresponding to each frame of the third image. H is the second color temperature threshold. A1, A2, A3, B1, B2, C1, C2, C3, D, E1, E2, F, and G are constants.

[0321] According to the size relationship between the second screen color temperature corresponding to each frame of the third image and the second color temperature threshold, one of the formula (14) is selected to calculate x predicted . Specifically, let CCTm in the above formula (14) be the second screen color temperature corresponding to each frame of the third image, and the first preset color coordinates (x predicted_1 , y predicted_1 ) of the white point under the second screen color temperature corresponding to each frame of the third image can be obtained.

[0322] Then, according to the size relationship between the color deviation value and the first threshold value, the electronic device can include performing any one of the following embodiments:

[0323] In one embodiment, if the color deviation value is less than the first threshold value, the electronic device directly determines the first preset color coordinates (x predicted_1 , y predicted_1 ) of the white point under the second screen color temperature corresponding to each frame of the third image as the second color coordinates (x2, y2) of the white point under the second screen color temperature corresponding to each frame of the third image.

[0324] In another embodiment, if the color deviation value is greater than the first threshold value, the electronic device determines the second color coordinates of the white point under the second screen color temperature corresponding to each frame of the third image according to the first preset color coordinates of the white point under the second screen color temperature corresponding to each frame of the third image, the second screen color temperature corresponding to each frame of the third image, the third color temperature threshold, and the color deviation value.

[0325] That is, if the color deviation value is greater than the first threshold value, the first preset color coordinate of the white point at the second screen color temperature corresponding to each frame of the third image needs to be corrected, so as to obtain the second color coordinate of the white point at the second screen color temperature corresponding to each frame of the third image.

[0326] In this embodiment, the correction process of the first preset color coordinate of the white point at the second screen color temperature corresponding to each frame of the third image can include the following steps:

[0327] The first step: the electronic device substitutes the first preset color coordinate of the white point at the second screen color temperature corresponding to each frame of the third image into the first coordinate conversion formula, to obtain the third color coordinate of the white point at the second screen color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space.

[0328] For example, the first coordinate conversion formula can be represented by the following formula (16):

[0329]

[0330] Where (u predicted , v predicted ) is the color coordinate of the white point at the second screen color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space. a, b, c, d are constants.

[0331] Substituting the first preset color coordinate (x predicted_1 , y predicted_1 ) of the white point at the second screen color temperature corresponding to each frame of the third image into the above formula (16), the third color coordinate (u3, v3) of the white point at the second screen color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space can be obtained.

[0332] The second step: the sum of the second screen color temperature corresponding to each frame of the third image and the third color temperature threshold value is determined as the second adjustment screen color temperature corresponding to each frame of the third image. The second adjustment screen color temperature is the correction value of the second screen color temperature, which is equivalent to the second screen color temperature. In some embodiments, the second adjustment screen color temperature can become a non-linear adjustment screen color temperature.

[0333] The third step: the electronic device substitutes the second adjustment screen color temperature corresponding to each frame of the third image into the color coordinate calculation formula, to obtain the second preset color coordinate of the white point at the second screen adjustment color temperature corresponding to each frame of the third image.

[0334] According to the size relationship between the second adjustment screen color temperature corresponding to each frame of the third image and the second color temperature threshold value, one of the formulas (14) is selected to calculate x predictedSpecifically, by setting CCTm in the above formula (14) to the second adjusted screen color temperature corresponding to the third image in each frame, we can obtain the second preset color coordinates (x, y, x) of the white point under the second screen color temperature corresponding to the third image in each frame. predicted_2 y predicted_2 ).

[0335] Fourth step: The electronic device substitutes the second preset color coordinates of the white point corresponding to the second screen under the adjusted color temperature of each frame of the third image into the first coordinate transformation formula to obtain the fourth color coordinates of the white point corresponding to the second screen under the adjusted color temperature of each frame of the third image in the XYZ color space uv coordinate system.

[0336] The second preset color coordinates (x) of the white point under the second adjusted screen color temperature corresponding to the third image of each frame are set to the second preset color coordinates (x). predicted_2 y predicted_2 Substituting into the above formula (16), we can obtain the fourth color coordinates (u4, v4) of the white point corresponding to the second screen color temperature of each frame of the third image in the XYZ color space uv coordinate system.

[0337] Fifth step: The electronic device determines the second color coordinates of the white point at the second screen color temperature corresponding to each frame of the third image based on the third color coordinates corresponding to each frame of the third image, the fourth color coordinates corresponding to each frame of the third image, and the color deviation value.

[0338] In this step: First, the electronic device determines the difference between u3 in the third color coordinates and u4 in the fourth color coordinates corresponding to each frame of the third image as the first change amount du (i.e., du = u4 - u3). Second, the electronic device determines the difference between v3 in the third color coordinates and v4 in the fourth color coordinates corresponding to each frame of the third image as the second change amount dv (i.e., dv = v4 - v3). Third, the electronic device calculates the first ratio radio between the first change amount du and the second change amount dv corresponding to each frame of the third image (i.e.,... Next, the electronic device determines the fifth color coordinates (u_target, v_target) of the white point at the second screen color temperature corresponding to each frame of the third image, based on the color deviation value, the first ratio radio corresponding to each frame of the third image, and the third color coordinates (u3, v3). Finally, the electronic device substitutes the fifth color coordinates (u_target, v_target) of each frame of the third image into the second conversion formula to calculate the second color coordinates (x_target, y_target) of the white point at the second screen color temperature corresponding to each frame of the third image. Here, the fifth color coordinates are the corrected third color coordinates.

[0339] Specifically, the process by which an electronic device determines the fifth color coordinates of the white point at the second screen color temperature corresponding to each frame of the third image in the XYZ color space's uv coordinate system can include:

[0340] Firstly, the electronic device substitutes the color deviation value and the first ratio radio corresponding to each frame of the third image into the third conversion formula to calculate a third variation du_new of u3 in the third color coordinate and u4 in the fourth color coordinate corresponding to each frame of the third image, and a fourth variation dv_new of v3 in the third color coordinate and v4 in the fourth color coordinate corresponding to each frame of the third image. The third variation du_new is the corrected first variation du. The fourth variation dv_new is the corrected second variation dv.

[0341] For example, the third conversion formula can be represented by the following formula (17):

[0342]

[0343] wherein du_new is the third variation corresponding to each frame of the third image. dv_new is the fourth variation corresponding to each frame of the third image. radio is the first ratio corresponding to each frame of the third image. Duv is the color deviation value.

[0344] Then, the electronic device determines the sum of u3 in the third color coordinate corresponding to each frame of the third image and the third variation du_new corresponding to each frame of the third image as u_target in the fifth color coordinate corresponding to each frame of the third image. Meanwhile, the electronic device determines the sum of v3 in the third color coordinate corresponding to each frame of the third image and the fourth variation dv_new corresponding to each frame of the third image as v_target in the fifth color coordinate corresponding to each frame of the third image.

[0345] For example, the second conversion formula can be represented by the following formula (18):

[0346]

[0347] wherein (x_target, y_target) is the second color coordinate of the white point under the second screen color temperature corresponding to each frame of the third image; (u_target, v_target) is the fifth color coordinate corresponding to each frame of the third image; f, g, h, m are constants.

[0348] S1804, the electronic device obtains the values of the three primary colors of the white point under the second screen color temperature corresponding to each frame of the third image according to the second color coordinate of the white point under the second screen color temperature corresponding to each frame of the third image.

[0349] Specifically, the electronic device substitutes the second color coordinate (x_target, y_target) of the white point at the second screen color temperature corresponding to each frame of the third image into the above formula (10) to formula (12), and can obtain the value (X2, Y2, Z2) of the three primary colors of the white point at the second screen color temperature corresponding to each frame of the third image.

[0350] S1805, the electronic device substitutes the value of the three primary colors of the white point at the second screen color temperature corresponding to each frame of the third image into the color gamut conversion formula, and obtains the value of the three primary colors of the white point at the second screen color temperature corresponding to each frame of the third image.

[0351] Specifically, the electronic device substitutes the value (X2, Y2, Z2) of the three primary colors of the white point at the second screen color temperature corresponding to each frame of the third image into the above formula (13), and can obtain the value (R, G, B) of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image. target target target

[0352] S1806, the electronic device obtains the color temperature conversion matrix corresponding to each frame of the third image according to the value of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image and the value of the three primary colors of the white point at the second screen color temperature corresponding to each frame of the third image.

[0353] Specifically, S1806 can include: first, the electronic device calculates three second ratios R, G, B between the value of the three primary colors of the white point at the second screen color temperature corresponding to each frame of the third image and the value of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image. Wherein, the three second ratios are respectively: gain gain gain Then, the electronic device obtains the color temperature conversion matrix corresponding to each frame of the third image according to the three second ratios R, G, B corresponding to each frame of the third image. gain gain gain

[0354] Exemplarily, the color temperature conversion matrix is:

[0355]

[0356] It should be noted that in any of the above embodiments, S509 can also include S1501-S1503, which will not be described herein.

[0357] ​​​​​​​​​S509. After displaying the first image, the electronic device processes each frame of the third image using the color temperature conversion matrix corresponding to each frame of the third image, obtaining N frames of second images respectively, and displays the N frames of second images one by one.

[0358] Specifically, processing each frame of the third image using the color temperature conversion matrix corresponding to each frame of the third image can include: the electronic device adjusting the RGB value of each pixel in each frame of the third image based on each color temperature conversion matrix to obtain the second image corresponding to each frame of the third image.

[0359] After the above processing, the RGB values ​​of the last frame of the second image displayed on the electronic device match the changed second lighting environment. Therefore, when users browse the target image in the current lighting environment, their eyes will not experience symptoms such as eye strain, thus reducing visual fatigue. Simultaneously, the changed color temperature of the target screen on the electronic device matches the changed second lighting environment, and the screen color temperature of the electronic device changes non-linearly throughout the entire process. This makes the entire change in screen color temperature smooth and unobtrusive, resulting in a better visual experience for the user.

[0360] like Figure 19 As shown in the illustration, this application also provides a chip system. The chip system 2000 includes at least one processor 2010 and at least one interface circuit 2020. The at least one processor 2010 and the at least one interface circuit 2020 are interconnected via lines. The processor 2010 is used to support an electronic device in implementing the various steps in the above method embodiments, and the at least one interface circuit 2020 can be used to receive signals from other devices (e.g., memory) or to send signals to other devices (e.g., a communication interface). The chip system may include a chip and may also include other discrete devices.

[0361] This application also provides a computer storage medium including instructions that, when executed on the electronic device, cause the electronic device to perform the steps in the above method embodiments.

[0362] This application also provides a computer program product including instructions that, when executed on the electronic device, cause the electronic device to perform the steps in the method embodiments described above.

[0363] The technical effects of the chip system, computer storage medium, and computer program product are similar to those in the preceding method embodiments.

[0364] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0365] Those skilled in the art can clearly understand that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software manner depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0366] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and module can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0367] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are merely schematic, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be through some interface, indirect coupling or communication connection between devices or modules, which can be electrical, mechanical or other forms.

[0368] The modules described as separate components can or can not be physically separated, and the components displayed as modules can or can not be physical modules, that is, they can be located in one device, or can be distributed to multiple devices. According to actual needs, part or all of the modules can be selected to achieve the purpose of the embodiment.

[0369] In addition, each functional module in each embodiment of the present application can be integrated in one device, or each module can exist physically alone, or two or more modules can be integrated in one device.

[0370] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by using a software program, 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 application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer storage medium or transmitted from one computer storage medium to another computer 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 through a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer storage medium can be any available medium that can be accessed by a computer or data storage device including one or more servers, data centers, etc. integrated with the medium. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0371] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. An image display method, characterized in that, Applied to electronic devices, the method includes: A first image is displayed under a first lighting environment. The RGB values ​​of the first image are matched with the first lighting environment in which the electronic device is located. The ambient light information is different under different lighting environments. The ambient light information includes ambient illuminance and ambient color temperature. The light environment in which the electronic device is located changes from the first light environment to the second light environment, and the target screen color temperature corresponding to the target light information is obtained; wherein, the target light information includes ambient light information under the second light environment, and the target screen color temperature matches the second light environment; After displaying the first image, N frames of the second image are displayed one by one, and the screen color temperature is adjusted frame by frame according to the non-linear color temperature change curve during the display of the N frames of the second image, until the screen color temperature of the electronic device reaches the target screen color temperature when the electronic device displays the Nth frame of the second image. Wherein, each frame of the second image is obtained by processing each frame of the third image using a corresponding color temperature conversion matrix; each frame of the third image is the original image of the corresponding frame of the second image; the nonlinear color temperature change curve includes the nonlinear screen color temperature corresponding to each frame of the third image, which is obtained by using the current screen color temperature when the electronic device displays the first image and the target screen color temperature, and performing nonlinear processing on the linear screen color temperature corresponding to the third image; the linear screen color temperature corresponding to the third image is included in the linear color temperature change line, which is obtained based on the current screen color temperature, the target screen color temperature and the display duration of the N frames of the second image.

2. The method according to claim 1, characterized in that, The target light information also includes: the screen display brightness of the electronic device under the second light environment.

3. The method according to claim 1 or 2, characterized in that, The acquisition of the target screen color temperature corresponding to the target light information includes: The target light information is substituted into the first mapping relationship to obtain the target screen color temperature; wherein, the first mapping relationship indicates the mapping relationship between multiple sets of light information and screen color temperature.

4. The method according to claim 3, characterized in that, Before acquiring the target screen color temperature corresponding to the target light information, the method further includes: The target mapping table is linearly interpolated to obtain the first mapping relationship; wherein the target mapping table is a mapping table between the light information and the screen color temperature.

5. The method according to claim 1 or 2, characterized in that, Before displaying the N frames of the second image frame by frame, the method further includes: Substituting the absolute value of the difference between the target screen color temperature and the current screen color temperature into the second mapping relationship, the display duration of the N frames of the second image is obtained; wherein, the second mapping relationship is the mapping relationship between the change in screen color temperature and the transformation duration.

6. The method according to claim 5, characterized in that, Before substituting the absolute value of the difference between the target screen color temperature and the current screen color temperature into the second mapping relationship to obtain the display duration of the N frames of the second image, the method further includes: The target scene corresponding to the change in light environment is determined based on the first ambient illuminance and the second ambient illuminance, or the first ambient color temperature and the second ambient color temperature; wherein, the first ambient color temperature is the ambient color temperature under the first light environment, the first ambient illuminance is the ambient illuminance under the first light environment, the second ambient color temperature is the ambient color temperature under the second light environment, and the second ambient illuminance is the ambient illuminance under the second light environment. The second mapping relationship is determined based on the target scene, the mapping relationship between the scene and the change in screen color temperature and the transformation time.

7. The method according to claim 6, characterized in that, The step of determining the target scene corresponding to the change in light environment based on the first ambient illuminance and the second ambient illuminance, or the first ambient color temperature and the second ambient color temperature, includes: If the second ambient illuminance is greater than the first illuminance, and the first ambient illuminance is less than the second illuminance, then the target scene is a scene with the lights on; wherein, the first illuminance is greater than the second illuminance; If the second ambient light intensity is less than the second illuminance and the first ambient light intensity is greater than the first illuminance, then the target scene is a scene with the lights off. If the second ambient illuminance is less than the first illuminance, and the first ambient illuminance is greater than the second illuminance, then the target scene is an illuminance-enhanced scene. If the second ambient light intensity is greater than the second illuminance and the first ambient light intensity is less than the first illuminance, then the target scene is a scene with reduced illuminance. If the second ambient color temperature is greater than the first ambient color temperature, then the target scene is a color temperature enhanced scene; If the second ambient color temperature is lower than the first ambient color temperature, then the target scene is a scene with reduced color temperature.

8. The method according to claim 1 or 2, characterized in that, Before displaying the N frames of the second image frame by frame, the method further includes: The product of the display duration and the screen refresh rate is determined as the total number of frames N of the third image displayed by the electronic device during the display duration; The difference between the target screen color temperature and the current screen color temperature is determined as the first screen color temperature change. The quotient of the first screen color temperature change and the total number of frames is determined as the second screen color temperature change. The sum of the changes in the first screen color temperature and the second screen color temperature corresponding to each frame of the third image is determined as the linear screen color temperature corresponding to each frame of the third image. Wherein, the first screen color temperature corresponding to the first frame image in the N-frame third images is the current screen color temperature, and the first screen color temperature corresponding to the L-th frame image in the N-frame third images is the linear screen color temperature corresponding to the (L-1)-th frame image in the N-frame third images, where L is a positive integer greater than or equal to 2 and less than or equal to N.

9. The method according to claim 1 or 2, characterized in that, Before displaying the N frames of the second image frame by frame, the method further includes: Substituting the current screen color temperature, the target screen color temperature, and the linear screen color temperature corresponding to each frame of the third image into the nonlinear conversion formula, we obtain the nonlinear screen color temperature corresponding to each frame of the third image. The nonlinear transformation formula is as follows: in, The non-linear screen color temperature corresponding to the third image in each frame; Target screen color temperature; The current screen color temperature; The linear screen color temperature corresponding to the third image in each frame; This represents the non-linear rate of change of the screen's color temperature.

10. The method according to claim 1 or 2, characterized in that, Before displaying the N frames of the second image frame by frame, the method further includes: Based on the nonlinear screen color temperature and color deviation value corresponding to each frame of the third image, and the first color coordinate of the white point under the fourth screen color temperature corresponding to each frame of the third image, N color temperature conversion matrices are determined. Wherein, the first color coordinate is the color coordinate of the white point in the RGB color space; the fourth screen color temperature of the third image in the Mth frame is the non-linear screen color temperature of the third image in the (M-1)th frame, and M is a positive integer greater than or equal to 2 and less than N.

11. The method according to claim 10, characterized in that, The step of determining N color temperature conversion matrices based on the nonlinear screen color temperature, color deviation value, and the first color coordinates of the white point under the fourth screen color temperature corresponding to each frame of the third image includes: Based on the first color coordinates of the white point at the fourth screen color temperature corresponding to the third image of each frame, the XYZ values ​​of the white point at the fourth screen color temperature corresponding to the third image of each frame are obtained. Substitute the XYZ values ​​of the white point at the fourth screen color temperature corresponding to each frame of the third image into the color gamut conversion formula to obtain the RGB values ​​of the white point at the fourth screen color temperature corresponding to each frame of the third image. Based on the nonlinear screen color temperature corresponding to each frame of the third image, the color deviation value, and the third color temperature threshold, the second color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image are determined; wherein, the second color coordinates are: the color coordinates of the white point of each frame of the third image in the xy coordinate system of the XYZ color space under the nonlinear screen color temperature corresponding to each frame of the third image; Based on the second color coordinates of the white point under the nonlinear screen color temperature corresponding to the third image of each frame, the XYZ values ​​of the white point under the nonlinear screen color temperature corresponding to the third image of each frame are obtained. Substitute the XYZ values ​​of the white point under the non-linear screen color temperature corresponding to the third image of each frame into the color gamut conversion formula to obtain the RGB values ​​of the white point under the non-linear screen color temperature corresponding to the third image of each frame. Based on the RGB values ​​of the white point under the fourth screen color temperature corresponding to the third image of each frame and the RGB values ​​of the white point under the non-linear screen color temperature corresponding to the third image of each frame, the color temperature conversion matrix corresponding to the third image of each frame is obtained. The color gamut conversion formula is as follows: Where (R, G, B) are RGB values; (X, Y, Z) are XYZ values; This is the color gamut conversion matrix between the XYZ color space and the RGB color space.

12. The method according to claim 11, characterized in that, The step of determining the second color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image, based on the nonlinear screen color temperature corresponding to each frame of the third image, the color deviation value, and the third color temperature threshold, includes: Substituting the nonlinear screen color temperature corresponding to each frame of the third image into the color coordinate calculation formula, the first preset color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image are obtained; wherein, the first preset color coordinates are: the estimated color coordinates of the white point of each frame of the third image in the xy coordinate system of the XYZ color space under the nonlinear screen color temperature corresponding to each frame of the third image; If the color deviation value is less than the first threshold, then the first preset color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image is determined as the second color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image. If the color deviation value is greater than the first threshold, then the second color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image is determined based on the first preset color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image, the nonlinear screen color temperature corresponding to each frame of the third image, the third color temperature threshold, and the color deviation value. The formula for calculating the color coordinates is as follows: in,( , () represents the preset color coordinates of the white point under the non-linear screen color temperature corresponding to the third image in each frame; The second screen color temperature corresponds to the third image in each frame; A1, A2, A3, B1, B2, C1, C2, C3, D, E1, E2, F, and G are constants; H is the second color temperature threshold.

13. The method according to claim 12, characterized in that, The step of determining the second color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image based on the first preset color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image, the nonlinear screen color temperature corresponding to each frame of the third image, the third color temperature threshold, and the color deviation value includes: Substitute the first preset color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image into the first coordinate transformation formula to obtain the third color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space. The sum of the nonlinear screen color temperature corresponding to the third image in each frame and the third color temperature threshold is determined as the nonlinear adjusted screen color temperature corresponding to the third image in each frame; wherein, the nonlinear adjusted screen color temperature is the correction value of the nonlinear screen color temperature. Substitute the non-linear screen color temperature corresponding to the third image of each frame into the color coordinate calculation formula to obtain the second preset color coordinate of the white point under the non-linear screen color temperature corresponding to the third image of each frame. Substitute the second preset color coordinates of the white point under the non-linear screen color temperature adjustment corresponding to each frame of the third image into the first coordinate transformation formula to obtain the fourth color coordinates of the white point under the non-linear screen color temperature adjustment corresponding to each frame of the third image in the XYZ color space uv coordinate system. Based on the third color coordinates corresponding to each frame of the third image, the fourth color coordinates corresponding to each frame of the third image, and the color deviation value, the second color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image are determined. The first coordinate transformation formula is: ; in,( , ) represents the color coordinates of the white point corresponding to the nonlinear screen color temperature of the third image in each frame in the uv coordinate system of the XYZ color space; a, b, c, and d are constants.

14. The method according to claim 13, characterized in that, The step of determining the second color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image based on the third color coordinates corresponding to each frame of the third image, the fourth color coordinates corresponding to each frame of the third image, and the color deviation value includes: The third color coordinates corresponding to the third image of each frame With the fourth color coordinate The difference is determined as the first variable; The third color coordinates corresponding to the third image of each frame With the fourth color coordinate The difference is determined as the second variable; Calculate the first ratio between the first change and the second change corresponding to each frame of the third image; Based on the color deviation value, the first ratio corresponding to each frame of the third image, and the third color coordinates, the fifth color coordinates of the white point corresponding to the nonlinear screen color temperature of each frame of the third image in the XYZ color space uv coordinate system are determined; wherein, the fifth color coordinates are the corrected third color coordinates. Substitute the fifth color coordinates corresponding to the third image of each frame into the second conversion formula to calculate the second color coordinates of the white point under the non-linear screen color temperature corresponding to the third image of each frame. The second conversion formula is: ; in,( , () represents the second color coordinates of the white point under the non-linear screen color temperature corresponding to the third image in each frame; , ) represents the fifth color coordinates corresponding to the third image in each frame; f, g, h, and m are constants.

15. The method according to claim 14, characterized in that, The step of determining the fifth color coordinates of the white point at the second screen color temperature corresponding to each frame of the third image in the XYZ color space's uv coordinate system based on the color deviation value, the first ratio corresponding to each frame of the third image, and the third color coordinates includes: Substituting the color deviation value and the first ratio corresponding to each frame of the third image into the third conversion formula, the third color coordinates corresponding to each frame of the third image are calculated. With the fourth color coordinate The third change, and the third color coordinates corresponding to the third image in each frame. With the fourth color coordinate The fourth change; wherein the third change is the corrected first change, and the fourth change is the corrected second change; The third color coordinates corresponding to the third image of each frame The sum of the third changes corresponding to each frame of the third image is determined as the fifth color coordinates corresponding to each frame of the third image. ; The third color coordinates corresponding to the third image of each frame The sum of the fourth changes corresponding to each frame of the third image is determined as the fifth color coordinate of each frame of the third image. ; The third conversion formula is as follows: ; in, The third change amount corresponding to the third image in each frame; The fourth change amount corresponding to each frame of the third image; The first ratio corresponding to the third image in each frame; This refers to the color deviation value.

16. The method according to any one of claims 11-15, characterized in that, The step of obtaining the XYZ values ​​of the white point at the fourth screen color temperature corresponding to each frame of the third image based on the first color coordinates of the white point at the fourth screen color temperature includes: Substituting the first color coordinate of the white point under the fourth screen color temperature corresponding to each frame of the third image into the fourth coordinate transformation formula, we obtain the sixth color coordinate of the white point under the fourth screen color temperature corresponding to each frame of the third image; wherein, the sixth color coordinate is: the color coordinate of the white point in the xy coordinate system of the XYZ color space under the fourth screen color temperature. Based on the relationship between the sixth color coordinates of the white point and the XYZ values ​​of the white point, the sixth color coordinates of the white point under the fourth screen color temperature corresponding to each frame of the third image are transformed to obtain the XYZ values ​​of the white point under the fourth screen color temperature corresponding to each frame of the third image. The fourth coordinate transformation formula is as follows: in,( , , ) represents the first color coordinates of the white point corresponding to the third image in each frame; , () represents the sixth color coordinate of the white point corresponding to the third image in each frame; This is the transformation matrix between RGB color coordinates and XYZ color coordinates.

17. The method according to claim 11, characterized in that, The step of obtaining the color temperature conversion matrix corresponding to each frame of the third image based on the RGB values ​​of the white point under the fourth screen color temperature corresponding to each frame of the third image and the RGB values ​​of the white point under the non-linear screen color temperature corresponding to each frame of the third image includes: Calculate three second ratios between the RGB value of the white point at the non-linear screen color temperature corresponding to the third image of each frame and the RGB value of the white point at the fourth screen color temperature corresponding to the third image of each frame; wherein the three second ratios are as follows: , , ; ( , , ) represents the RGB value of the white point under the non-linear screen color temperature corresponding to the third image in each frame. , , () represents the RGB value of the white point at the fourth screen color temperature corresponding to the third image in each frame; Based on the three second ratios corresponding to each frame of the image, the color temperature conversion matrix corresponding to each frame of the image is obtained; The color temperature conversion matrix is ​​as follows: 。 18. The method according to claim 1 or 2, characterized in that, The step-by-step display of N frames of the second image includes: The RGB values ​​of each pixel in each frame of the third image are adjusted using each of the aforementioned color temperature conversion matrices to obtain each frame of the second image; Display the second image in each frame.

19. The method according to claim 1 or 2, characterized in that, Before acquiring the target screen color temperature corresponding to the target light information, the method further includes: The current ambient illuminance and current ambient color temperature of the light environment in which the electronic device is located are obtained; wherein, the current ambient illuminance is the ambient illuminance of the light environment in which the electronic device is located at the current acquisition time, and the current ambient color temperature is the ambient color temperature of the light environment in which the electronic device is located at the current acquisition time; The absolute value of the difference between the current ambient illuminance and the historical ambient illuminance is determined as the change in ambient illuminance, and the absolute value of the difference between the current ambient color temperature and the historical ambient color temperature is determined as the change in ambient color temperature; wherein, the historical ambient illuminance is the ambient illuminance at the historical acquisition time, the historical ambient color temperature is the ambient color temperature at the historical acquisition time, and the historical acquisition time is the acquisition time before the current acquisition time. Based on the fact that the change in ambient illuminance exceeds the illuminance threshold, and / or the change in ambient color temperature exceeds the first color temperature threshold, it is determined that the light environment in which the electronic device is located has changed from the first light environment to the second light environment. Based on the fact that the change in the light environment does not exceed the illuminance threshold and the change in the ambient color temperature does not exceed the first color temperature threshold, the light environment in which the electronic device is located is determined to be the first light environment.

20. The method according to claim 19, characterized in that, The method further includes: Based on the light environment in which the electronic device is located, which is the first light environment, the screen color temperature is not adjusted.

21. The method according to claim 19, characterized in that, The color and color temperature interface of the electronic device includes a preset switch; Obtaining the current ambient illuminance and current ambient color temperature of the light environment in which the electronic device is located, including: When the preset switch is in the ON state, the current ambient illuminance and current ambient color temperature of the light environment in which the electronic device is located are obtained.

22. An electronic device, characterized in that, include: The device comprises a display screen, an ambient light sensor, a processor, and a memory; the display screen is used to display images, the ambient light sensor is used to acquire ambient illuminance and ambient color temperature, and to send the ambient illuminance and ambient color temperature to the processor; the memory stores instructions, and when the processor executes the instructions, the method as described in any one of claims 1-21 is performed.

23. A computer-readable storage medium, characterized in that, Includes instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-21.

Citation Information

Patent Citations

  • Screen color temperature control method and device, storage medium and mobile terminal

    CN111131612A

  • Screen display method and device, readable storage medium and electronic equipment

    CN116453459A