Image display method and electronic equipment

By displaying the second image of N frames frame by frame and adjusting the screen color temperature, the image color distortion and visual fatigue caused by the difference between the screen color temperature of the electronic device and the ambient color temperature are solved, and a better visual experience is achieved.

CN120071786AActive Publication Date: 2025-05-30HONOR DEVICE CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202311588138.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2025-05-30
Estimated Expiration
2043-11-23

AI Technical Summary

Technical Problem

When electronic devices display images, the screen color temperature is different from the ambient color temperature, resulting in image color distortion, increasing user visual fatigue and damaging user's eyes.

Method used

Through an image display method, when the light environment changes, the electronic device displays the second image N frames one by one, and adjusts the screen color temperature according to the nonlinear color temperature change curve until it matches the new light environment.

Benefits of technology

It achieves matching the screen color temperature and the light environment, reduces user visual fatigue and improves user visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120071786A_ABST
    Figure CN120071786A_ABST
Patent Text Reader

Abstract

The invention discloses an image display method and electronic equipment, relates to the field of display, and is used for enabling the screen color temperature of the electronic equipment and the RGB value of an image displayed by the electronic equipment to be matched with the light environment where the electronic equipment is located. The method comprises the following steps: firstly, the electronic equipment displays a first image in a first light environment; then, when the light environment where the electronic equipment is located is changed from the first light environment to a second light environment, the electronic equipment obtains a target screen color temperature corresponding to target light information; and finally, after the electronic equipment displays the first image, displaying the N frames of second images frame by frame, and adjusting the screen color temperature frame by frame according to the nonlinear color temperature change curve in the process of displaying the N frames of second images until the screen color temperature of the electronic equipment reaches the target screen color temperature when the electronic equipment 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 field of display, and in particular, to an image display method and an electronic device. Background Art

[0002] Currently, most electronic devices (such as mobile phones) have a display function, and more and more users browse images (such as pictures or videos, etc.) through electronic devices. During the process of displaying images by electronic devices, due to the large difference between the screen color temperature of the electronic device and the ambient color temperature, the color of the images perceived by users may be distorted (such as the hue of the image being yellowish), and it will also increase the visual fatigue of users and even damage the eyes of users. In short, when the screen color temperature of the electronic device is quite different from the ambient color temperature, it will affect the visual experience of users. Summary of the Invention

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

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

[0005] In a first aspect, an image display method is provided, and the method includes:

[0006] First, the electronic device displays a first image in a first light environment. Among them, the RGB values of the first image match the first light environment where the electronic device is located. The ambient light information is different in different light environments, and the ambient light information may include ambient illuminance and ambient color temperature;

[0007] Next, when the light environment where 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 the target light information. Among them, the target light information may include the ambient light information in the second light environment, and the target screen color temperature matches the second light environment.

[0008] Finally, after the electronic device displays the first image, it displays N frames of second images frame by frame, and adjusts the screen color temperature frame by frame according to the non-linear color temperature change curve during 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 the second image. Among them, each frame of the second image is obtained by processing each frame of the third image using the corresponding color temperature conversion matrix. Each frame of the third image is the original image of the corresponding frame of the second image. The non-linear color temperature change curve includes the non-linear screen color temperature corresponding to each frame of the third image, and the non-linear screen color temperature corresponding to each frame of the third image is obtained by performing non-linear processing on the linear screen color temperature corresponding to the third image using the current screen color temperature and the target screen color temperature when the electronic device displays the first image. 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 duration 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 during the entire change process, the screen color temperature of the electronic device changes non-linearly. In this way, the entire change process of the visual screen color temperature is not abrupt, and the user's visual experience is better. At the same time, each frame of the second image displayed frame by frame on the electronic device is obtained by processing each frame of the third image using the corresponding color temperature conversion matrix. In this way, the RGB values of the last frame of the second image displayed on the electronic device match the second light environment where the electronic device is located. Therefore, when the user browses images in the current light environment, the eyes will not appear symptoms such as soreness, thereby reducing the user's visual fatigue and further improving the user's visual experience.

[0010] In a possible implementation manner of the first aspect, the above target light information may 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 may 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, for the electronic device to obtain the target screen color temperature corresponding to the target light information, it may include: the electronic device substitutes the target light information into the first mapping relationship to obtain the target screen color temperature. Among them, the first mapping relationship indicates the mapping relationship between multiple 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 can directly call 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 and processing.

[0013] In another possible implementation of the first aspect, the above first mapping relationship is not pre-stored in the electronic device. Therefore, before the electronic device obtains the target screen color temperature corresponding to the target light information, it also needs to obtain the first mapping relationship.

[0014] At this time, the above image display method may further include: performing linear interpolation processing on the target mapping table to obtain the first mapping relationship. Wherein, the target mapping table is a mapping table between light information and screen color temperature.

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

[0016] For another example, when the light information includes ambient illuminance, ambient color temperature, and screen display brightness, the target mapping table is a mapping relationship between ambient illuminance, ambient color temperature, and screen display brightness and screen color temperature. At this time, by performing three-dimensional linear interpolation processing on the target mapping table, the first mapping relationship can be obtained.

[0017] In another possible implementation of the first aspect, before displaying the N-frame second images frame by frame, the above image display method may 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-frame second images. Wherein, the second mapping relationship is a mapping relationship between the change amount of the screen color temperature and the transformation duration.

[0018] In another 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-frame second images, the above image display method further includes:

[0019] First, the electronic device determines the target scene corresponding to the change in the light environment according to the first ambient illuminance and the second ambient illuminance, 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 the mapping relationship between the scene, the change amount of the screen color temperature, and the transformation duration. Wherein, the first ambient color temperature is the ambient color temperature in the first light environment, the first ambient illuminance is the ambient 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 illuminance is the ambient illuminance in the second light environment.

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

[0021] In another possible implementation of the first aspect, determining the target scene corresponding to the change in the 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, may include:

[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 the 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 the 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 the 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 the illuminance reduction scene. If the second ambient color temperature is greater than the first ambient color temperature, the target scene is the color temperature enhancement scene. If the second ambient color temperature is less than the first ambient color temperature, the target scene is the color temperature reduction scene. Wherein, the first illuminance is greater than the second illuminance;

[0023] In another possible implementation of the first aspect, before displaying the N frames of the second image frame by frame, the above image display method may further include:

[0024] First, the electronic device determines the product of the display duration and the screen refresh rate as the total number of frames N of the third image displayed by the electronic device during 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 corresponding to each frame of the third image and the second screen color temperature change amount 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 image in the N frames of the third image is the current screen color temperature corresponding to the first image. The first screen color temperature corresponding to the L-th frame image in the N frames of the third image is the linear screen color temperature corresponding to the (L - 1)-th frame image in the N frames of the third image. L is a positive integer greater than or equal to 2 and less than or equal to N.

[0026] In another possible implementation of the first aspect, before displaying the N frames of the second image frame by frame, the above image display method may further include: The electronic device substitutes 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 non-linear conversion formula to obtain the non-linear screen color temperature corresponding to each frame of the third image.

[0027] Wherein, the non-linear conversion formula is:

[0028]

[0029]

[0030]

[0031]

[0032] Among them, noLinearTargetCCT is the non-linear screen color temperature corresponding to the third image of each frame; TargetCCT is the target screen color temperature; CurrentCCT2 is the current screen color temperature; linearTargetCCT is the linear screen color temperature corresponding to the third image of each frame; K is the non-linear change rate of the screen color temperature.

[0033] In another possible implementation manner of the first aspect, before displaying the N frames of the second image frame by frame, the above image display method may further include:

[0034] Determine N color temperature conversion matrices according to the non-linear screen color temperature corresponding to the third image of each frame, the color deviation value, and the first color coordinate of the white point at the fourth screen color temperature corresponding to the third image of each frame. Among them, 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 non-linear screen color temperature of the (M - 1)th frame of the third image, and M is a positive integer greater than or equal to 2 and less than N.

[0035] In another possible implementation manner of the first aspect, the above determination of the N color temperature conversion matrices according to the non-linear screen color temperature corresponding to the third image of each frame, the color deviation value, and the first color coordinate of the white point at the fourth screen color temperature corresponding to the third image of each frame includes:

[0036] First, the electronic device obtains the XYZ values of the white point under the fourth screen color temperature corresponding to each frame of the third image according to the first color coordinates of the white point under the fourth screen color temperature corresponding to each frame of the third image. Secondly, the electronic device substitutes the XYZ values of the white point under 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 under the fourth screen color temperature corresponding to each frame of the third image. Thirdly, the electronic device determines the second color coordinates of the white point under the non-linear screen color temperature corresponding to each frame of the third image according to the non-linear screen color temperature, color deviation value and third color temperature threshold corresponding to each frame of the third image. Then, the electronic device obtains the XYZ values of the white point under the non-linear screen color temperature corresponding to each frame of the third image according to the second color coordinates of the white point under the non-linear screen color temperature corresponding to each frame of the third image. Then, the electronic device substitutes the XYZ values of the white point under the non-linear 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 under the non-linear screen color temperature corresponding to 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 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.

[0037] 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 non-linear screen color temperature corresponding to each frame of the third image.

[0038] The color gamut conversion formula is:

[0039]

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

[0041] In another possible implementation manner of the first aspect, determining the second color coordinates of the white point under the non-linear screen color temperature corresponding to each frame of the third image according to the non-linear screen color temperature, color deviation value and third color temperature threshold corresponding to each frame of the third image may include:

[0042] First, the electronic device substitutes the non-linear 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 at the non-linear screen color temperature corresponding to each frame of the third image. Then, if the color deviation value is less than the first threshold, the electronic device directly determines the first preset color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image as the second color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image. If the color deviation value is greater than the first threshold, the electronic device determines the second color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image according to the first preset color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image, the non-linear screen color temperature corresponding to each frame of the third image, the third color temperature threshold, and the color deviation value.

[0043] Among them, the first preset color coordinate is: the estimated color coordinate of the white point of each frame of the third image in the xy coordinate system of the XYZ color space at the non-linear screen color temperature corresponding to each frame of the third image.

[0044] Among them, the color coordinate calculation formula is:

[0045]

[0046]

[0047] Among them, (x predicted , y predicted ) is the preset color coordinate of the white point at the non-linear 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; A 1 , A 2 , A 3 , B 1 , B 2 , C 1 , C 2 , C 3 , D, E 1 , E 2 , F, G are constants; H is the second color temperature threshold.

[0048] In another possible implementation manner of the first aspect, the above determining the second color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image according to the first preset color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image, the non-linear screen color temperature corresponding to each frame of the third image, the third color temperature threshold, and the color deviation value may include:

[0049] First, the electronic device substitutes the first preset color coordinates of the white point under the non-linear screen color temperature corresponding to each frame of the third image into the first coordinate conversion formula to obtain the third color coordinates of the white point under the non-linear 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 non-linear screen color temperature corresponding to each frame of the third image and the third color temperature threshold as the non-linear adjusted screen color temperature corresponding to each frame of the third image. Thirdly, the electronic device substitutes the non-linear adjusted screen color temperature corresponding to each frame of the third image into the color coordinate calculation formula to obtain the second preset color coordinates of the white point under the non-linear screen adjusted color temperature corresponding to each frame of the third image. Then, the electronic device substitutes the second preset color coordinates of the white point under the non-linear screen adjusted color temperature corresponding to each frame of the third image into the first coordinate conversion formula to obtain the fourth color coordinates of the white point under the non-linear screen adjusted 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 coordinates of the white point under the non-linear screen color temperature corresponding to each frame of the third image according to 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.

[0050] Among them, the above non-linear adjusted screen color temperature is the correction value of the non-linear screen color temperature.

[0051] Among them, the first coordinate conversion formula is:

[0052]

[0053] Among them, (u predicted , v predicted ) are the color coordinates of the white point under the non-linear 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 another possible implementation manner of the first aspect, the above determining the second color coordinates of the white point under the non-linear screen color temperature corresponding to each frame of the third image according to 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 may include:

[0055] First, the electronic device determines the difference between u 3 in the third color coordinates corresponding to each frame of the third image and u 4 in the fourth color coordinates as the first change amount. Secondly, the electronic device determines the difference between v 3 in the third color coordinates corresponding to each frame of the third image and v 4The difference is determined as the second change amount. Again, the electronic device calculates the first ratio between the first change amount corresponding to each frame of the third image and the second change amount. Then, the electronic device determines the fifth color coordinate of the white point under the non-linear 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 the second color coordinate of the white point under the non-linear screen color temperature corresponding to each frame of the third image.

[0056] Among them, the above-mentioned fifth color coordinate is the corrected third color coordinate.

[0057] Among them, the second conversion formula is:

[0058]

[0059] Among them, (x_target, y_target) is the second color coordinate of the white point under the non-linear 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.

[0060] In another possible implementation manner of the first aspect, the determining 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 includes:

[0061] First, 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 the u in the third color coordinate corresponding to each frame of the third image 3 and the u in the fourth color coordinate 4 of the third change amount, and the v in the third color coordinate corresponding to each frame of the third image 3 and the v in the fourth color coordinate 4 of the fourth change amount. Second, the electronic device determines the sum of the u in the third color coordinate corresponding to each frame of the third image 3 and the third change amount corresponding to each frame of the third image as u_target in the fifth color coordinate corresponding to each frame of the third image. Finally, the electronic device determines the sum of the v in the third color coordinate corresponding to each frame of the third image 3 and the fourth change amount corresponding to each frame of the third image as v_target in the fifth color coordinate corresponding to each frame of the third image.

[0062] Among them, the third change amount is the corrected first change amount, and the fourth change amount is the corrected second change amount.

[0063] Among them, the third conversion formula is:

[0064]

[0065] Among them, du_new is the third change amount corresponding to the third image of each frame; dv_new is the fourth change amount corresponding to the third image of each frame; radio is the first ratio corresponding to the third image of each frame; Duv is the color deviation value.

[0066] In another possible implementation manner of the first aspect, obtaining the XYZ value of the white point under the fourth screen color temperature corresponding to each frame of the third image according to the first color coordinate of the white point under the fourth screen color temperature corresponding to each frame of the third image may include:

[0067] First, the electronic device substitutes 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 conversion formula to obtain the sixth color coordinate of the white point under the fourth screen color temperature corresponding to each frame of the third image. Then, the electronic device performs conversion processing on the sixth color coordinate of the white point under 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, so as to obtain the XYZ value of the white point under the fourth screen color temperature corresponding to each frame of the third image.

[0068] Among them, 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.

[0069] Among them, the fourth coordinate conversion formula is:

[0070]

[0071] Among them, (r 1 , g 1 , b 1 ) is the first color coordinate of the white point corresponding to each frame of the third image; (x 1 , y 1 ) is the sixth color coordinate of the white point corresponding to each frame of the third image; is the conversion matrix between the color coordinates in the RGB color space and the color coordinates in the XYZ color space.

[0072] In another possible implementation manner of the first aspect, obtaining the color temperature conversion matrix corresponding to each frame of the third image according to the RGB value of the white point under the fourth screen color temperature corresponding to each frame of the third image and the RGB value of the white point under the non-linear screen color temperature corresponding to each frame of the third image includes:

[0073] First, the electronic device calculates three second ratios between the RGB values of the white point under the non-linear screen color temperature corresponding to each frame of the third image and the RGB values of the white point under 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] Among them, the three second ratios are respectively: (R target , G target , B target ) are the RGB values of the white point under the non-linear 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 another possible implementation manner of the first aspect, the above-mentioned displaying N frames of the second image frame by frame may include: First, the electronic device adjusts the RGB values of each pixel in each frame of the third image corresponding to 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 another possible implementation manner of the first aspect, before the above-mentioned obtaining the target screen color temperature corresponding to the target light information, the above-mentioned image display method may further include:

[0079] First, the electronic device obtains the current ambient illuminance and the current ambient color temperature of the light environment where the electronic device is located. Secondly, 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. Thirdly, the electronic device determines that the light environment where the electronic device is located changes from the first light environment to the second light environment based on the change amount of the ambient illuminance exceeding the illuminance threshold and / or the change amount of the ambient color temperature exceeding the first color temperature threshold. Or, based on the change amount of the light environment not exceeding the illuminance threshold and the change amount of the ambient color temperature not exceeding the first color temperature threshold, it is determined that the light environment where the electronic device is located is the first light environment.

[0080] Wherein, the current ambient illuminance is the ambient illuminance of the light environment where the electronic device is located at the current acquisition moment, and the current ambient color temperature is the ambient color temperature of the light environment where the electronic device is located at the current acquisition moment. The historical ambient illuminance is the ambient illuminance at the historical acquisition moment, and the historical ambient color temperature is the ambient color temperature at the historical acquisition moment. The historical acquisition moment is the previous acquisition moment of the current acquisition moment.

[0081] In another possible implementation manner of the first aspect, the above image display method may further include: based on the light environment where the electronic device is located being the first light environment, the electronic device does not adjust the screen color temperature.

[0082] In another possible implementation manner of the first aspect, the color and color temperature interface of the above electronic device includes a preset switch. The obtaining of the current ambient illuminance and the current ambient color temperature of the light environment where the electronic device is located may include:

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

[0084] In a second aspect, an electronic device is provided, including: 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 obtain the ambient illuminance and the ambient color temperature, and send the ambient illuminance and the ambient color temperature to the processor. Instructions are stored in the memory. When the processor executes the instructions, the method as described in the first aspect and any of its implementation manners is executed.

[0085] In a third aspect, a computer-readable storage medium is provided, including instructions, which when executed on an electronic device, enable the electronic device to execute the method as described in the first aspect and any of its implementation manners.

[0086] In a fourth aspect, a computer program product containing instructions is provided, which when run on the above electronic device, enables the electronic device to execute the method as described in the first aspect and any of its implementation manners.

[0087] In a fifth aspect, a chip system is provided. The chip system includes a processor for supporting the electronic device to implement the functions involved in the first aspect. In a possible design, the electronic device further includes an interface circuit, and the interface circuit can be used to receive signals from other devices (such as a memory), or send signals to other devices (such as a communication interface). The chip system may include chips and may also include other discrete devices.

[0088] Wherein, for the technical effects of the second aspect to the fifth aspect, reference can be made to the technical effects of the first aspect and any of its implementation manners, which will not be elaborated here. Description of the Drawings

[0089] Figure 1 It is a schematic diagram of the display interface of an electronic device in the first light environment in the conventional technology;

[0090] Figure 2 It is a schematic diagram of the display interface of an electronic device in the second light environment in the conventional technology;

[0091] Figure 3 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;

[0092] Figure 4 It is a schematic diagram of the software architecture of an electronic device provided by an embodiment of the present application during operation;

[0093] Figure 5 It is one of the schematic diagrams of the process of an image display method provided by an embodiment of the present application;

[0094] Figure 6 It is another schematic diagram of the process of an image display method provided by an embodiment of the present application;

[0095] Figure 7 It is a schematic diagram of the interface of an electronic device provided by an embodiment of the present application;

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

[0097] Figure 9 It is a third schematic diagram of the process of an image display method provided by an embodiment of the present application;

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

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

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

[0101] Figure 13 It is a schematic diagram of the corresponding relationship between the change amount of the screen color temperature and the transformation duration provided by an embodiment of the present application;

[0102] Figure 14 It is a fourth schematic diagram of the process of an image display method provided by an embodiment of the present application;

[0103] Figure 15 It is a fifth schematic diagram of the process of an image display method provided by an embodiment of the present application;

[0104] Figure 16 A schematic diagram comparing nonlinear transformation and linear transformation of screen color temperature provided in an embodiment of the present application;

[0105] Figure 17 A schematic diagram of the effect of screen color temperature change provided in an embodiment of the present application;

[0106] Figure 18 A sixth flow chart of an image display method provided in an embodiment of the present application;

[0107] Figure 19 A schematic diagram of the structure of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0108] The terms "first", "second", etc. involved in the embodiments of the present application are only used to distinguish features of the same type and cannot be understood as indicating relative importance, quantity, order, etc.

[0109] The terms "exemplary" or "for example" and the like in the embodiments of the present application are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the related concepts in a specific way.

[0110] The terms "coupling" and "connection" involved in the embodiments of the present application should be understood in a broad sense. For example, they may refer to a direct physical connection, or an indirect connection achieved through electronic devices, such as a connection achieved through resistors, inductors, capacitors or other electronic devices.

[0111] First, some concepts involved in the embodiments of the present application are introduced.

[0112] Color temperature: Color temperature is a unit of measurement for the color components in light. It can indicate the color quality of the light source and its unit is K (Kelvin).

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

[0114] Illuminance: Illuminance refers to the luminous flux per unit area of ​​the illuminated object. The unit of illuminance is lux.

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

[0116] RGB color space: The RGB color space is short for the color space of red, green, and blue. The RGB color space can also be called the CIE1931 - RGB system. The RGB color space refers to a spatial system that can quantitatively describe color vision through red, green, and blue. In the RGB color space, colors can be represented in coordinate form.

[0117] XYZ color space: The XYZ color space is a new chromaticity colorimetric system established based on the RGB color space with three imaginary primary light sources X, Y, and Z. The XYZ color space can also be called the CIE1931 - XYZ system. In short, X, Y, and Z in the XYZ color space are a linear transformation of R, G, and B in the RGB color space respectively. X, Y, and Z also represent the concepts of the tristimulus values of the R, G, and B primary colors respectively.

[0118] Currently, most electronic devices (such as mobile phones) have a display function, and more and more users browse images (such as pictures or videos, etc.) through electronic devices. During the process of an electronic device displaying an image, the color temperature of the screen of the electronic device is quite different from the ambient color temperature, which may cause the colors of the image perceived by the user to be distorted (such as the hue of the image being yellowish), increase the user's visual fatigue, and even damage the user's eyes. Generally speaking, when the color temperature of the screen of an electronic device is quite different from the ambient color temperature, it will affect the user's visual experience. Here, an example will be given with the electronic device being a mobile phone.

[0119] Figure 1 Shows a schematic diagram of the display interface of an electronic device in the prior art in a first light environment. As Figure 1 shown, the mobile phone 100 is in a first light environment (such as a low - light environment). The ambient color temperature of the first light environment is relatively low. The display interface 110 of the mobile phone 100 displays a first image 111. The ambient color temperature is low, while the color temperature of the screen of the mobile phone 100 is high ( Figure 1 not shown in the figure), making the hue of the first image 111 visually perceived by the user appear cold (such as having a bluish hue). In this way, when the user browses the first image 111 in the first light environment, it will not only cause the hue of the image perceived by the user to not match the true hue of the image, but also cause symptoms such as soreness in the user's eyes, thus increasing the user's visual fatigue.

[0120] In addition, due to the low ambient color temperature and the high screen color temperature, 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 by the pupil of the eye, causing greater damage to the eyes.

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

[0122] Figure 2 It shows a schematic diagram of the display interface of an electronic device in the second light environment in the conventional technology. As Figure 2 shown, the mobile phone 100 is in the second light environment (such as a bright light environment). The ambient color temperature of the second light environment is relatively high. The display interface 110 of the mobile phone 100 displays the second image 210. The screen color temperature of the mobile phone 100 is relatively low ( Figure 2 not shown in the figure). The ambient color temperature is relatively high, while the screen color temperature of the mobile phone 100 is relatively low, making the hue of the second image 210 perceived by the user tend to be warm (such as tending to be yellowish).

[0123] That is to say, when the ambient color temperature is relatively high and the screen color temperature of the mobile phone 100 is relatively low, it will cause the hue of the image perceived by the user to not match the true hue of the image, which will affect the visual experience of the user when browsing the second image.

[0124] It should be noted that based on the above introduction to the light environment, the bright light environment may be a light environment with the lights turned on in a dark room, a light environment with good outdoor light when the weather is sunny, but is not limited thereto.

[0125] In summary, when the user browses images through an electronic device, if the screen color temperature of the electronic device differs greatly from the ambient color temperature, it will cause the hue of the image perceived by the user to be distorted, increase the user's visual fatigue, and even cause damage to the user's eyes, all of which will seriously affect the user's visual experience.

[0126] To solve the above problems, an embodiment of the present application provides an image display method and an electronic device. When the electronic device is in the lit screen state and the light environment where 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 that matches the changed second light environment according to the ambient illuminance and ambient color temperature in the first light environment. Then, the electronic device can obtain N color temperature transformation matrices corresponding to N original images to be displayed respectively during the process of the electronic device changing the screen color temperature from the current screen color temperature (i.e., the screen color temperature corresponding to the first light environment) to the target screen color temperature according to the target screen color temperature and the current screen color temperature. Next, the electronic device can use each color temperature transformation matrix to process each frame of the original image respectively and display the N target images corresponding to the N frames of the original image 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 during the process of displaying the N 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 target image.

[0127] Thus, on the one hand, the screen color temperature change process of the electronic device provided by the embodiment of the present application is non-linearly changed, so that the whole change process of the screen color temperature is not abrupt, which can improve the user's visual experience. At the same time, the target screen color temperature of the electronic device is jointly determined by the ambient illuminance and ambient color temperature of the changed second light environment, so that the accuracy of the target screen color temperature is relatively high, and thus the target screen color temperature is more matched with the second light environment. On the other hand, the RGB values (or color adaptation degrees) of the target images finally browsed by the user match the changed second light environment. In this way, the user's visual fatigue will be reduced, and the user's visual experience will be further improved. All in all, the electronic device provided by the embodiment of the present application will improve the user's visual experience when browsing images.

[0128] The electronic device involved in the embodiment of the present application can be a device with a display function and a data processing function. The electronic device can be mobile or fixed. The electronic device can be deployed on land (such as indoors or outdoors, handheld or vehicle-mounted, etc.), can also be deployed on the water surface (such as a ship, etc.), and can also be deployed in the air (such as an airplane, a balloon, etc.). The electronic device can be called a user equipment (UE), an access terminal, a terminal unit, a subscriber unit, a terminal station, a mobile station (MS), a mobile platform, a terminal agent or a terminal device, etc. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, etc. The embodiment of the present application does not limit the specific type and structure of the electronic device. A possible structure of the electronic device will be described below.

[0129] Taking the electronic device as a mobile phone as an example, Figure 3The figure shows a schematic diagram of the hardware structure of an electronic device 300 provided by an embodiment of the present application. The electronic device 300 may include: a processor 310, a memory 320, a 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 illustrated in this embodiment does not constitute a specific limitation on the electronic device 300. In other embodiments, the electronic device 300 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0131] The processor 310 may include one or more processing units. For example, the processor 310 may 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. Among them, different processing units may be independent devices or integrated in one or more processors. The controller may be the nerve center and command center of the electronic device 300. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.

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

[0133] In some embodiments, the processor 310 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface 330, etc.

[0134] It can be understood that the interface connection relationships among the modules illustrated in this embodiment are only illustrative descriptions and do not constitute a structural limitation on the electronic device. In some other embodiments, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

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

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

[0137] The communication module 350 can provide solutions for wireless communications applied to the electronic device 300, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSSs), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The communication module 350 can be one or more devices integrating at least one communication processing module. The communication module 350 receives electromagnetic waves via the antenna, frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 310. The communication module 350 can also receive the signals to be sent from the processor 310, frequency-modulate them, amplify them, and convert them into electromagnetic waves through the antenna for radiation.

[0138] In some embodiments, the antenna of the electronic device 300 is coupled to the communication module 350, enabling the electronic device 300 to communicate with the network and other devices through wireless communication technologies. The wireless communication technologies may 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 may 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 the display function through the GPU, the display screen 360, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 360 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs, which execute program instructions to generate or change the display information.

[0140] The display screen 360 is used to display images, videos, etc. The display screen 360 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini-LED, a Micro-OLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.

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

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

[0143] The camera 380 is used to capture static images or videos. An object generates an optical image through the lens and projects it onto the 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 the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in standard RGB, YUV, etc. formats.

[0144] The sensor module 390 can include an ambient light sensor, a pressure sensor, a gravity sensor, etc. Among them, the ambient light sensor can obtain the ambient light information of the light environment where the electronic device is located. The ambient light information can include ambient illuminance, ambient color temperature, etc.

[0145] In some embodiments, an ambient light sensor can acquire all ambient light information such as ambient illuminance and ambient color temperature simultaneously. At this time, the sensor module 390 may include an ambient light sensor. In some other embodiments, an ambient light sensor can acquire one type of ambient light information. At this time, the sensor module 390 may include at least two different types of ambient light sensors to acquire ambient light information such as ambient illuminance and ambient color temperature respectively. In some other embodiments, an ambient light sensor can acquire multiple types of ambient light information. At this time, the sensor module 390 may include at least one different type of ambient light sensor. In the embodiments of the present application, an example is given where an ambient light sensor can acquire all ambient light information simultaneously for introduction.

[0146] It can be understood that generally, for the implementation of the functions of an electronic device, in addition to the support of hardware, software cooperation is also required.

[0147] The software system of an electronic device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present application, taking the Android as an example, the software structure of the electronic device is illustrated by way of example.

[0148] Figure 4 FIG. shows a schematic diagram of the software architecture of an electronic device provided by the embodiments of the present application.

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

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

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

[0152] In some embodiments, the settings application may include a preset switch (such as natural color display). The on / off state of the preset switch is related to whether the application framework layer obtains the ambient illuminance (such as the current ambient illuminance) and the ambient color temperature (such as the current ambient color temperature) from the sensor driver of the kernel layer.

[0153] Exemplarily, the settings application may respond to a user's switch operation to set the on / off state of the preset switch. The settings application may send the on / off state of the preset switch to the application framework layer. For example, the settings application may send the on / off state of the preset switch to the application framework layer at a fixed frequency. Or, the settings application may send the on / off state of the preset switch to the application framework layer after the on / off state of the preset switch changes, but it is not limited thereto.

[0154] Among them, the application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions.

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

[0156] In one embodiment, the color adjustment module may 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 may be a black screen state or a lit screen state. When the screen state is a lit screen state: First, the color adjustment module may obtain the ambient illuminance and the ambient color temperature from the sensor driver of the kernel layer. Then, based on the fact that the light environment of the mobile phone changes from the first light environment to the second light environment, the color adjustment module obtains the screen color temperature of the electronic device in the first light environment from the display driver of the kernel layer. Next, the color adjustment module may obtain N color temperature conversion matrices based on the ambient illuminance, 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 corresponding N frames of original images frame by frame based on each color temperature conversion matrix to obtain N frames of target images that match the changed second light environment, and sends the N frames of target images frame by frame to the display screen for display.

[0157] In another embodiment, the color adjustment module may also obtain the on / off state of the preset switch from the application layer. The on / off state of the preset switch may be an on state or an off state. When the screen state is a lit 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 may also obtain the screen display brightness of the display screen in the second light environment from the display driver at the kernel layer. At this time, the color adjustment module may obtain N color temperature conversion matrices based on the ambient illuminance, ambient color temperature, screen color temperature, screen parameters, and screen display brightness in the second light environment. Other processes remain unchanged, and the embodiments of this application will not be elaborated here.

[0159] Among them, Android Runtime includes core libraries and a virtual machine. Android Runtime is responsible for the scheduling and management of the Android system.

[0160] The core libraries include two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core libraries of Android.

[0161] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0162] The system libraries may include multiple functional modules. For example: surface manager, Media Libraries, 3D graphics processing library (e.g., OpenGL ES), 2D graphics engine (e.g., SGL), etc.

[0163] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0164] The media libraries support the playback and recording of various common audio and video formats, as well as static image files, etc. The media libraries can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0165] The media libraries may include a MediaProvider, which stores the data of multimedia files, such as audio, video, image, and other data.

[0166] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.

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

[0168] Among them, the hardware abstraction layer may include: a display screen hardware abstraction module and a light sensor hardware abstraction module.

[0169] Among them, the kernel layer is the layer between the hardware and the software. The kernel layer may include a display driver and a sensor driver.

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

[0171] Next, in combination with Figures 5 - 19 , an image display method provided by an embodiment of the present application will be introduced. Figure 5 FIG. 10 shows one of the schematic flowcharts of an image display method provided by an embodiment of the present application. As Figure 5 shown, the image display method may include:

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

[0173] Among them, the ambient light information is different in different light environments. The ambient light information may represent the ambient light conditions of the light environment where the electronic device is located. Generally, the ambient light information may include the ambient illuminance and the ambient color temperature.

[0174] Among them, the values of the three primary colors (i.e., RGB values) of the first image match the first light environment where the electronic device is located.

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

[0176] Among them, the current ambient illuminance refers to the ambient illuminance of the light environment where the electronic device is located at the current acquisition moment. The current ambient color temperature refers to the ambient color temperature of the light environment where the electronic device is located at the current acquisition moment.

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

[0178] It should be noted that how the ambient light sensor obtains the ambient illuminance and the ambient color temperature based on the ambient light can refer to the relevant introduction in the prior art, and the embodiments of the present application will not elaborate on this.

[0179] In one embodiment, when the electronic device is in the screen-on state, the ambient light sensor can collect the ambient light of the light environment where the electronic device is located at a fixed frequency, and obtain the ambient illuminance and ambient color temperature based on the ambient light. That is to say, based on the fact that the electronic device is in the screen-on state, the electronic device can obtain the ambient illuminance and ambient color temperature of the light environment where the electronic device is located at different acquisition times, without continuously obtaining the ambient illuminance and ambient color temperature of the light environment where the electronic device is located. In this way, the computational amount 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 ambient color temperature obtained at different acquisition 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, improving the efficiency of the electronic device.

[0181] In another embodiment, when the electronic device is in the screen-off state, the user does not view images through the electronic device. Therefore, 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 to say, when the electronic device is in the screen-off state, the electronic device does not need to execute 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 current ambient color temperature of the light environment where the electronic device is located. In this way, the computational amount 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 FIG. 2 shows a second schematic flowchart of an image display method provided in the embodiments of the present application.

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

[0184] S601. Based on the fact that the preset switch is in the on state, the electronic device obtains the current ambient illuminance and current ambient color temperature of the light environment where 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 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 current ambient color temperature of the light environment where the electronic device is located through the ambient light sensor. Otherwise, the electronic device will not obtain the current ambient illuminance and current ambient color temperature of the light environment where the electronic device is located through the ambient light sensor.

[0187] Among them, the electronic device can respond to the user's operation of turning on or off a preset switch, and switch the on / off state of the preset switch. For example, the preset switch is switched from the on state to the off state, or the preset switch is switched from the off state to the on state. The electronic device can obtain the on / off state of the preset switch at a fixed frequency. Or, when the electronic device determines that the on / off state of the preset switch has changed, it then obtains the on / off state of the preset switch.

[0188] Figure 7 The figure shows a schematic diagram of an interface of an electronic device provided by an embodiment of the present application.

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

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

[0191] In this embodiment, the electronic device can obtain the current ambient illuminance and the current ambient color temperature based on the user's needs, so as to execute the image display method provided by the embodiment 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 reduce the user's visual fatigue, and even reduce the damage to the user's eyes, and finally improve the user's visual experience.

[0192] 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] Among them, the historical ambient illuminance refers to the ambient illuminance of the light environment where the electronic device is located, which is obtained by the ambient light sensor at the historical acquisition moment. The historical ambient color temperature refers to the ambient color temperature of the light environment where the electronic device is located, which is obtained by the ambient light sensor at the historical acquisition moment. The historical acquisition moment is the previous acquisition moment of the current acquisition moment.

[0194] S504. When the change amount of the ambient illuminance of the electronic device does not exceed the illuminance threshold, and the change amount of the ambient color temperature does not exceed the first color temperature threshold, the electronic device determines that the light environment where the electronic device is located is the first light environment.

[0195] Specifically, when the change amount of the ambient illuminance does not exceed the illuminance threshold, and the change amount of the ambient color temperature does not exceed the first color temperature threshold, the electronic device can determine that the light environment where it is located has not changed. Therefore, the electronic device remains in the first light environment.

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

[0197] Among them, the screen color temperature refers to one of the important criteria for measuring the screen color display quality of the display screen of the electronic device. The user's perception of the same screen color will vary with different screen color temperatures.

[0198] Specifically, when the light environment where the electronic device is located has not changed, the electronic device does not need to adjust the screen color temperature of the display screen. At the same time, the electronic device also does not need to adjust the image displayed on the display screen. In this way, not only can system resources be saved, but also the screen color temperature of the electronic device and the image displayed by the electronic device match the light environment where the electronic device is located, improving the visual experience of the user when browsing the image displayed by the electronic device.

[0199] S506. When the change amount of the ambient illuminance of the electronic device exceeds the illuminance threshold, and / or the change amount of the ambient color temperature exceeds the first color temperature threshold, the electronic device obtains the target screen color temperature corresponding to the target light information.

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

[0201] Figure 8 Shows a schematic diagram of a change in the light environment provided by an embodiment of the present application.

[0202] In one embodiment, as Figure 8As shown in A in [reference], the mobile phone 100 is in the third light environment. The ambient illuminance of the third light environment is 60,000 lux (lx), and the ambient color temperature of the third light environment is 4000 correlated color temperature (CCT). Assume that the third light environment is the light environment where the mobile phone 100 was at the previous acquisition moment.

[0203] As Figure 8 shown in B in [reference], the mobile phone 100 is in the fourth light environment. The ambient illuminance of the fourth light environment is 80,000 lx. The ambient color temperature of the fourth environment is 5000 CCT. Assume that the fourth light environment is the light environment where the mobile phone 100 is at the current acquisition moment. It can be seen that the change amount between the ambient illuminance of the fourth light environment and the ambient illuminance of the third light environment is 20,000 lx, and the change amount between the ambient color temperature of the fourth light environment and the ambient color temperature of the third light environment is 1000 CCT. Assume that the illuminance threshold is 70 lx and the first color temperature threshold is 80 CCT. By comparison, it can be known that the change amount between the ambient illuminance of the fourth light environment and the ambient illuminance of the third light environment exceeds the illuminance threshold, and the change amount between the ambient color temperature of the fourth light environment and the ambient color temperature of the third light environment exceeds the color temperature threshold. Therefore, the light environment where the electronic device is located has changed.

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

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

[0206] Figure 9 shows the third schematic flow chart of an image display method provided by an embodiment of the present application.

[0207] In one embodiment, in combination with Figure 5 , such as Figure 9 , the above S506 may be replaced by the following S901.

[0208] S901. When the change amount of the ambient illuminance exceeds the illuminance threshold and / or the change amount of the ambient color temperature exceeds the first color temperature threshold, 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] Among them, the first mapping relationship is used to indicate the mapping relationship between multiple groups of light information and the screen color temperature. Different light information corresponds to different first mapping relationships. The following is introduced in different cases.

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

[0211] In one embodiment, the first mapping relationship may be obtained by the electronic device processing a target mapping table (which may be referred to as the first mapping table) between the ambient illuminance and the ambient color temperature and the screen color temperature of the electronic device in a two-dimensional linear interpolation manner. Among them, the target mapping table between the ambient illuminance and the ambient color temperature and the screen color temperature of the electronic device may be pre-stored in the electronic device.

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

[0213] Table 1

[0214]

[0215] As can be seen from Table 1, an ambient illuminance and an ambient color temperature may correspond to a screen color temperature. Since the data in Table 1 are some discrete data, in the embodiments of the present application, on the basis of Table 1, a two-dimensional linear interpolation method is used to obtain the first preset relationship f(lux, cct).

[0216] Figure 10 Fig. shows a schematic diagram of two-dimensional linear interpolation provided by the embodiments of the present application.

[0217] Exemplarily, as Figure 10 shown, the abscissa is the ambient color temperature, the ordinate is the ambient illuminance, and the intersection point of the abscissa and the ordinate is the screen color temperature. On the basis of Table 1, a two-dimensional linear interpolation method is used to obtain the first preset relationship f(lux, cct).

[0218] Next, substitute the current ambient color temperature and the current ambient illuminance into the first preset relationship f(lux, cct), that is, let cct = Currentcct1 and lux = Currentlux1, then the target screen color temperature can be obtained. That is to say, the target screen color temperature can be expressed by the following formula (1):

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

[0220] Among them, 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 electronic device does not pre-store the mapping table between the above ambient illuminance and ambient color temperature and the screen color temperature of the electronic device, but directly pre-stores the above first mapping relationship f(lux, cct). In this way, the electronic device can directly call the first mapping relationship f(lux, cct). Based on this, the computational load of the electronic device can be greatly reduced, and further, the system resources and power consumption of the electronic device can be saved.

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

[0223] In one embodiment, the first mapping relationship may be obtained by the electronic device processing the target mapping table (which may be referred to as the second mapping table) between the ambient illuminance, ambient color temperature, and screen display brightness and the screen color temperature of the electronic device in a three-dimensional linear interpolation manner. Among them, the target mapping table between the ambient illuminance, ambient color temperature, and screen display brightness and the screen color temperature of the electronic device may be pre-stored in the electronic device. In the embodiments of the present application, for the convenience of understanding, the second mapping table is shown in the form of a figure.

[0224] Figure 11 Shows a schematic diagram of a mapping relationship between the ambient illuminance, ambient color temperature, and screen display brightness and the screen color temperature of the electronic device provided by the embodiments of the present application.

[0225] In one embodiment, as Figure 11 shown, the abscissa is the ambient illuminance, the ordinate is the screen display brightness, and the vertical coordinate is the ambient color temperature. The intersection point of the abscissa, ordinate, and vertical coordinate is the screen color temperature.

[0226] Specifically, from Figure 11 , it can be known that an ambient illuminance, an ambient color temperature, and a screen display brightness can correspond to a screen color temperature. Since Figure 11 the data in is some discrete data, in the embodiments of the present application, on the basis of Figure 12 , the first mapping relationship f(lux, cct, nit) is obtained by using the method of three-dimensional linear interpolation.

[0227] Figure 12 shows a schematic diagram of confirming the target screen color temperature by the method of three-dimensional linear interpolation provided by the embodiments of the present application.

[0228] In one embodiment, as Figure 12 shown, substituting the current ambient color temperature, the current ambient illuminance, and the current screen display brightness into the second mapping relationship f(lux, cct, nit), that is, making cct = Currentcct1, lux = Currentlux1, and nit = Currentnit1, the target screen color temperature can be obtained. That is to say, the target screen color temperature can be expressed 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 above-mentioned ambient illuminance, ambient color temperature, and the mapping table between the ambient color temperature and the screen color temperature of the electronic device are not pre-stored in the electronic device, but the above-mentioned first mapping relationship f(lux, cct, nit) is directly pre-stored. 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 further the system resources and power consumption of the electronic device can be saved.

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

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

[0234] Among them, the current screen color temperature refers to: before the light environment where the electronic device is located changes, the screen color temperature of the display screen of the electronic device that matches the light environment before the change. The target transformation duration refers to: the transformation duration required for the screen color temperature of the electronic device to change from the current screen color temperature to the target screen color temperature. Since the electronic device will display multiple frames of images (such as N frames of second images or N frames of third images) when changing from the current screen color temperature to the target screen color temperature. Therefore, the target transformation duration can also be referred to as: the display duration of N frames of second images, or the display duration of N frames of third images.

[0235] In one embodiment, the screen color temperatures of the electronic device in different light environments are stored in the 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 may include: First, the electronic device determines the absolute value of the difference between the current screen color temperature and the target screen color temperature as the change amount of the third screen color temperature. Then, the electronic device substitutes the change amount of the third screen color temperature into the second mapping relationship to obtain the target transformation duration.

[0237] Among them, the second mapping relationship is the corresponding relationship between the change amount of the screen color temperature and the transformation duration. The second mapping relationship can be obtained after the electronic device processes the mapping table of the change amount of the screen color temperature and the transformation duration. Among them, the mapping table of the change amount 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 the target mapping relationship.

[0238] Exemplarily, the mapping table can be as shown in Table 2:

[0239] Table 2

[0240] Change amount of screen color temperature Transformation duration corresponding to different change amounts of screen color temperature Val_1 t1 Val_2 t2 Val_3 t3 Val_4 t4 Val_5 t5

[0241] Figure 13 Shows a schematic diagram of the corresponding relationship between the change amount of the screen color temperature and the transformation duration provided by the embodiment of the present application.

[0242] In one embodiment, as Figure 13 shown, the abscissa is the change amount of the screen color temperature, and the ordinate is the transformation duration corresponding to different change amounts of the screen color temperature. Based on the data in Table 2, the corresponding relationship between the change amount of the screen color temperature and the transformation duration can be expressed by the following formula (3):

[0243]

[0244] Among them, t is the target transformation duration; diff is the change amount of the screen color temperature; Val_i is a constant, which is different change amounts of the screen color temperature; ti is a constant, which is the transformation duration corresponding to different change amounts of the screen color temperature. i is a positive integer.

[0245] Next, substitute the change amount TargetΔCCT of the color temperature of the third screen into the above formula (3), that is, let diff = TargetΔCCT in the above formula (3), and the target transformation duration t = t can be obtained. target .

[0246] In some other embodiments, the electronic device does not pre-store the mapping table between the change amount of the screen color temperature and the transformation duration, but directly pre-stores the above second mapping relationship. In this way, the electronic device can directly call the second mapping relationship. Based on this, the computational amount of the electronic device can be greatly reduced, and further, the system resources and power consumption of the electronic device can be saved.

[0247] Optionally, for the image display method provided in the embodiments of the present application, before the above S507, scene recognition needs to be performed to determine the target scene corresponding to the change in the light environment where the electronic device is located.

[0248] Figure 14 FIG. 5 shows a schematic flow chart of an image display method provided in an embodiment of the present application.

[0249] In one embodiment, in combination with Figure 5 , as Figure 14 shown, before S507, the image display method provided in the embodiments of the present application may further include S1401 and S1402.

[0250] S1401. The electronic device determines the target scene corresponding to the change in the light environment where the electronic device is located according to the first environmental illuminance and the second environmental illuminance, or the first environmental color temperature and the second environmental color temperature.

[0251] Wherein, the first environmental color temperature is the environmental color temperature in the first light environment, the first environmental illuminance is the environmental illuminance in the first light environment, the second environmental color temperature is the environmental color temperature in the second light environment, and the second environmental illuminance is the environmental illuminance in the second light environment. That is to say, the electronic device compares the environmental light information in the first light environment with the environmental light information in the second light environment, so as to determine the target scene corresponding to the change in the light environment where the electronic device is located.

[0252] Specifically, if the second ambient illumination is greater than the first illumination and the first ambient illumination is less than the second illumination, the target scene is a scene of turning on the light. If the second ambient illumination is less than the second illumination and the first ambient illumination is greater than the first illumination, the target scene is a scene of turning off the light. If the second ambient illumination is less than the first illumination and the first ambient illumination is greater than the second illumination, the target scene is a scene of increasing illumination. If the second ambient illumination is greater than the second illumination and the first ambient illumination is less than the first illumination, the target scene is a scene of decreasing illumination. If the second ambient temperature is greater than the first ambient temperature, the target scene is a scene of increasing color temperature. If the second ambient temperature is less than the historical ambient temperature, the target scene is a scene of decreasing color temperature. It should be noted that the target scene includes but is not limited to this.

[0253] Among them, the first illumination is greater than the second illumination. For example, the first illumination is 100 lux and the second illumination is 30 lux.

[0254] S1402. The electronic device determines a second mapping relationship according to the mapping relationship between the target scene, the change amount of the screen color temperature and the transformation duration for the scene.

[0255] Specifically, in different scenes, the transformation durations required for the same change amount of the screen color temperature are different. That is to say, in different scenes, the corresponding relationship between the change amount of the screen color temperature and the transformation duration is different. Or rather, when the light environment where the electronic device is located changes, the corresponding scenes are different, and the mapping table between the change amount of the screen color temperature and the transformation duration is different. In this embodiment, according to the target scene, the corresponding Table 2 is determined, so as to obtain the second mapping relationship corresponding to the target scene. Based on this, the accuracy of the obtained second mapping relationship is higher, and thus the accuracy of the target transformation duration determined according to the current screen color temperature and the target screen color temperature is higher.

[0256] It should be noted that in Figure 6 、 Figure 9 In the embodiment shown, before S508, S1401 and S1402 may also be included, which will not be elaborated in this embodiment of the present application.

[0257] S508. The electronic device determines N color temperature conversion matrices corresponding to N third images respectively according to the target transformation duration, the current screen color temperature, the target screen color temperature, the first color coordinate of the white point under the fourth screen color temperature corresponding to each frame of the third image, and the screen parameters.

[0258] Among them, 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 of the three primary colors of the white point (i.e., RGB values) in each frame of the third image between the fourth screen color temperature and the second screen color temperature during the target transformation duration.

[0259] Among them, the fourth screen color temperature refers to: the initial screen color temperature of the third image in each frame during the non-linear transformation of the screen color temperature. The second screen color temperature refers to: the ending screen color temperature of the third image in each frame during the non-linear transformation of the screen color temperature. The initial screen color temperature of each frame is equivalent to the current screen color temperature of each frame, and the ending 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] Among them, the screen parameters may include the screen refresh rate and the color deviation value. The color deviation value refers to: the difference value between the color coordinates of the white point in the XYZ color space and the target color temperature. The screen refresh rate refers to: the number of times the display screen of the electronic device refreshes the displayed content per unit time.

[0261] Figure 15 FIG. 5 shows a schematic flow chart of an image display method provided by an embodiment of the present application.

[0262] In one embodiment, in combination with Figure 5 , as Figure 15 shown, the above S508 may include the following S1501-S1503.

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

[0264] Among them, the third screen color temperature refers to: the ending screen color temperature of the third image in each frame during the linear transformation of the 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, every time the display screen of the electronic device refreshes, the electronic device will display one frame of image. Then, during the target transformation duration, the total number of frames of the third image to be displayed on the display screen of the electronic device can be represented by the following formula (4):

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

[0267] Among them, N is the total number of frames of the third image to be displayed on the display screen of the electronic device during the target conversion duration, and N is a positive integer; f is the screen refresh rate of the electronic device; t target is the target conversion duration. That is to say, the electronic device determines the product of the target transformation duration and the screen refresh rate as the total number of frames N of the images displayed by the electronic device during the target transformation duration.

[0268] If the screen color temperature of the electronic device linearly changes from the current screen color temperature to the target screen color temperature, that is, when the electronic device displays each frame of the third image, the change amount of the screen color temperature is the same. Then, within the target conversion duration, the third screen color temperature of each frame of the third image can be determined as follows:

[0269] First, 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 divides the first screen color temperature change amount by the total number of frames to determine 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 of the corresponding 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 are shown in Table 3 as follows:

[0271] Table 3

[0272] Number of frames 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] Among them, the first frame is the first frame in the above-mentioned total number of frames N. Therefore, the first screen color temperature CCT1 of the first frame is the current screen color temperature CurrentCCT2. That is to say, 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 above-mentioned total number of frames N. Therefore, the third screen color temperature CCTN in the Nth frame is the target screen color temperature TargetCCT. ΔCCT is the average change amount of the screen color temperature (or the second screen color temperature change amount) during 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 during the linear transformation of the screen color temperature. The third screen color temperature refers to: the end screen color temperature of each frame of the third image during the linear transformation 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 to say, the first screen color temperature corresponding to the first frame of the N frames of the third image is the current screen color temperature, and the first screen color temperature corresponding to the Lth frame of the N frames of the third image is the linear screen color temperature corresponding to the (L - 1)th frame of the N frames of the third image, where L is a positive integer greater than or equal to 2 and less than or equal to N.

[0275] S1502. The electronic device performs non-linear conversion processing on each third screen color temperature according to the current screen color temperature and the target screen color temperature to obtain the corresponding second screen color temperature for each.

[0276] When the screen color temperature of an electronic device changes from the current screen color temperature to the target screen color temperature, if the above linear transformation method is adopted, the transformation duration required for the same change in screen color temperature will be equal. In this way, the transformation process of the screen color temperature will be relatively abrupt, resulting in a poor visual experience for the user.

[0277] Therefore, in the embodiments of the present application, a non-linear conversion will be performed on the third screen color temperature corresponding to each of the above frames of the third image. Based on this, when the screen color temperature of the electronic device is changing, 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 duration required for the same change in screen color temperature is longer. Conversely, the transformation duration required for the same change in screen color temperature is shorter. The following will be described in conjunction with Figure 16 For introduction.

[0278] Figure 16 Fig. shows a comparison schematic diagram of non-linear transformation and linear transformation of the screen color temperature provided by an embodiment of the present application.

[0279] In one embodiment, as Figure 16 shown, the straight line (i.e., the 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 duration required for the same change in screen color temperature is equal. The curve (non-linear color temperature change curve) represents that the transformation process of the screen color temperature is a non-linear 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 duration required for the same change in screen color temperature is longer. However, when the screen color temperature of the electronic device is far from the current screen color temperature and the target screen color temperature, the transformation duration required for the same change in screen color temperature is shorter.

[0280] That is to say, when the transformation process of the screen color temperature is a non-linear transformation process, the screen color temperature stays for a longer time when it is close to the current screen color temperature, stays for a longer time when it is close to the target screen color temperature, and stays for a shorter time when it is far 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, making the entire transformation process transition more naturally and smoothly.

[0281] In one embodiment, the electronic device substitutes the current screen color temperature, the target screen color temperature, and each third screen color temperature into the non-linear conversion formula, and the corresponding second screen color temperature for each can be obtained.

[0282] Exemplarily, the non-linear conversion formula can be represented by the following formulas (5)-(8):

[0283]

[0284]

[0285]

[0286]

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

[0288] It should be noted that starting 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 to say, the fourth screen color temperature of the Mth frame of the third image is the non-linear screen color temperature of the (M - 1)th frame of the third image, where 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 formulas (5)-(8).

[0290] Figure 17 Shows a schematic diagram of the effect of a screen color temperature transformation provided in an embodiment of the present application.

[0291] As Figure 17 shown, the abscissa is time and the ordinate is the change amount of the screen color temperature. Among them, Curve 1 indicates that when the change amount of the screen color temperature is 1000K, the required time is 1 second. Curve 2 indicates that when the change amount of the screen color temperature is 2000K, the required time is 2 seconds. Curve 3 indicates that when the change amount of the screen color temperature is 3000K, the required time is 3 seconds. Curve 4 indicates that when the change amount of the screen color temperature is 4000K, the required time is 4 seconds. Curve 5 indicates 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, during 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 change amounts of the screen color temperature 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 relatively gentle and stable during the entire process of changing the screen color temperature, improving the user's visual experience.

[0293] S1503. The electronic device determines N color temperature conversion matrices according to each second 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 image.

[0294] The calculation process of each color temperature conversion matrix is the same. The following combines Figure 18 to introduce the calculation process of each color temperature conversion matrix.

[0295] Figure 18 Fig. 6 shows a schematic flowchart of an image display method provided by an embodiment of the present application.

[0296] Optionally, combining Figure 15 , as Figure 18 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 under the fourth screen color temperature corresponding to each frame of the third image according to the first color coordinates of the white point under 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 under the fourth screen color temperature corresponding to each frame of the third image, and converts the first color coordinates of the white point under the fourth screen color temperature corresponding to each frame of the third image into the sixth color coordinates of the white point under the fourth screen color temperature corresponding to each frame of the third image. Among them, the sixth color coordinates refer to: under the fourth screen color temperature, the color coordinates of the white point in the xy coordinate system of the XYZ color space. That is to say, under the fourth screen color temperature, the electronic device converts the color coordinates of the white point from the RGB color space to the xy coordinate system of the XYZ color space.

[0300] Exemplarily, the electronic device substitutes the first color coordinates of the white point under the fourth screen color temperature corresponding to each frame of the third image into the fourth coordinate conversion formula to obtain the sixth color coordinates of the white point under the fourth screen color temperature corresponding to each frame of the third image. Among them, the fourth coordinate conversion formula can be expressed by the following formula (9):

[0301]

[0302] Among them, (r 1 , g 1 , b 1 ) are the first color coordinates of the white point corresponding to each frame of the third image; (x 1 , y 1 ) are the sixth color coordinates of the white point corresponding to each frame of the third image; is the conversion matrix between the color coordinates of the RGB color space and the color coordinates of the XYZ color space.

[0303] Then, the electronic device performs a conversion process on the sixth color coordinate of the white point under 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 values of the three primary colors of the white point (i.e., XYZ values), so as to obtain the values of the three primary colors of the white point under the fourth screen color temperature corresponding to each frame of the third image.

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

[0305] Y = 1 (10)

[0306]

[0307]

[0308] where (X, Y, Z) are the values of the three primary colors of the white point. Substitute the sixth color coordinate (x 1 , y 1 ) of the white point corresponding to each frame of the third image into the above formulas (10)-(12), and the values of the three primary colors of the white point (X 1 , Y 1 , Z 1 ) under the fourth screen color temperature corresponding to each frame of the third image can be obtained.

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

[0310] Exemplarily, the gamut conversion formula can be expressed by the following formula (13):

[0311]

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

[0313] The electronic device substitutes the values of the three primary colors of the white point (X 1 , Y 1 , Z 1 ) under the fourth screen color temperature corresponding to each frame of the third image into the above formula (13), and the values of the three primary colors of the white point (R current , G current , B current ) under the fourth screen color temperature corresponding to each frame of the third image can be obtained.

[0314] S1803. 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 according to the second screen color temperature, the color deviation value, and the third color temperature threshold corresponding to each frame of the third image.

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

[0316] First, 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 at the second screen color temperature corresponding to each frame of the third image. Wherein, 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 at the second screen color temperature.

[0317] Exemplarily, 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 at 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 third color temperature threshold. A 1 , A 2 , A 3 , B 1 , B 2 , C 1 , C 2 , C 3 , D, E 1 , E 2 , F, G are constants.

[0321] According to the magnitude relationship between the second screen color temperature corresponding to each frame of the third image and the third color temperature threshold, select one of the formulas in formula (14) to calculate x predicted . Specifically, let CCTm in the above formula (14) be equal to 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 at the second screen color temperature corresponding to each frame of the third image can be obtained.

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

[0323] In one embodiment, if the color deviation value is less than the first threshold, the electronic device directly determines the first preset color coordinates (x predicted_1 , y predicted_1 ) of the white point at the second screen color temperature corresponding to each frame of the third image as the second color coordinates (x 2 , y 2 ) of the white point at 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, 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 according to the first preset color coordinates of the white point at 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 to say, if the color deviation value is greater than the first threshold, it is necessary to correct the first preset color coordinates of the white point at the second screen color temperature corresponding to each frame of the third image, so as to obtain the second color coordinates 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 coordinates of the white point at the second screen color temperature corresponding to each frame of the third image may include the following steps:

[0327] The first step: The electronic device substitutes the first preset color coordinates 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 coordinates 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] Exemplarily, the first coordinate conversion formula can be represented by the following formula (16):

[0329]

[0330] Wherein, (u predicted , v predicted ) are the color coordinates 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, and d are constants.

[0331] Substituting the first preset color coordinates (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 coordinates (u 3 , v 3 ) 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] Second step: Determine the sum of the second screen color temperature corresponding to each frame of the third image and the third color temperature threshold as the second adjusted screen color temperature corresponding to each frame of the third image. The second adjusted screen color temperature is a correction value of the second screen color temperature and is equivalent to the second screen color temperature. In some embodiments, the second adjusted screen color temperature can become a non-linearly adjusted screen color temperature.

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

[0334] According to the magnitude relationship between the second adjusted screen color temperature corresponding to each frame of the third image and the third color temperature threshold, select one formula from formula (14) to calculate x predicted . Specifically, let CCTm in the above formula (14) be equal to the second adjusted screen color temperature corresponding to each frame of the third image, and the second preset color coordinates of the white point (x predicted_2 , y predicted_2 ) under the second screen color temperature corresponding to each frame of the third image can be obtained.

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

[0336] Substitute the second preset color coordinates of the white point (x predicted_2 , y predicted_2 ) under the second adjusted screen color temperature corresponding to each frame of the third image into the above formula (16), and the fourth color coordinates (u 4 , v 4 ) 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 can be obtained.

[0337] Fifth step: 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 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 u 3 in the third color coordinates corresponding to each frame of the third image and u 4 in the fourth color coordinates as the first variation du (i.e., du = u 4 - u 3 ). Second, the electronic device determines the difference between v 3 in the third color coordinates corresponding to each frame of the third image and v 4The difference is determined as the second change amount dv (i.e., dv = v 4 - v 3 ). Again, the electronic device calculates the first ratio radio between the first change amount du corresponding to each frame of the third image and the second change amount dv (i.e., ). Then, based on the color deviation value, the first ratio radio corresponding to each frame of the third image, and the third color coordinates (u 3 , v 3 ), 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 in the uv coordinate system of the XYZ color space. Finally, the electronic device substitutes the fifth color coordinates (u_target, v_target) corresponding to 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. Among them, the fifth color coordinates are the corrected third color coordinates.

[0339] Specifically, the process by which the 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 uv coordinate system of the XYZ color space may include:

[0340] First, 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 the u in the third color coordinates corresponding to each frame of the third image 3 and the u in the fourth color coordinates 4 of the third change amount du_new, and the v in the third color coordinates corresponding to each frame of the third image 3 and the v in the fourth color coordinates 4 of the fourth change amount dv_new. Among them, the third change amount du_new is the corrected first change amount du. The fourth change amount dv_new is the corrected second change amount dv.

[0341] Exemplarily, the third conversion formula may be represented by the following formula (17):

[0342]

[0343] Among them, du_new is the third change amount corresponding to each frame of the third image. dv_new is the fourth change amount 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 takes the u in the third color coordinates corresponding to each frame of the third image 3, the sum of the third change amounts du_new corresponding to the third image of each frame is determined as u_target in the fifth color coordinates corresponding to the third image of each frame. Meanwhile, the electronic device uses the v in the third coordinates corresponding to the third image of each frame 3 , the sum of the fourth change amounts dv_new corresponding to the third image of each frame is determined as v_target in the fifth color coordinates corresponding to the third image of each frame.

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

[0346]

[0347] where (x_target, y_target) is the second color coordinates of the white point under the second screen color temperature corresponding to the third image of each frame; (u_target, v_target) is the fifth color coordinates corresponding to the third image of each frame; 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 the third image of each frame according to the second color coordinates of the white point under the second screen color temperature corresponding to the third image of each frame.

[0349] Specifically, the electronic device substitutes the second color coordinates (x_target, y_target) of the white point under the second screen color temperature corresponding to the third image of each frame into the above formulas (10) - (12), and can obtain the values of the three primary colors of the white point under the second screen color temperature corresponding to the third image of each frame (X 2 , Y 2 , Z 2 ).

[0350] S1805. The electronic device substitutes the values of the three primary colors of the white point under the second screen color temperature corresponding to the third image of each frame into the color gamut conversion formula to obtain the values of the three primary colors of the white point under the second screen color temperature corresponding to the third image of each frame.

[0351] Specifically, the electronic device substitutes the values of the three primary colors of the white point under the second screen color temperature corresponding to the third image of each frame (X 2 , Y 2 , Z 2 ) into the above formula (13), and can obtain the values of the three primary colors of the white point under the fourth screen color temperature corresponding to the third image of each frame (R target , G target , B target ).

[0352] S1806. The electronic device obtains the color temperature conversion matrix corresponding to each frame of the third image based on the tristimulus values of the white point under the fourth screen color temperature corresponding to each frame of the third image and the tristimulus values of the white point under the second screen color temperature corresponding to each frame of the third image.

[0353] Specifically, S1806 may include: First, the electronic device calculates three second ratios R gain 、G gain 、B gain between the tristimulus values of the white point under the second screen color temperature corresponding to each frame of the third image and the tristimulus values of the white point under the fourth screen color temperature corresponding to each frame of the third image. Among them, these three second ratios are respectively: 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 gain 、G gain 、B gain corresponding to each frame of the third image.

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

[0355]

[0356] It should be noted that in any of the above embodiments, S509 may also include S1501 - S1503, which will not be elaborated in the embodiments of the present application.

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

[0358] Specifically, processing each frame of the third image using the color temperature conversion matrix corresponding to each frame of the third image may include: The electronic device adjusts the RGB values of each pixel in the corresponding 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 light environment. Therefore, when the user browses the target image in the current light environment, the eyes will not show symptoms such as soreness, thereby reducing the user's visual fatigue. At the same time, the changed target screen color temperature of the electronic device matches the changed second light environment, and the screen color temperature of the electronic device is non-linearly changed throughout the entire change process. In this way, the entire change process of the screen color temperature is relatively gentle and not abrupt, and the user's visual experience is better.

[0360] Such as Figure 19As shown in the figure, an embodiment of the present application further 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 can be interconnected through a line. The processor 2010 is used to support the electronic device to implement each step in the above method embodiment. The at least one interface circuit 2020 can be used to receive signals from other devices (such as a memory), or send signals to other devices (such as a communication interface). The chip system can include a chip and can also include other discrete devices.

[0361] An embodiment of the present application further provides a computer storage medium. The computer storage medium includes instructions. When the instructions run on the above electronic device, the electronic device is caused to execute each step in the above method embodiment.

[0362] An embodiment of the present application further provides a computer program product including instructions. When the instructions run on the above electronic device, the electronic device is caused to execute each step in the above method embodiment.

[0363] For the technical effects of the chip system, computer storage medium, and computer program product, refer to the technical effects of the foregoing method embodiment.

[0364] It should be understood that in various embodiments of the present application, the magnitudes of the serial numbers of the above processes do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0365] Those of ordinary skill in the art can realize that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0366] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and modules described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.

[0367] In several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there can be other division methods. For example, multiple modules or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling, direct coupling, or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of devices or modules can be in electrical, mechanical, or other forms.

[0368] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they can be located in one device or distributed to multiple devices. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0369] In addition, in each embodiment of this application, the functional modules 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, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it can be implemented in whole or in part 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, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer storage medium or transmitted from one computer storage medium to another. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that contains one or more integrated media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0371] As described above, it is only the specific implementation manner of the present application. However, the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claimed rights.

Claims

1. An image display method, characterized in that, applied to an electronic device, the method includes: displaying a first image in a first light environment, the RGB values of the first image matching the first light environment where the electronic device is located, and the ambient light information is different in different light environments, and the ambient light information includes ambient illuminance and ambient color temperature; the light environment where the electronic device is located changes from the first light environment to a second light environment, and the target screen color temperature corresponding to the target light information is obtained; wherein, the target light information includes the ambient light information in the second light environment, and the target screen color temperature matches the second light environment; after displaying the first image, displaying N frames of second images frame by frame, and adjusting the screen color temperature frame by frame according to a non-linear color temperature change curve during 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 the second image; wherein, each frame of the second image is obtained by processing each frame of the third image with 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 non-linear color temperature change curve includes the non-linear screen color temperature corresponding to each frame of the third image, and the non-linear screen color temperature corresponding to each frame of the third image is obtained by performing non-linear processing on the linear screen color temperature corresponding to the third image with the current screen color temperature and the target screen color temperature when the electronic device displays the first image; the linear screen color temperature corresponding to the third image is included in the linear color temperature change line, and the linear color temperature change line is obtained based on the current screen color temperature, the target screen color temperature, and the display duration of the N frames of second images.

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

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

4. The method according to claim 3, characterized in that, before obtaining the target screen color temperature corresponding to the target light information, the method further includes: performing linear interpolation processing on a target mapping table 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 any one of claims 1-4, characterized in that, before displaying the N frames of second images 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 a second mapping relationship to obtain the display duration of the N frames of second images; wherein, the second mapping relationship is a mapping relationship between the change amount of the screen color temperature and the transformation duration.

6. The method according to any one of claims 1-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 second images, the method further includes: Determining a target scene corresponding to the light environment change according to 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 in the first light environment, the first ambient illuminance is the ambient 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 illuminance is the ambient illuminance in the second light environment; Determining the second mapping relationship according to the mapping relationship between the target scene, the change amount of the scene and the screen color temperature, and the transformation duration.

7. According to the method described in claim 6, It is characterized in that The determining a target scene corresponding to the light environment change according to 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 lighting-on scene; wherein, the first illuminance is greater than the second illuminance; If the second ambient illuminance is less than the second illuminance, and the first ambient illuminance is greater than the first illuminance, then the target scene is a lighting-off scene; 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 a scene of increasing illuminance; If the second ambient illuminance is greater than the second illuminance, and the first ambient illuminance is less than the first illuminance, then the target scene is a scene of decreasing illuminance; If the second ambient color temperature is greater than the first ambient color temperature, then the target scene is a scene of increasing color temperature; If the second ambient color temperature is less than the first ambient color temperature, then the target scene is a scene of decreasing color temperature.

8. According to the method described in any one of claims 1-7, It is characterized in that Before displaying the N frames of second images frame by frame, the method further includes: Determining the product of the display duration and the screen refresh rate as the total number of frames N of the third images displayed by the electronic device during the display duration; Determining the difference between the target screen color temperature and the current screen color temperature as the first screen color temperature change amount; Determining the quotient of the first screen color temperature change amount and the total number of frames as the second screen color temperature change amount; Determining the sum of the first screen color temperature corresponding to each frame of the third images and the second screen color temperature change amount as the linear screen color temperature corresponding to each frame of the third images; Wherein, the first screen color temperature corresponding to the first frame of the N frames of third images is the current screen color temperature, and 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, and L is a positive integer greater than or equal to 2 and less than or equal to N.

9. According to the method described in any one of claims 1-8, It is characterized in that Before displaying the N frames of second images 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 a non-linear conversion formula to obtain the non-linear screen color temperature corresponding to each frame of the third image; wherein, the non-linear conversion formula is: where noLinearTargetCCT is the non-linear 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 non-linear change rate of the screen color temperature.

10. The method according to any one of claims 1-9, characterized in that before displaying the N frames of second images frame by frame, the method further includes: determining N color temperature conversion matrices according to the non-linear 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; 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 Mth frame of the third image is the non-linear screen color temperature of the (M-1)th frame of the third image, 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 determining N color temperature conversion matrices according to the non-linear 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: obtaining the XYZ values of the white point at the fourth screen color temperature corresponding to each frame of the third image according to the first color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image; substituting the XYZ values of the white point at the fourth screen color temperature corresponding to each frame of the third image into a 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; determining the second color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image according to the non-linear screen color temperature corresponding to each frame of the third image, the color deviation value, and the third color temperature threshold; wherein, the second color coordinate is: the color coordinate of the white point of the corresponding frame of the third image in the xy coordinate system of the XYZ color space at the non-linear screen color temperature corresponding to each frame of the third image; obtaining the XYZ values of the white point at the non-linear screen color temperature corresponding to each frame of the third image according to the second color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image; substituting the XYZ values of the white point at the non-linear 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 non-linear screen color temperature corresponding to each frame of the third image; obtaining the color temperature conversion matrix corresponding to each frame of the third image according to the RGB values of the white point at the fourth screen color temperature corresponding to each frame of the third image and the RGB values of the white point at the non-linear screen color temperature corresponding to each frame of the third image; wherein, the color gamut conversion formula is: where (R, G, B) are RGB values; (X, Y, Z) are XYZ values; is a gamut conversion matrix between the XYZ color space and the RGB color space.

12. The method according to claim 11, characterized in that Determining the second color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image according to the non-linear screen color temperature corresponding to each frame of the third image, the color deviation value, and the third color temperature threshold includes: Substituting the non-linear 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 at the non-linear screen color temperature corresponding to each frame of the third image; wherein, the first preset color coordinate is: the estimated color coordinate of the white point of each frame of the third image corresponding to the non-linear screen color temperature of each frame of the third image in the xy coordinate system of the XYZ color space; If the color deviation value is less than the first threshold, then determine the first preset color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image as the second color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image; If the color deviation value is greater than the first threshold, then determine the second color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image according to the first preset color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image, the non-linear screen color temperature corresponding to each frame of the third image, the third color temperature threshold, and the color deviation value; Wherein, the color coordinate calculation formula is: Among them, (x predicted , y predicted ) is the preset color coordinates of the white point under the non-linear screen color temperature corresponding to the third image of each frame; CCTm is the second screen color temperature corresponding to the third image of each frame; A 1 , A 2 , A 3 , B 1 , B 2 , C 1 , C 2 , C 3 , D, E 1 , E 2 , F, G are constants; H is the second color temperature threshold.

13. The method according to claim 12, characterized in that the determining the second color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image according to the first preset color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of the third image, the non-linear screen color temperature corresponding to each frame of the third image, the third color temperature threshold, and the color deviation value includes: Substituting the first preset color coordinate of the white point at the non-linear 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 non-linear screen color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space; Determining the sum of the non-linear screen color temperature corresponding to each frame of the third image and the third color temperature threshold as the non-linear adjusted screen color temperature corresponding to each frame of the third image; wherein, the non-linear adjusted screen color temperature is the correction value of the non-linear screen color temperature; Substituting the non-linear adjusted 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 non-linear screen adjusted color temperature corresponding to each frame of the third image; Substituting the second preset color coordinate of the white point at the non-linear screen adjusted 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 at the non-linear screen adjusted color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space; Determining the second color coordinate of the white point at the non-linear 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; Wherein, the first coordinate conversion formula is: where (u predicted , v predicted ) are the color coordinates of the white point at the non-linear 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.

14. The method according to claim 13, characterized in that Determining the second color coordinates of the white point under the non-linear screen color temperature corresponding to each frame of the third image according to 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: Determine the difference between the u in the third color coordinates corresponding to the third image of each frame 3 and the u in the fourth color coordinates 4 as the first change amount; Determine the difference between the v in the third color coordinates corresponding to the third image of each frame 3 and the v in the fourth color coordinates 4 as the second change amount; Calculating a first ratio between the first change amount and the second change amount corresponding to each frame of the third image; Determining the fifth color coordinates of the white point under the non-linear 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 coordinates; wherein, the fifth color coordinates are the corrected third color coordinates; Substituting the fifth color coordinates corresponding to each frame of the third image into the second conversion formula to calculate the second color coordinates of the white point under the non-linear screen color temperature corresponding to each frame of the third image; Wherein, the second conversion formula is: Wherein, (x_target, y_target) are the second color coordinates of the white point under the non-linear screen color temperature corresponding to each frame of the third image; (u_target, v_target) are the fifth color coordinates corresponding to each frame of the third image; f, g, h, m are constants.

15. The method according to claim 14, characterized in that, Determining the fifth color coordinates 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 coordinates, includes: Substitute the color deviation value and the first ratio corresponding to each frame of the third image into the third conversion formula to calculate the u in the third color coordinates corresponding to each frame of the third image 3 and the third variation of u in the fourth color coordinates 4 , and the v in the third color coordinates corresponding to each frame of the third image 3 and the fourth variation of v in the fourth color coordinates 4 ; wherein, the third variation is the corrected first variation, and the fourth variation is the corrected second variation Determine the sum of the u in the third color coordinates corresponding to the third image of each frame and the third change amount corresponding to the third image of each frame as u_target in the fifth color coordinates corresponding to the third image of each frame; 3 ​ Determine the sum of v in the third color coordinates corresponding to the third image of each frame and the fourth change amount corresponding to the third image of each frame as v_target in the fifth color coordinates corresponding to the third image of each frame; 3 ​ Wherein, the third conversion formula is: Wherein, du_new is the third change amount corresponding to each frame of the third image; dv_new is the fourth change amount 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.

16. The method according to any one of claims 11-15, characterized in that, Obtaining the XYZ values of the white point under the fourth screen color temperature corresponding to each frame of the third image according to the first color coordinates of the white point under the fourth screen color temperature corresponding to each frame of the third image, includes: Substituting the first color coordinates of the white point under the fourth screen color temperature corresponding to each frame of the third image into the fourth coordinate conversion formula to obtain the sixth color coordinates of the white point under the fourth screen color temperature corresponding to each frame of the third image; wherein, the sixth color coordinates are: the color coordinates of the white point in the xy coordinate system of the XYZ color space under the fourth screen color temperature; Performing conversion processing on the sixth color coordinates of the white point under the fourth screen color temperature corresponding to each frame of the third image according to the relationship between the sixth color coordinates of the white point and the XYZ values of the white point to obtain the XYZ values of the white point under the fourth screen color temperature corresponding to each frame of the third image; Wherein, the fourth coordinate conversion formula is: where (r 1 , g 1 , b 1 ) is the first color coordinate of the white point corresponding to the third image of each frame; (x 1 , y 1 ) is the sixth color coordinate of the white point corresponding to the third image of each frame; is the conversion matrix between the color coordinates in the RGB color space and the color coordinates in the XYZ color space.

17. The method according to claim 11, characterized in that, Obtaining the color temperature conversion matrix corresponding to each frame of the third image according to 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 values of the white point under the non-linear screen color temperature corresponding to each frame of the third image and the RGB values of the white point under the fourth screen color temperature corresponding to each frame of the third image; wherein, the three second ratios are respectively: (R target , G target , B target ) are the RGB values of the white point under the non-linear 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; Obtaining 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; Among them, the color temperature conversion matrix is as follows:

18. The method according to any one of claims 1-17, characterized in that the step of sequentially displaying N frames of second images includes: adjusting the RGB values of each pixel in each frame of the third image corresponding thereto by using each of the color temperature conversion matrices to obtain each frame of second image; displaying each frame of second image.

19. The method according to any one of claims 1-18, characterized in that before obtaining the target screen color temperature corresponding to the target light information, the method further includes: obtaining the current ambient illuminance and the current ambient color temperature of the light environment where the electronic device is located; wherein, the current ambient illuminance is the ambient illuminance of the light environment where the electronic device is located at the current acquisition moment, and the current ambient color temperature is the ambient color temperature of the light environment where the electronic device is located at the current acquisition moment; determining 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 determining 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; wherein, the historical ambient illuminance is the ambient illuminance at the historical acquisition moment, the historical ambient color temperature is the ambient color temperature at the historical acquisition moment, and the historical acquisition moment is the previous acquisition moment of the current acquisition moment; determining that the light environment where the electronic device is located changes from the first light environment to the second light environment based on that the change amount of the ambient illuminance exceeds the illuminance threshold and / or the change amount of the ambient color temperature exceeds the first color temperature threshold; determining that the light environment where the electronic device is located is the first light environment based on that the change amount of the light environment does not exceed the illuminance threshold and the change amount of the ambient color temperature does not exceed the first color temperature threshold.

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

21. The method according to claim 19 or 20, characterized in that the color and color temperature interface of the electronic device includes a preset switch; obtaining the current ambient illuminance and the current ambient color temperature of the light environment where the electronic device is located includes: when the preset switch is in the on state, obtaining the current ambient illuminance and the current ambient color temperature of the light environment where the electronic device is located.

22. An electronic device, characterized in that it includes: a display screen, an ambient light sensor, a processor and a memory; the display screen is used for displaying images, the ambient light sensor is used for obtaining the ambient illuminance and the ambient color temperature and sending the ambient illuminance and the ambient color temperature to the processor; instructions are stored in the memory, and when the processor executes the instructions, the method according to any one of claims 1-21 is executed.

23. A computer-readable storage medium, characterized in that it includes instructions, and when the instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1-21.

Citation Information

Patent Citations

  • Screen display adjusting method and device, electronic device, and storage medium

    CN109215612A

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

    CN111131612A

  • Color temperature adjusting method and device, terminal and storage medium

    CN112397039A

  • Screen display method and device and computer storage medium

    CN112905141A

  • Brightness adjusting method and electronic equipment

    CN116048368A