CN-122024611-A - Image display method and electronic equipment
Abstract
The application discloses an image display method and electronic equipment, relates to the field of display, and is used for enabling a screen color temperature of the electronic equipment and RGB values of an image displayed by the electronic equipment to be matched with a light environment where the electronic equipment is located. The method includes first, the electronic device displaying a first image in a first light environment. Then, when the light environment of the electronic equipment is changed from the first light environment to the second light environment, the electronic equipment acquires a target screen color temperature corresponding to target light information. Finally, after the first image is displayed, the electronic equipment displays N frames of second images frame by frame, and adjusts 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 N frames of second images.
Inventors
- XIANG CHAO
- WU LIYOU
- Lei Caihua
Assignees
- 荣耀终端股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20231123
Claims (20)
- 1. An image display method, applied to an electronic device, comprising: when the electronic equipment is on, and a preset switch is turned on, acquiring the light environment of the electronic equipment; When the light environment of the electronic equipment is changed from a first light environment to a second light environment and the variation of the ambient light information accords with a preset condition, acquiring a target screen color temperature corresponding to the second light environment; Determining a target transformation duration required for transforming from the current screen color temperature to the target screen color temperature according to the current screen color temperature corresponding to the first light environment, the target screen color temperature and the mapping relation between the variation of the screen color temperature and the transformation duration; and according to the current screen color temperature and the target screen color temperature, carrying out nonlinear transformation on the screen color temperature of the N frames of images displayed by the electronic equipment in the target transformation duration until the screen color temperature of the last frame of images in the N frames of images reaches the target screen color temperature.
- 2. The method of claim 1, wherein the ambient light information comprises ambient light illuminance and ambient color temperature.
- 3. The method according to claim 1 or 2, wherein the obtaining the target screen color temperature corresponding to the second light environment comprises: and acquiring a target screen color temperature corresponding to target light information of the second light environment, wherein the target light information comprises the ambient light information in the second light environment.
- 4. The method of claim 3, wherein the target light information further comprises a screen display brightness of the electronic device in the second light environment.
- 5. The method according to claim 3 or 4, wherein the obtaining a target screen color temperature corresponding to target light information of the second light environment comprises: Substituting the target light information into a first mapping relation to obtain the target screen color temperature, wherein the first mapping relation indicates the mapping relation between a plurality of groups of light information and the screen color temperature.
- 6. The method of claim 5, wherein prior to the acquiring the target screen color temperature corresponding to the target light information of the second light environment, the method further comprises: And performing linear interpolation processing on a target mapping table to obtain the first mapping relation, wherein the target mapping table is a mapping table between the light information and the screen color temperature.
- 7. The method according to claim 1 or 2, wherein the determining the target transformation duration required for transforming from the current screen color temperature to the target screen color temperature according to the current screen color temperature, the target screen color temperature, and the mapping relationship between the amount of change in the screen color temperature and the transformation duration corresponding to the first light environment, comprises: Substituting the absolute value of the difference value between the target screen color temperature and the current screen color temperature into the mapping relation between the change amount of the screen color temperature and the transformation duration to obtain the target transformation duration.
- 8. The method according to claim 7, wherein before substituting the absolute value of the difference between the target screen color temperature and the current screen color temperature into the map, the method further comprises: determining a target scene corresponding to the light environment change according to first ambient light illuminance and second ambient light illuminance or first ambient color temperature and second ambient color temperature, wherein the first ambient color temperature is the ambient color temperature in the first light environment, the first ambient light illuminance is the ambient light illuminance in the first light environment, the second ambient color temperature is the ambient color temperature in the second light environment, and the second ambient light illuminance is the ambient light illuminance in the second light environment; and determining the mapping relation between the change amount of the screen color temperature and the transformation duration according to the mapping relation among the target scene, the change amount of the scene and the screen color temperature and the transformation duration.
- 9. The method of claim 8, wherein determining the target scene corresponding to the light environment change based on the first ambient light level and the second ambient light level, or the first ambient color temperature and the second ambient color temperature, comprises: if the second ambient light illuminance is greater than the first illuminance and the first ambient light illuminance is less than the second illuminance, the target scene is a lighting 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, the target scene is a light-off scene; if the second ambient light illuminance is less than the first illuminance and the first ambient light illuminance is greater than the second illuminance, the target scene is an illuminance enhancement scene; if the second ambient light illuminance is greater than the second illuminance and the first ambient light illuminance is less than the first illuminance, the target scene is an illuminance weakening scene; If the second environment color temperature is larger than the first environment color temperature, the target scene is a color temperature enhancement scene; And if the second environment color temperature is smaller than the first environment color temperature, the target scene is a color temperature weakening scene.
- 10. The method according to claim 1 or 2, wherein before displaying the N frames of images, the method further comprises: Determining the product of the target transformation duration and the screen refresh rate as the total frame number N of the display image of the electronic equipment in the target transformation duration; determining the difference between the target screen color temperature and the current screen color temperature as a first screen color temperature variation; Determining the quotient of the color temperature variation of the first screen and the total frame number as a second screen color temperature variation; Determining the sum of the color temperature variation of the first screen corresponding to each frame of image and the color temperature variation of the second screen as the color temperature of the linear screen corresponding to each frame of image; The color temperature of a first screen corresponding to a first frame image in N frame images is the color temperature of the current screen, the color temperature of a first screen corresponding to an L-th frame image in the N frame images is the color temperature of a linear screen corresponding to an L-1-th frame image in the N frame images, and L is a positive integer greater than or equal to 2 and less than or equal to N.
- 11. The method according to claim 1 or 2, wherein before displaying the N frames of images, the method further comprises: Substituting the current screen color temperature, the target screen color temperature and the linear screen color temperature corresponding to each frame of image into a nonlinear conversion formula to obtain the nonlinear screen color temperature corresponding to each frame of image; Wherein, the nonlinear conversion formula is: Wherein, the A nonlinear screen color temperature corresponding to each frame of image; the color temperature of the screen is the target color temperature; the current screen color temperature; a linear screen color temperature corresponding to each frame of image; is the non-linear rate of change of the screen color temperature.
- 12. The method according to claim 1 or 2, wherein before displaying the N frames of images, the method further comprises: determining N color temperature conversion matrixes according to the nonlinear screen color temperature and the color deviation value corresponding to each frame of image and the first color coordinates of the white point under the fourth screen color temperature corresponding to each frame of image; 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 image is the nonlinear screen color temperature of the Mth-1 frame image, and M is a positive integer greater than or equal to 2 and less than N.
- 13. The method of claim 12, wherein determining the N color temperature conversion matrices based on the nonlinear screen color temperature, the color deviation value, and the first color coordinates of the white point at the fourth screen color temperature for each frame of the image comprises: according to the first color coordinates of the white point under the color temperature of the fourth screen corresponding to each frame of image, the XYZ value of the white point under the color temperature of the fourth screen corresponding to each frame of image is obtained; Substituting the XYZ values of the white point under the color temperature of the fourth screen corresponding to each frame of image into a color gamut conversion formula to obtain the RGB values of the white point under the color temperature of the fourth screen corresponding to each frame of image; Determining a second color coordinate of a white point of each frame of image under the corresponding nonlinear screen color temperature according to the nonlinear screen color temperature corresponding to each frame of image, the color deviation value and a third color temperature threshold, wherein the second color coordinate is the color coordinate of the white point of each frame of image in an xy coordinate system of an XYZ color space under the corresponding nonlinear screen color temperature of each frame of image; according to the second color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of image, the XYZ value of the white point under the nonlinear screen color temperature corresponding to each frame of image is obtained; substituting the XYZ values of the white point under the nonlinear screen color temperature corresponding to each frame of image into the color gamut conversion formula to obtain the RGB values of the white point under the nonlinear screen color temperature corresponding to each frame of image; Obtaining a color temperature conversion matrix corresponding to each frame of image according to the RGB value of the white point under the color temperature of the fourth screen corresponding to each frame of image and the RGB value of the white point under the color temperature of the nonlinear screen corresponding to each frame of image; Wherein, the color gamut conversion formula is: wherein, (R, G, B) is RGB value and (X, Y, Z) is XYZ value; is a gamut conversion matrix between XYZ color space to RGB color space.
- 14. The method of claim 13, wherein determining the second color coordinates of the white point at the non-linear screen color temperature for each frame of image based on the non-linear screen color temperature for each frame of image, the color deviation value, and a third color temperature threshold comprises: Substituting the nonlinear screen color temperature corresponding to each frame of image into a color coordinate calculation formula to obtain a first preset color coordinate of a white point of each frame of image under the nonlinear screen color temperature, wherein the first preset color coordinate is an estimated color coordinate of the white point of each frame of image in an xy coordinate system of an XYZ color space under the nonlinear screen color temperature corresponding to each frame of image; If the color deviation value is smaller than a first threshold value, determining a first preset color coordinate of a white point under the color temperature of the nonlinear screen corresponding to each frame of image as a second color coordinate of the white point under the color temperature of the nonlinear screen corresponding to each frame of image; If the color deviation value is larger than the first threshold value, determining a second color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of image according to a first preset color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of image, a third color temperature threshold value and the color deviation value; Wherein, the color coordinate calculation formula is: Wherein, the method comprises the following steps of , ) Preset color coordinates of white points of the nonlinear screen corresponding to each frame of image under the color temperature; The color temperature ;A 1 、A 2 、A 3 、B 1 、B 2 、C 1 、C 2 、C 3 、D、E 1 、E 2 、F、G of the second screen corresponding to each frame of image is constant, and H is the second color temperature threshold.
- 15. The method of claim 14, wherein determining the second color coordinates of the white point at the non-linear screen color temperature for each frame of image based on the first preset color coordinates of the white point at the non-linear screen color temperature for each frame of image, the third color temperature threshold, and the color deviation value comprises: Substituting a first preset color coordinate of a white point under the nonlinear screen color temperature corresponding to each frame of image into a first coordinate conversion formula to obtain a third color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of image in a uv coordinate system of an XYZ color space; Determining the sum of a nonlinear screen color temperature corresponding to each frame of image and a third color temperature threshold value as a nonlinear adjustment screen color temperature corresponding to each frame of image, wherein the nonlinear adjustment screen color temperature is a correction value of the nonlinear screen color temperature; Substituting the color temperature of the nonlinear adjustment screen corresponding to each frame of image into the color coordinate calculation formula to obtain a second preset color coordinate of the white point under the nonlinear screen adjustment color temperature corresponding to each frame of image; Substituting a second preset color coordinate of the white point of the nonlinear screen corresponding to each frame of image under the color temperature adjustment into the first coordinate conversion formula to obtain a fourth color coordinate of the white point of the nonlinear screen corresponding to each frame of image under the color temperature adjustment in a uv coordinate system of an XYZ color space; Determining a second color coordinate of a white point under the nonlinear screen color temperature corresponding to each frame of image according to a third color coordinate corresponding to each frame of image, a fourth color coordinate corresponding to each frame of image and the color deviation value; The first coordinate conversion formula is as follows: ; Wherein, the method comprises the following steps of , ) A, b, c, d is a constant, which is the color coordinate of the white point at the non-linear screen color temperature corresponding to each frame of image in the uv coordinate system of the XYZ color space.
- 16. The method of claim 15, wherein determining the second color coordinates of the white point at the non-linear screen color temperature for each frame of image based on the third color coordinates for each frame of image, the fourth color coordinates for each frame of image, and the color shift value comprises: in the third color coordinates corresponding to each frame of image In the fourth color coordinates Is determined as a first variation; in the third color coordinates corresponding to each frame of image In the fourth color coordinates Is determined as a second variation; calculating a first ratio between the first variable quantity and the second variable quantity corresponding to each frame of image; Determining a fifth color coordinate of a white point under a nonlinear screen color temperature corresponding to each frame of image in a uv coordinate system of an XYZ color space according to the color deviation value, the first ratio corresponding to each frame of image and the third color coordinate, wherein the fifth color coordinate is the corrected third color coordinate; Substituting the fifth color coordinate corresponding to each frame of image into a second conversion formula, and calculating the second color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of image; Wherein, the second conversion formula is: ; Wherein, the method comprises the following steps of , ) A second color coordinate of white point under the color temperature of nonlinear screen corresponding to each frame of image , ) And the fifth color coordinate corresponding to each frame of image is f, g, h, m, which is a constant.
- 17. The method of claim 16, wherein determining a fifth color coordinate of the white point at the second screen color temperature corresponding to each frame of the image in the uv coordinate system of the XYZ color space based on the color deviation value, the first ratio corresponding to each frame of the image, and the third color coordinate comprises: Substituting the color deviation value and the first ratio corresponding to each frame of image into a third conversion formula, and calculating the third color coordinates corresponding to each frame of image In the fourth color coordinates And in the corresponding third color coordinates of each frame of image In the fourth color coordinates A fourth variation of (2); wherein the third variation is the first variation after correction, and the fourth variation is the second variation after correction; in the third color coordinates corresponding to each frame of image The sum of the third variation amounts corresponding to each frame of image is determined as the fifth color coordinate corresponding to each frame of image ; In the third color coordinates corresponding to each frame of image The sum of the fourth variation amounts corresponding to each frame of image is determined as the fifth color coordinate corresponding to each frame of image ; Wherein, the third conversion formula is: ; Wherein, the The third variation corresponding to each frame of image; the fourth variation corresponding to each frame of image; A first ratio corresponding to each frame of image; Is the color deviation value.
- 18. The method according to any one of claims 13-17, wherein obtaining XYZ values of the white point at the fourth screen color temperature corresponding to each frame of image according to the first color coordinates of the white point at the fourth screen color temperature corresponding to each frame of image comprises: Substituting a first color coordinate of a white point under a color temperature of a fourth screen corresponding to each frame of image into a fourth coordinate conversion formula to obtain a sixth color coordinate of the white point under the color temperature of the fourth screen corresponding to each frame of image, wherein the sixth color coordinate is a color coordinate of the white point in an xy coordinate system of an XYZ color space under the color temperature of the fourth screen; according to the relation between the sixth color coordinate of the white point and the XYZ value of the white point, converting the sixth color coordinate of the white point under the color temperature of the fourth screen corresponding to each frame of image to obtain the XYZ value of the white point under the color temperature of the fourth screen corresponding to each frame of image; the fourth coordinate conversion formula is as follows: Wherein, the method comprises the following steps of , , ) The first color coordinate of the white point corresponding to each frame of image , ) A sixth color coordinate of the white point corresponding to each frame of image; is a conversion matrix between the color coordinates of the RGB color space and the color coordinates of the XYZ color space.
- 19. The method according to claim 13, wherein the obtaining the color temperature conversion matrix corresponding to each frame image according to the RGB value of the white point at the color temperature of the fourth screen corresponding to each frame image and the RGB value of the white point at the color temperature of the nonlinear screen corresponding to each frame image includes: Calculating three second ratios between the RGB values of the white point under the nonlinear screen color temperature corresponding to each frame of image and the RGB values of the white point under the fourth screen color temperature corresponding to each frame of image, wherein the three second ratios are respectively: 、 、 ;( , , ) RGB value of white point of nonlinear screen color temperature corresponding to each frame of image , , ) RGB values of white points at a fourth screen color temperature corresponding to each frame of image; Obtaining a color temperature conversion matrix corresponding to each frame of image according to the three second ratios corresponding to each frame of image; Wherein, the color temperature conversion matrix is: 。
- 20. the method of any of claims 13-19, further comprising, prior to displaying the N frames of images: And adopting each color temperature conversion matrix to adjust the RGB value of each pixel in each corresponding frame of image.
Description
Image display method and electronic equipment The present application is a divisional application, the application number of the original application is 202311588138.3, the original application date is 2023, 11 and 23, and the whole content of the original application is incorporated by reference. Technical Field The embodiment of the application relates to the field of display, in particular to an image display method and electronic equipment. Background Currently, most electronic devices (such as mobile phones) have a display function, and more users browse images (such as pictures or videos) through the electronic devices. In the process of displaying an image, the color distortion of the image perceived by a user (such as the yellowish tone of the color of the image) may be caused by the large difference between the screen color temperature and the environment color temperature of the electronic device, and visual fatigue of the user may be increased, or even eyes of the user may be damaged. In summary, when the screen color temperature of the electronic device is greatly different from the ambient color temperature, the visual experience of the user is affected. Disclosure of Invention The embodiment of the application provides an image display method and electronic equipment, which are used for enabling a screen color temperature of the electronic equipment and RGB values of an image displayed by the electronic equipment to be matched with a light environment where the electronic equipment is located. In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme: in a first aspect, there is provided an image display method, the method comprising: First, the electronic device displays a first image in a first light environment. The RGB value of the first image is matched with a first light environment where the electronic equipment is located. The ambient light information in different light environments is different, and the ambient light information can comprise ambient illuminance and ambient color temperature; Then, when the light environment of the electronic equipment is changed from the first light environment to the second light environment, the electronic equipment acquires a target screen color temperature corresponding to target light information. The target light information may include ambient light information in a second light environment, and the target screen color temperature matches the second light environment. Finally, after the first image is displayed, the electronic equipment displays N frames of second images frame by frame, and adjusts 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 N frames of second images. And processing the third image of each frame by adopting a corresponding color temperature conversion matrix. The third image per frame is the original image of the corresponding second image per frame. The nonlinear color temperature change curve comprises nonlinear screen color temperatures corresponding to each frame of third image, wherein the nonlinear screen color temperatures corresponding to each frame of third image are obtained by adopting the current screen color temperature and the target screen color temperature when the electronic equipment displays the first image, and performing nonlinear processing on the linear screen color temperatures corresponding to the third 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 the second image. By adopting the image display method in the embodiment of the application, the color temperature of the target screen after the change of the electronic equipment is matched with the changed light environment, and the color temperature of the screen of the electronic equipment is in nonlinear change in the whole change process. Therefore, the whole change process of the color temperature of the visual screen in the whole change process is not abrupt, and the visual experience of the user is good. Meanwhile, each frame of second image displayed on the electronic equipment frame by frame is obtained by processing each frame of third image by adopting a 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 in which the electronic device is located. Therefore, when a user browses images in the current light environment, symptoms