Image display method and electronic device
By implementing an image display method of adjusting the screen color temperature frame by frame in electronic devices, the image color distortion and visual fatigue caused by the difference between the screen color temperature and the ambient color temperature is solved, and the user's visual experience is improved.
Patent Information
- Application Number
- PCT/CN2024/109931
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-23
- Filing Date
- 2024-08-05
- Publication Date
- 2025-05-30
AI Technical Summary
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.
Through an image display method, when the light environment changes, the electronic device adjusts the screen color temperature frame by frame to match the target screen color temperature to ensure that the displayed image RGB value matches the current light environment.
It realizes nonlinear changes in the screen color temperature when the light environment changes, avoids image color distortion, reduces user visual fatigue, and improves user visual experience.
Smart Images

Figure CN2024109931_30052025_PF_FP_ABST
Abstract
Description
Image display method and electronic device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on November 23, 2023, with application number 202311588138.3 and invention name “A method for displaying an image and an electronic device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of display, and in particular to an image display method and electronic device. Background Art
[0003] Currently, most electronic devices (such as mobile phones) have display functions, and more and more users are using these devices to browse images (such as pictures or videos). When these electronic devices display images, the screen color temperature may differ significantly from the ambient color temperature, causing the user to perceive the image as distorted (e.g., with a yellowish hue). This can also increase visual fatigue and even damage the user's eyes. In short, a significant difference in screen color temperature between an electronic device and the ambient color temperature can affect the user's visual experience.
[0004] Summary of the Invention
[0005] Embodiments of the present application provide an image display method and an electronic device for matching the screen color temperature of the electronic device and the RGB values of an image displayed by the electronic device with the light environment in which the electronic device is located.
[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, an image display method is provided, the method comprising:
[0008] First, the electronic device displays a first image in a first light environment. The RGB values of the first image match the first light environment in which the electronic device is located. Different light environments provide different ambient light information, which may include ambient light illuminance and ambient color temperature.
[0009] Then, when the light environment in which the electronic device is located changes from the first light environment to the second light environment, the electronic device obtains a target screen color temperature corresponding to the target light information, wherein the target light information may include ambient light information in the second light environment, and the target screen color temperature matches the second light environment.
[0010] Finally, after displaying the first image, the electronic device displays N frames of the second image frame by frame, and adjusts the screen color temperature frame by frame according to the nonlinear color temperature change curve during the display of the N frames of the second image, until the screen color temperature of the electronic device reaches the target screen color temperature when the electronic device displays the Nth frame of the second image. 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 second image. The nonlinear color temperature change curve includes a nonlinear screen color temperature corresponding to each frame of the third image. The nonlinear screen color temperature corresponding to each frame of the third image is obtained by nonlinearly processing 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 the second image.
[0011] By adopting the image display method in the embodiment of the present application, the target screen color temperature of the electronic device after the change matches the light environment after the change, and the screen color temperature of the electronic device changes nonlinearly during the entire change process. 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 value of the last frame of the second image displayed on the electronic device matches the second light environment in which the electronic device is located. Therefore, when the user browses the image in the current light environment, the eyes will not experience symptoms such as soreness, thereby reducing the user's visual fatigue and further improving the user's visual experience.
[0012] In one possible implementation of the first aspect, the target light information may further include the screen display brightness of the electronic device under the second light environment. That is, in some possible implementations, the target light information may include the ambient light illuminance, ambient color temperature, and screen display brightness under the second light environment. This allows the target screen color temperature acquired by the electronic device to be more accurate.
[0013] In another possible implementation of the first aspect, the electronic device obtaining the target screen color temperature corresponding to the target light information may include: substituting the target light information into a first mapping relationship to obtain the target screen color temperature. The first mapping relationship indicates a mapping relationship between multiple sets of light information and screen color temperature.
[0014] The first mapping relationship can be directly stored in the electronic device. In this case, 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.
[0015] In another possible implementation of the first aspect, the electronic device does not pre-store the first mapping relationship. Therefore, the electronic device needs to obtain the first mapping relationship before obtaining the target screen color temperature corresponding to the target light information.
[0016] At this time, the image display method may further include: performing linear interpolation processing on the target mapping table to obtain a first mapping relationship, wherein the target mapping table is a mapping table between light information and screen color temperature.
[0017] In this implementation, the specific methods of the target mapping table and linear interpolation processing are related to the light information. For example, when the light information includes ambient light illumination and ambient color temperature, the target mapping table is a mapping relationship between ambient light illumination and ambient color temperature and screen color temperature. In this case, two-dimensional linear interpolation is performed on the target mapping table to obtain the first mapping relationship.
[0018] For another example, when the light information includes ambient light illuminance, ambient color temperature, and screen display brightness, the target mapping table is a mapping relationship between ambient light illuminance, ambient color temperature, screen display brightness, and screen color temperature. In this case, a three-dimensional linear interpolation process is performed on the target mapping table to obtain a first mapping relationship.
[0019] In another possible implementation of the first aspect, before displaying the N second images frame by frame, the image display method may further include: the electronic device substituting the absolute value of the difference between the target screen color temperature and the current screen color temperature corresponding to the first image into a second mapping relationship to obtain a display duration for the N second images. The second mapping relationship is a mapping relationship between a change in screen color temperature and a change duration.
[0020] 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 frames of the second image, the image display method further includes:
[0021] First, the electronic device determines a target scene corresponding to the light environment change based on the first ambient light illuminance and the second ambient light illuminance, or the first ambient color temperature and the second ambient color temperature. Then, the electronic device determines a second mapping relationship based on the mapping relationship between the target scene, the change in scene and screen color temperature, and the change duration. The first ambient color temperature is the ambient color temperature under the first light environment, the first ambient light illuminance is the ambient light illuminance under the first light environment, the second ambient color temperature is the ambient color temperature under the second light environment, and the second ambient light illuminance is the ambient light illuminance under the second light environment.
[0022] Based on this, the second mapping relationship determined by the electronic device is more accurate, so that the RGB value of each frame of the second image displayed subsequently matches the second light environment more closely.
[0023] In another possible implementation of the first aspect, determining the target scene corresponding to the light environment change based on the first ambient light illuminance and the second ambient light illuminance, or the first ambient color temperature and the second ambient color temperature, may include:
[0024] If the second ambient light illuminance is greater than the first ambient light illuminance, and the first ambient light illuminance is less than the second ambient light illuminance, the target scene is the lights-on scene. If the second ambient light illuminance is less than the second ambient light illuminance, and the first ambient light illuminance is greater than the first ambient light illuminance, the target scene is the lights-off scene. If the second ambient light illuminance is less than the first ambient light illuminance, and the first ambient light illuminance is greater than the second ambient light illuminance, the target scene is the light-enhanced scene. If the second ambient light illuminance is greater than the second ambient light illuminance, and the first ambient light illuminance is less than the first ambient light illuminance, the target scene is the light-reduced scene. If the second ambient color temperature is greater than the first ambient color temperature, the target scene is the color temperature-enhanced scene. If the second ambient color temperature is less than the first ambient color temperature, the target scene is the color temperature-reduced scene. Wherein, the first ambient light illuminance is greater than the second ambient light illuminance;
[0025] In another possible implementation of the first aspect, before displaying N frames of the second image frame by frame, the image display method may further include:
[0026] First, the electronic device multiplies the display duration by the screen refresh rate to determine the total number of frames N of the third image displayed by the electronic device during the display duration. Next, 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. Next, the electronic device determines the quotient of the first screen color temperature change and the total number of frames as the second screen color temperature change. Finally, the electronic device determines the linear screen color temperature corresponding to each frame of the third image as the sum of the first screen color temperature and the second screen color temperature change.
[0027] The first screen color temperature corresponding to the first frame of the N frames of third images is the current screen color temperature corresponding to the first image. The first screen color temperature corresponding to the Lth frame of the N frames of third images is the linear screen color temperature corresponding to the L-1th frame of the N frames of third images. L is a positive integer greater than or equal to 2 and less than or equal to N.
[0028] In another possible implementation of the first aspect, before displaying N frames of the second image frame by frame, the above-mentioned image display method may also 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 a nonlinear conversion formula to obtain the nonlinear screen color temperature corresponding to each frame of the third image.
[0029] Among them, the nonlinear transformation formula is:
[0030] Among them, noLinearTargetCCT is the nonlinear 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 nonlinear change rate of the screen color temperature.
[0031] In another possible implementation of the first aspect, before displaying N frames of the second image frame by frame, the image display method may further include:
[0032] N color temperature conversion matrices are determined based on the nonlinear screen color temperature corresponding to each third image frame, the color deviation value, and the first color coordinates of the white point at the fourth screen color temperature corresponding to each third image frame. The first color coordinates are the color coordinates of the white point in the RGB color space. The fourth screen color temperature of the Mth third image frame is the nonlinear screen color temperature of the M-1th third image frame, where M is a positive integer greater than or equal to 2 and less than N.
[0033] In another possible implementation of the first aspect, determining N color temperature conversion matrices based on the nonlinear screen color temperature corresponding to each frame of the third image, the color deviation value, and the first color coordinates of the white point at the fourth screen color temperature corresponding to each frame of the third image includes:
[0034] First, the electronic device obtains the XYZ values of the white point at the fourth screen color temperature corresponding to each frame of the third image based on the first color coordinates of the white point at the fourth screen color temperature corresponding to each frame of the third image. Second, the electronic device substitutes 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. Third, the electronic device determines the second color coordinates of the white point at the nonlinear screen color temperature corresponding to each frame of the third image based on the nonlinear screen color temperature, color deviation value, and third color temperature threshold value corresponding to each frame of the third image. Next, the electronic device obtains the XYZ values of the white point at the nonlinear screen color temperature corresponding to each frame of the third image based on the second color coordinates of the white point at the nonlinear screen color temperature corresponding to each frame of the third image. Finally, the electronic device substitutes the XYZ values of the white point at the nonlinear 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 nonlinear 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 based on the RGB value of the white point at the fourth screen color temperature corresponding to each frame of the third image and the RGB value of the white point at the nonlinear screen color temperature corresponding to each frame of the third image.
[0035] The second color coordinates are: the color coordinates of the white point of each frame of the third image in the xy coordinate system of the XYZ color space under the nonlinear screen color temperature corresponding to each frame of the third image.
[0036] Among them, the color gamut conversion formula is:
[0037] Among them, (R, G, B) is the RGB value; (X, Y, Z) is the XYZ value; The color gamut conversion matrix between XYZ color space and RGB color space.
[0038] In another possible implementation of the first aspect, determining the second color coordinates of the white point at the nonlinear screen color temperature corresponding to each frame of the third image based on the nonlinear screen color temperature, the color deviation value, and the third color temperature threshold corresponding to each frame of the third image may include:
[0039] First, the electronic device substitutes the nonlinear screen color temperature corresponding to each third image into a color coordinate calculation formula to obtain the first preset color coordinates of the white point at the nonlinear screen color temperature corresponding to each third image. Then, if the color deviation value is less than a first threshold, the electronic device directly determines the first preset color coordinates of the white point at the nonlinear screen color temperature corresponding to each third image as the second color coordinates of the white point at the nonlinear screen color temperature corresponding to each third image. 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 nonlinear screen color temperature corresponding to each third image based on the first preset color coordinates of the white point at the nonlinear screen color temperature corresponding to each third image, the nonlinear screen color temperature corresponding to each third image, the third color temperature threshold, and the color deviation value.
[0040] The first preset color coordinates are: estimated color coordinates of the white point of each frame of the third image in the xy coordinate system of the XYZ color space under the nonlinear screen color temperature corresponding to each frame of the third image.
[0041] Among them, the color coordinate calculation formula is:
[0042] Among them, (x predicted ,y predicted ) are the preset color coordinates of the white point under the nonlinear 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; A1, A2, A3, B1, B2, C1, C2, C3, D, E1, E2, F, and G are constants; and H is the second color temperature threshold.
[0043] In another possible implementation of the first aspect, determining the second color coordinates of the white point at the nonlinear screen color temperature corresponding to each frame of the third image based on the first preset color coordinates of the white point at the nonlinear screen color temperature corresponding to each frame of the third image, the nonlinear screen color temperature corresponding to each frame of the third image, the third color temperature threshold, and the color deviation value may include:
[0044] First, the electronic device substitutes the first preset color coordinates of the white point at the nonlinear screen color temperature corresponding to each third image frame into a first coordinate conversion formula to obtain the third color coordinates of the white point at the nonlinear screen color temperature corresponding to each third image frame in the UV coordinate system of the XYZ color space. Second, the electronic device determines the nonlinearly adjusted screen color temperature corresponding to each third image frame as the sum of the nonlinear screen color temperature corresponding to each third image frame and the third color temperature threshold. Third, the electronic device substitutes the nonlinearly adjusted screen color temperature corresponding to each third image frame into a color coordinate calculation formula to obtain the second preset color coordinates of the white point at the nonlinear screen color temperature corresponding to each third image frame. Next, the electronic device substitutes the second preset color coordinates of the white point at the nonlinear screen color temperature corresponding to each third image frame into the first coordinate conversion formula to obtain the fourth color coordinates of the white point at the nonlinear screen color temperature corresponding to each third image frame in the UV coordinate system of the XYZ color space. Finally, the electronic device determines the second color coordinates of the white point at the nonlinear screen color temperature corresponding to each third image frame based on the third color coordinates corresponding to each third image frame, the fourth color coordinates corresponding to each third image frame, and the color deviation value.
[0045] The non-linear adjustment of the screen color temperature is a correction value of the non-linear screen color temperature.
[0046] Among them, the first coordinate transformation formula is:
[0047] Among them, (u predicted , v predicted ) are the color coordinates of the white point under the nonlinear screen color temperature corresponding to the third image of each frame in the uv coordinate system of the XYZ color space; a, b, c, and d are constants.
[0048] In another possible implementation of the first aspect, determining the second color coordinates of the white point at the nonlinear screen color temperature corresponding to each frame of the third image based on the third color coordinates corresponding to each frame of the third image, the fourth color coordinates corresponding to each frame of the third image, and the color deviation value may include:
[0049] First, the electronic device determines the difference between u3 in the third color coordinates and u4 in the fourth color coordinates corresponding to each frame of the third image as a first variation. Second, the electronic device determines the difference between v3 in the third color coordinates and v4 in the fourth color coordinates corresponding to each frame of the third image as a second variation. Third, the electronic device calculates a first ratio between the first variation and the second variation corresponding to each frame of the third image. Next, the electronic device determines the fifth color coordinates of the white point at the nonlinear screen color temperature corresponding to each frame of the third 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 third image, and the third color coordinates. Then, the electronic device substitutes 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 at the nonlinear screen color temperature corresponding to each frame of the third image.
[0050] The fifth color coordinate is the corrected third color coordinate.
[0051] Among them, the second conversion formula is:
[0052] Among them, (x_target, y_target) is the second color coordinate of the white point under the nonlinear screen color temperature corresponding to the third image of each frame; (u_target, v_target) is the fifth color coordinate corresponding to the third image of each frame; f, g, h, and m are constants.
[0053] In another possible implementation of the first aspect, determining, based on the color deviation value, the first ratio corresponding to each frame of the third image, and the third color coordinate, the fifth color coordinate of the white point at the second screen color temperature corresponding to each frame of the third image in the UV coordinate system of the XYZ color space includes:
[0054] First, the electronic device substitutes the color deviation value and the first ratio corresponding to each third image frame into a third conversion formula to calculate a third change between u3 in the third color coordinate and u4 in the fourth color coordinate corresponding to each third image frame, as well as a fourth change between v3 in the third color coordinate and v4 in the fourth color coordinate corresponding to each third image frame. Next, the electronic device determines the sum of u3 in the third color coordinate corresponding to each third image frame and the third change corresponding to each third image frame as u_target in the fifth color coordinate corresponding to each third image frame. Finally, the electronic device determines the sum of v3 in the third color coordinate corresponding to each third image frame and the fourth change corresponding to each third image frame as v_target in the fifth color coordinate corresponding to each third image frame.
[0055] The third variation is the corrected first variation, and the fourth variation is the corrected second variation.
[0056] Among them, the third conversion formula is:
[0057] Among them, du_new is the third variation corresponding to each frame of the third image; dv_new is the fourth variation corresponding to each frame of the third image; radio is the first ratio corresponding to each frame of the third image; Duv is the color deviation value.
[0058] In another possible implementation of the first aspect, obtaining, based on the first color coordinates of the white point at the fourth screen color temperature corresponding to each frame of the third image, the XYZ value of the white point at the fourth screen color temperature corresponding to each frame of the third image may include:
[0059] First, the electronic device substitutes the first color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image into the fourth coordinate conversion formula to obtain the sixth color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image. Then, based on the relationship between the sixth color coordinate of the white point and the XYZ value of the white point, the electronic device converts the sixth color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image to obtain the XYZ value of the white point at the fourth screen color temperature corresponding to each frame of the third image.
[0060] The sixth color coordinate is: the color coordinate of the white point in the xy coordinate system of the XYZ color space at the fourth screen color temperature.
[0061] Among them, the fourth coordinate transformation formula is:
[0062] Wherein, (r1, g1, b1) is the first color coordinate of the white point corresponding to the third image of each frame; (x1, y1) is the sixth color coordinate of the white point corresponding to the third image of each frame; It is the conversion matrix between the color coordinates of the RGB color space and the color coordinates of the XYZ color space.
[0063] In another possible implementation of the first aspect, obtaining a color temperature conversion matrix corresponding to each frame of the third image based on the RGB value of the white point at the fourth screen color temperature corresponding to each frame of the third image and the RGB value of the white point at the nonlinear screen color temperature corresponding to each frame of the third image includes:
[0064] First, the electronic device calculates three second ratios between the RGB value of the white point at the nonlinear screen color temperature corresponding to each third image frame and the RGB value of the white point at the fourth screen color temperature corresponding to each third image frame. Then, the electronic device obtains a color temperature conversion matrix corresponding to each image frame based on the three second ratios corresponding to each image frame.
[0065] Among them, the three second ratios are: G target , B target) is the RGB value of the white point under the nonlinear screen color temperature corresponding to the third image of each frame, (R current , G current , B current ) is the RGB value of the white point at the fourth screen color temperature corresponding to each frame of the third image.
[0066] Therefore, the color temperature conversion matrix is:
[0067] In another possible implementation of the first aspect, the frame-by-frame display of N second images may include: first, the electronic device uses each color temperature conversion matrix to adjust the RGB value of each pixel in each corresponding third image frame to obtain each second image frame; and then, the electronic device displays each second image frame.
[0068] In another possible implementation of the first aspect, before obtaining the target screen color temperature corresponding to the target light information, the image display method may further include:
[0069] First, the electronic device obtains the current ambient light illuminance and the current ambient color temperature of the light environment in which the electronic device is located. Secondly, the electronic device determines the absolute value of the difference between the current ambient light illuminance and the historical ambient light illuminance as the change in ambient light illuminance, and determines the absolute value of the difference between the current ambient color temperature and the historical ambient color temperature as the change in ambient color temperature. Thirdly, the electronic device determines that the light environment in which the electronic device is located has changed from the first light environment to the second light environment based on the fact that the change in ambient light illuminance exceeds the light illuminance threshold, and / or the change in ambient color temperature exceeds the first color temperature threshold. Alternatively, based on the fact that the change in the light environment does not exceed the light illuminance threshold, and the change in ambient color temperature does not exceed the first color temperature threshold, it is determined that the light environment in which the electronic device is located is the first light environment.
[0070] The current ambient light intensity is the ambient light intensity at the current collection time, and the current ambient color temperature is the ambient color temperature at the current collection time. The historical ambient light intensity is the ambient light intensity at the historical collection time, and the historical ambient color temperature is the ambient color temperature at the historical collection time. The historical collection time is the collection time before the current collection time.
[0071] In another possible implementation of the first aspect, the image display method may further include: based on the light environment in which the electronic device is located being the first light environment, the electronic device does not adjust the screen color temperature.
[0072] In another possible implementation of the first aspect, the color and color temperature interface of the electronic device includes a preset switch. The above-mentioned obtaining the current ambient light illuminance and the current ambient color temperature of the light environment in which the electronic device is located may include:
[0073] The preset switch is in the on state, and the current ambient light illuminance and the current ambient color temperature of the light environment in which the electronic device is located are obtained.
[0074] In a second aspect, an electronic device is provided, comprising: a display screen, an ambient light sensor, a processor, and a memory. The display screen is configured to display an image. The ambient light sensor is configured to obtain ambient light illuminance and ambient color temperature, and transmit the ambient light illuminance and ambient color temperature to the processor. The memory stores instructions. When the processor executes the instructions, the method described in the first aspect and any embodiment thereof is performed.
[0075] In a third aspect, a computer-readable storage medium is provided, comprising instructions, which, when executed on an electronic device, enable the electronic device to execute the method as described in the first aspect and any embodiment thereof.
[0076] In a fourth aspect, a computer program product comprising instructions is provided. When the instructions are executed on the electronic device, the electronic device executes the method as described in the first aspect and any embodiment thereof.
[0077] In a fifth aspect, a chip system is provided, which includes a processor for supporting an electronic device in implementing the functions described in the first aspect. In one possible design, the electronic device further includes an interface circuit, which 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 a chip and may also include other discrete components.
[0078] Among them, the technical effects of the second to fifth aspects can refer to the technical effects of the first aspect and any of its embodiments, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] FIG1 is a schematic diagram of a display interface of an electronic device in a first light environment in conventional technology;
[0080] FIG2 is a schematic diagram of a display interface of an electronic device in a second light environment according to conventional technology;
[0081] FIG3 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0082] FIG4 is a schematic diagram of a software architecture for an electronic device according to an embodiment of the present application;
[0083] FIG5 is a flow chart of an image display method according to an embodiment of the present application;
[0084] FIG6 is a second flow chart of an image display method provided in an embodiment of the present application;
[0085] FIG7 is a schematic diagram of an interface of an electronic device provided in an embodiment of the present application;
[0086] FIG8 is a schematic diagram of a light environment change provided by an embodiment of the present application;
[0087] FIG9 is a third flow chart of an image display method provided in an embodiment of the present application;
[0088] FIG10 is a schematic diagram of a two-dimensional linear interpolation provided in an embodiment of the present application;
[0089] FIG11 is a schematic diagram of a mapping relationship between ambient light illumination, ambient color temperature, screen display brightness, and screen color temperature of an electronic device provided in an embodiment of the present application;
[0090] FIG12 is a schematic diagram of a three-dimensional linear interpolation provided in an embodiment of the present application;
[0091] FIG13 is a schematic diagram showing a correspondence between a change in screen color temperature and a change duration, provided by an embodiment of the present application;
[0092] FIG14 is a fourth flow chart of an image display method provided in an embodiment of the present application;
[0093] FIG15 is a fifth flow chart of an image display method provided in an embodiment of the present application;
[0094] FIG16 is a schematic diagram comparing nonlinear transformation and linear transformation of screen color temperature provided by an embodiment of the present application;
[0095] FIG17 is a schematic diagram showing the effect of screen color temperature change provided in an embodiment of the present application;
[0096] FIG18 is a sixth flow chart of an image display method provided in an embodiment of the present application;
[0097] FIG19 is a schematic structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0098] 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.
[0099] The terms "exemplary" or "for example" in the embodiments of this application are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0100] The terms "coupling" and "connection" involved in the embodiments of this application should be understood in a broad sense. For example, they may refer to a physical direct connection, or an indirect connection achieved through electronic devices, such as a connection achieved through resistors, inductors, capacitors or other electronic devices.
[0101] First, some concepts involved in the embodiments of this application are introduced.
[0102] 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. The unit is K (Kelvin).
[0103] White point: The 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., the white point coordinates or white point color coordinates) will affect the performance of most colors on the display.
[0104] Illuminance: Illuminance refers to the amount of light per unit area received by an object. The unit of illuminance is lux.
[0105] Screen brightness: Screen brightness refers to the intensity of light emitted by the display screen (i.e., a luminous object). The unit of brightness is candela per square meter or nits.
[0106] RGB color space: RGB color space is short for red, green, and blue. It's also known as the CIE 1931-RGB system. The RGB color space is a spatial system that quantitatively describes color perception using red, green, and blue. In the RGB color space, colors can be expressed using coordinates.
[0107] XYZ color space: XYZ color space is a new colorimetric representation system based on the RGB color space, using three hypothetical primary colors, X, Y, and Z. The XYZ color space is also known as the CIE 1931-XYZ system. Simply put, X, Y, and Z in the XYZ color space are linear transformations of R, G, and B in the RGB color space. X, Y, and Z also represent the stimulus values of the three primary colors, R, G, and B, respectively.
[0108] Currently, most electronic devices (such as mobile phones) have display functions, and more and more users use these devices to browse images (such as pictures or videos). When an electronic device displays an image, a significant difference between the screen color temperature of the electronic device and the ambient color temperature can cause the user's perceived image color to be distorted (e.g., a yellowish tint), increase visual fatigue, and even damage the user's eyes. In short, a significant difference between the screen color temperature of an electronic device and the ambient color temperature can affect the user's visual experience. The following uses a mobile phone as an example to illustrate this issue.
[0109] FIG1 shows a schematic diagram of a display interface of an electronic device in a first light environment in conventional technology. As shown in FIG1 , a mobile phone 100 is in a first light environment (such as a dark light environment). The ambient color temperature of the first light environment is relatively low. The display interface 110 of the mobile phone 100 displays a first image 111. The ambient color temperature is relatively low, while the screen color temperature of the mobile phone 100 is relatively high (not shown in FIG1 ), causing the hue of the first image 111 visually perceived by the user to be cold (such as a bluish hue). In this way, when the user browses the first image 111 in the first light environment, not only will the hue of the image perceived by the user not match the true hue of the image, but the user's eyes will also experience symptoms such as soreness, thereby increasing the user's visual fatigue.
[0110] In addition, since the ambient color temperature is low and the screen color temperature is high, when the user browses the first image 111 in the first light environment, the blue light source in the white light displayed by the mobile phone 100 cannot be filtered through the pupil of the eye, causing great damage to the eyes.
[0111] It should be noted that the light environment refers to the ambient light conditions of the display screen of the electronic device. The light environment can include, but is not limited to, artificial light environments and natural light environments. For example, the artificial light environment can include a lighting environment. The natural light environment can include sunlight, moonlight, etc. The dim light environment can include, but is not limited to, the light environment of a dark room with the lights turned off or the light environment with poor lighting on gloomy days.
[0112] FIG2 is a schematic diagram of a conventional electronic device display interface in a second light environment. As shown in FIG2 , a mobile phone 100 is in a second light environment (e.g., 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 a second image 210. The screen color temperature of the mobile phone 100 is relatively low (not shown in FIG2 ). The high ambient color temperature and the low screen color temperature of the mobile phone 100 cause the user to perceive the second image 210 as having a warmer hue (e.g., a yellowish hue).
[0113] That is, when the ambient color temperature is high and the screen color temperature of the mobile phone 100 is low, the hue of the image perceived by the user will not match the true hue of the image, which will affect the user's visual experience when browsing the second image.
[0114] It should be noted that, based on the above introduction to the light environment, the bright light environment can be a light environment with lights on in a dark room or a light environment with better light outdoors on a clear day, but is not limited thereto.
[0115] To sum up, when a user is browsing images through an electronic device, if the screen color temperature of the electronic device is significantly different from the ambient color temperature, the hue of the image perceived by the user will be distorted, the user's visual fatigue will increase, and even damage the user's eyes will be caused, all of which will seriously affect the user's visual experience.
[0116] In order to solve the above problems, an embodiment of the present application provides an image display method and an electronic device. The electronic device is in a bright screen state, and when the light environment in which the electronic device is located changes from a first light environment to a second light environment: first, the electronic device can obtain a target screen color temperature that matches the changed second light environment based on the ambient light illumination and the ambient color temperature under the first light environment. Then, the electronic device can obtain N color temperature conversion matrices corresponding to the N frames of original images to be displayed in the process of the electronic device converting the screen color temperature from the current screen color temperature to the target screen color temperature based on the target screen color temperature and the current screen color temperature (that is, the screen color temperature corresponding to the first light environment). Then, the electronic device can use each color temperature conversion matrix to process each frame of the original image separately, and display the N frames of target images corresponding to the N frames of original images frame by frame. At the same time, the electronic device adjusts the screen color temperature frame by frame according to the nonlinear color temperature change curve in the process of displaying the N frames of target images frame by frame, until the screen color temperature of the electronic device reaches the target screen color temperature when the electronic device displays the Nth frame of target image.
[0117] It can be seen that, on the one hand, the screen color temperature change process of the electronic device provided by the embodiment of the present application is nonlinear, so that the entire change process of the screen color temperature is not abrupt, which can enhance the user's visual experience. At the same time, the target screen color temperature of the electronic device is jointly determined by the ambient light illumination and the ambient color temperature of the changed second light environment, so that the accuracy of the target screen color temperature is higher, thereby making the target screen color temperature more matched with the second light environment. On the other hand, the RGB value (or color adaptation) of the target image finally browsed by the user matches 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 enhanced. In short, the electronic device provided by the embodiment of the present application will enhance the user's visual experience when browsing images.
[0118] The electronic device involved in the embodiments of the present application may be a device with a display function and a data processing function, and the electronic device may be mobile or fixed. The electronic device may be deployed on land (for example, indoors or outdoors, handheld or vehicle-mounted, etc.), on water (for example, ships, etc.), or in the air (for example, airplanes, balloons, etc.). The electronic device may be referred to as user equipment (UE), access terminal, terminal unit, subscriber unit, terminal station, mobile station (MS), mobile station, terminal agent or terminal device, etc. For example, the electronic device may be a mobile phone, a tablet computer, a laptop computer, etc. The embodiments of the present application do not limit the specific type and structure of the electronic device. A possible structure of the electronic device is described below.
[0119] Taking a mobile phone as an example, FIG3 shows a schematic diagram of the hardware structure of an electronic device 300 provided in 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 360, an audio module 370, a camera 380, a sensor module 390, and the like.
[0120] It should 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 shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0121] 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 can be independent devices or integrated into one or more processors. The controller can be the nerve center and command center of the electronic device 300. The controller can generate operation control signals based on instruction opcodes and timing signals to complete the control of instruction fetching and execution.
[0122] Processor 310 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 310 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 310. If processor 310 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 310 latency, and thus improves system efficiency.
[0123] 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, among others.
[0124] It is understood that the interface connection relationship between the modules illustrated in this embodiment is only for illustrative purposes and does not constitute a structural limitation on the electronic device. In other embodiments, the electronic device may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0125] The memory 320 can be used to store computer executable program codes, which 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 can store an operating system, an application required for at least one function (such as a sound playback function, an interface display function, etc.). The data storage area can store data created during the use of the electronic device (such as notification messages), etc. 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.
[0126] The power management module 340 is used to connect the battery and processor 310. The power management module 340 receives battery and / or power input to power the processor 310, memory 320, communication module 350, display 360, 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 other embodiments, the power management module 340 can also be provided in the processor 310.
[0127] The communication module 350 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 300. The communication module 350 can be one or more devices that integrate at least one communication processing module. The communication module 350 receives electromagnetic waves via an antenna, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 310. The communication module 350 can also receive the signal to be sent from the processor 310, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna.
[0128] In some embodiments, the antenna of the electronic device 300 is coupled to the communication module 350 so that the electronic device 300 can communicate with a network and other devices via 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. 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).
[0129] Electronic device 300 implements display functionality through a GPU, display screen 360, and an application processor. The GPU is a microprocessor for image processing that connects display screen 360 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 310 may include one or more GPUs that execute program instructions to generate or modify display information.
[0130] Display screen 360 is used to display images, videos, etc. Display screen 360 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini-LED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.
[0131] The electronic device 300 can implement a shooting function through an ISP, a camera 380, a video codec, a GPU, a display screen 360, and an application processor.
[0132] The audio module 370 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 370 can also be used to encode and decode audio signals. In some embodiments, the audio module 370 can be provided in the processor 310, or some functional modules of the audio module 370 can be provided in the processor 310.
[0133] Camera 380 is used to capture still images or videos. The 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, which is then passed to the ISP for conversion 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 a standard format such as RGB or YUV.
[0134] The sensor module 390 may include an ambient light sensor, a pressure sensor, a gravity sensor, etc. The ambient light sensor may acquire ambient light information of the light environment in which the electronic device is located. The ambient light information may include ambient light illumination, ambient color temperature, etc.
[0135] In some embodiments, an ambient light sensor can simultaneously obtain all ambient light information such as ambient light illumination and ambient color temperature. In this case, the sensor module 390 may include one ambient light sensor. In other embodiments, one ambient light sensor can obtain one type of ambient light information. In this case, the sensor module 390 may include at least two different types of ambient light sensors, which respectively obtain ambient light information such as ambient light illumination and ambient color temperature. In other embodiments, one ambient light sensor can obtain multiple types of ambient light information. In this case, 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 of an ambient light sensor that can simultaneously obtain all ambient light information.
[0136] It is understandable that, generally speaking, the realization of electronic device functions requires not only hardware support but also software cooperation.
[0137] The software system of the electronic device can adopt a layered architecture, event-driven architecture, micro-core architecture, micro-service architecture, or cloud architecture. Take as an example to illustrate the software structure of an electronic device.
[0138] FIG4 shows a schematic diagram of a software architecture for operation of an electronic device provided in an embodiment of the present application.
[0139] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, as shown in Figure 4, the Android It is divided into five layers, from top to bottom: application layer, application framework layer, Android runtime system library, hardware abstraction layer and kernel layer.
[0140] The application layer may include a series of application packages. As shown in FIG4 , the application package may include: camera, gallery, calendar, call, map, navigation, settings, Bluetooth, music, video, short message, desktop launcher, media library and other applications.
[0141] Specifically, the content in the application can be sent to the display screen for display, so that the user can browse it. For example, images in a gallery or video can be displayed on the display screen.
[0142] 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 light illumination (such as the current ambient light illumination) and the ambient color temperature (such as the current ambient color temperature) from the sensor driver of the kernel layer.
[0143] For example, the settings application may set the on / off state of a preset switch in response to a user's switch operation. 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. Alternatively, 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 the present invention is not limited thereto.
[0144] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0145] As shown in Figure 4, the application framework layer may include a color adjustment module, but is not limited thereto. The color adjustment module pre-stores the image display method provided in the embodiment of the present application.
[0146] In one embodiment, the color adjustment module can obtain the screen state of the display screen and the screen parameters of the display screen from the display driver of the kernel layer. The screen state can be a black screen state or a bright screen state. When the screen state is the bright screen state: first, the color adjustment module can obtain the ambient light illumination and the ambient color temperature from the sensor driver of the kernel layer. Then, based on the change of the light environment in which the mobile phone is located 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. Then, the color adjustment module can obtain N color temperature conversion matrices based on the ambient light illumination, ambient color temperature, screen color temperature and screen parameters in the second light environment. Finally, the color adjustment module adjusts 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 to the display screen frame by frame for display.
[0147] In another embodiment, the color adjustment module may also obtain the switch status of a preset switch from the application layer. The switch status of the preset switch may be on or off. The color adjustment module will only perform the image display process described in the above embodiment when the screen is in the bright state and the preset switch is on.
[0148] In another embodiment, the color adjustment module may also obtain the screen display brightness of the display screen under the second lighting environment from the display driver of the kernel layer. In this case, the color adjustment module may obtain N color temperature conversion matrices based on the ambient light illumination, ambient color temperature, screen color temperature, screen parameters, and screen display brightness under the second lighting environment. The remaining processes remain unchanged and are not further described in detail in this embodiment of the present application.
[0149] The Android Runtime includes the core library and virtual machine. The Android Runtime is responsible for scheduling and management of the Android system.
[0150] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0151] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0152] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0153] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0154] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0155] The media library may include a media provider (MediaProvider), which stores multimedia file data, such as audio, video, image, and other data.
[0156] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0157] A 2D graphics engine is a drawing engine for 2D drawing.
[0158] The hardware abstraction layer may include: a display hardware abstraction module and a light sensor hardware abstraction module.
[0159] The kernel layer is the layer between hardware and software and can include display drivers and sensor drivers.
[0160] 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 light illumination (such as the current ambient light illumination) and ambient color temperature (such as the current ambient color temperature) based on the ambient light.
[0161] Next, the following describes an image display method provided by an embodiment of the present application in conjunction with Figures 5 to 19. Figure 5 shows one of the flow charts of an image display method provided by an embodiment of the present application. As shown in Figure 5, the image display method may include:
[0162] S501: The electronic device displays a first image in a first light environment.
[0163] The ambient light information is different in different light environments. The ambient light information may indicate the ambient light conditions of the light environment in which the electronic device is located. Generally, the ambient light information may include ambient light illuminance and ambient color temperature.
[0164] The values of the three primary colors (ie, RGB values) of the first image match the first light environment in which the electronic device is located.
[0165] S502: The electronic device obtains the current ambient light illuminance and the current ambient color temperature of the light environment in which the electronic device is located.
[0166] The current ambient light intensity refers to the ambient light intensity in the light environment where the electronic device is located at the current collection moment. The current ambient color temperature refers to the ambient color temperature in the light environment where the electronic device is located at the current collection moment.
[0167] Specifically, the electronic device may be provided with an ambient light sensor. The ambient light sensor may collect ambient light from the surrounding environment and obtain the ambient light illuminance and ambient color temperature based on the ambient light. That is, at the current collection moment, the ambient light sensor collects the ambient light of the light environment in which the electronic device is located (hereinafter referred to as the current ambient light) and obtains the current ambient light illuminance and the current ambient color temperature based on the current ambient light.
[0168] It should be noted that how the ambient light sensor obtains the ambient light illumination and the ambient color temperature based on the ambient light can be referred to the relevant introduction in the prior art, and the embodiments of the present application will not be described in detail.
[0169] In one embodiment, when the electronic device is in the screen-on state, the ambient light sensor can collect ambient light from the electronic device's surroundings at a fixed frequency, and obtain the ambient light illuminance and ambient color temperature based on the ambient light. In other words, based on the electronic device being in the screen-on state, the electronic device can obtain the ambient light illuminance and ambient color temperature of the electronic device's surroundings at different collection times, without having to continuously obtain the ambient light illuminance and ambient color temperature of the electronic device's surroundings. This can reduce the amount of computation required by the electronic device, conserving system resources and power consumption.
[0170] Furthermore, the electronic device can store ambient light information, such as ambient light intensity and ambient color temperature, acquired at different acquisition times in its memory. When the electronic device needs this ambient light information, it can retrieve it from the memory. This is both convenient and fast, improving the efficiency of the electronic device.
[0171] In another embodiment, when the electronic device is in a black screen state, the user will not browse images through the electronic device, so the electronic device does not need to adjust the screen color temperature, nor does it need to adjust the image in the electronic device. In other words, when the electronic device is in a black screen state, the electronic device does not need to execute the image display method provided in the embodiment of the present application. Based on this, when the electronic device is in a black screen state, the electronic device does not obtain the current ambient light illumination and the current ambient color temperature of the light environment in which the electronic device is located. In this way, the amount of calculation of the electronic device can be further reduced, saving the system resources and power consumption of the electronic device.
[0172] Furthermore, FIG6 shows a second flow chart of an image display method provided in an embodiment of the present application.
[0173] Optionally, in combination with FIG5 , as shown in FIG6 , the above S502 may be replaced by the following S601 .
[0174] S601: Based on a preset switch being in an on state, the electronic device obtains the current ambient light illumination and the current ambient color temperature of the light environment in which the electronic device is located.
[0175] When the electronic device is in the screen-on state, whether the electronic device obtains the current ambient light intensity and the current ambient color temperature is related to the switch state of the preset switch.
[0176] 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 light illumination and the current ambient color temperature of the light environment in which the electronic device is located through the ambient light sensor. Otherwise, the electronic device will not obtain the current ambient light illumination and the current ambient color temperature of the light environment in which the electronic device is located through the ambient light sensor.
[0177] The electronic device may switch the switch state of the preset switch in response to a user's on / off operation on the preset switch. For example, the preset switch may switch from an on state to an off state, or from an off state to an on state. The electronic device may obtain the switch state of the preset switch at a fixed frequency. Alternatively, the electronic device may obtain the switch state of the preset switch after determining that the switch state of the preset switch has changed.
[0178] FIG7 shows a schematic diagram of an interface of an electronic device provided in an embodiment of the present application.
[0179] In one embodiment, as shown in A of FIG7 , the settings interface 710 of the mobile phone 100 includes a first control 711 (such as display and brightness). As shown in B of FIG7 , the mobile phone 100 switches from the settings interface 710 to the display and brightness interface 720 in response to a triggering operation on the first control 711. The display and brightness interface 720 includes a second control 721 (such as color and color temperature). As shown in C of FIG7 , the mobile phone 100 switches from the display and brightness interface 720 to the color and color temperature interface 730 in response to a triggering operation on the second control 721. The color and color temperature interface 730 includes a preset switch 731 (such as natural color display). As shown in D of FIG7 , the mobile phone 100 switches from an off state to an on state in response to an on operation on the preset switch 731.
[0180] At this time, the mobile phone 100 is in a bright screen state, and the preset switch 731 is in an on state. Therefore, the mobile phone 100 can obtain the current ambient light illumination and the current ambient color temperature of the light environment in which the mobile phone 100 is located.
[0181] In this embodiment, the electronic device can obtain the current ambient light illumination and the current ambient color temperature based on the user's needs, thereby executing the image display method provided in 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, ultimately improving the user's visual experience.
[0182] S503: The electronic device determines the absolute value of the difference between the current ambient light illuminance and the historical ambient light illuminance as the change in ambient light illuminance, and determines the absolute value of the difference between the current ambient color temperature and the historical ambient color temperature as the change in ambient color temperature.
[0183] The historical ambient light intensity refers to the ambient light intensity of the electronic device's environment, as captured by the ambient light sensor at the historical collection time. The historical ambient color temperature refers to the ambient color temperature of the electronic device's environment, as captured by the ambient light sensor at the historical collection time. The historical collection time is the collection time immediately preceding the current collection time.
[0184] S504: The electronic device determines that the light environment in which the electronic device is located is the first light environment based on the fact that the change in the ambient light illumination does not exceed the light illumination threshold and the change in the ambient color temperature does not exceed the first color temperature threshold.
[0185] Specifically, when the change in ambient light illuminance does not exceed the illuminance threshold and the change in ambient color temperature does not exceed the first color temperature threshold, the electronic device can determine that the light environment it is in has not changed. Therefore, the electronic device is still in the first light environment.
[0186] S505: Based on the light environment in which the electronic device is located being the first light environment, the electronic device does not adjust the screen color temperature.
[0187] Among them, screen color temperature refers to: one of the important standards for measuring the screen color display quality of electronic equipment's display screen. Users' perception of the same screen color will vary with different screen color temperatures.
[0188] Specifically, when the lighting environment of an electronic device remains unchanged, the electronic device does not need to adjust the screen color temperature of the display. Furthermore, the electronic device does not need to adjust the image displayed on the display. This not only conserves system resources but also ensures that the screen color temperature of the electronic device and the image displayed by the electronic device match the lighting environment of the electronic device, improving the user's visual experience when browsing images displayed by the electronic device.
[0189] S506: The electronic device obtains a target screen color temperature corresponding to the target light information based on the change in ambient light illumination exceeding a light illumination threshold and / or the change in ambient color temperature exceeding a first color temperature threshold.
[0190] Specifically, if at least one of the change in ambient light illumination and the change in ambient color temperature exceeds the corresponding threshold, it can be indicated that the light environment in which the electronic device is located has changed, that is, the light environment in which the electronic device is located has changed from the first light environment to the second light environment.
[0191] FIG8 shows a schematic diagram of a light environment change provided by an embodiment of the present application.
[0192] In one embodiment, as shown in A of FIG8 , mobile phone 100 is in a 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). It is assumed that the third light environment is the light environment in which mobile phone 100 was located at the last acquisition moment.
[0193] As shown in B in Figure 8, the mobile phone 100 is in the fourth light environment. The ambient light illuminance of the fourth light environment is 80,000 lx. The ambient color temperature of the fourth environment is 5,000 CCT. Assume that the fourth light environment is the light environment in which the mobile phone 100 is located at the current acquisition moment. It can be seen that the change between the ambient light illuminance of the fourth light environment and the ambient light illuminance of the third light environment is 20,000 lx, and the change between the ambient color temperature of the fourth light environment and the ambient color temperature of the third light environment is 1,000 CCT. Assume that the light intensity threshold is 70 lx and the first color temperature threshold is 80 CCT. By comparison, it can be seen that the change between the ambient light intensity of the fourth light environment and the ambient light intensity of the third light environment exceeds the light intensity threshold, and the change 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, so the light environment in which the electronic device is located has changed.
[0194] Alternatively, as shown in C in Figure 8, the mobile phone 100 is in the fifth light environment. The ambient light illuminance of the fifth light environment is 59980lx. The ambient color temperature of the fifth light environment is 4050CCT. Assume that the fifth light environment is the light environment in which the mobile phone 100 is located at another current acquisition moment. It can be seen that the change in the ambient light illuminance of the fifth light environment and the ambient light illuminance of the third light environment is 20lx, and the change in the ambient color temperature of the fifth light environment and the ambient color temperature of the third light environment is 50CCT. By comparison, it can be seen that the change in the ambient light illuminance of the fifth light environment and the ambient light illuminance of the third light environment does not exceed the light illuminance threshold, and the change in 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, so the light environment in which the electronic device is located has not changed.
[0195] Specifically, the target screen color temperature is a screen color temperature that matches the current light environment (i.e., the second light environment). When the color temperature of the electronic device's display is at the target screen color temperature, the user's perceived image colors will not be distorted when browsing images through the electronic device, which will reduce visual fatigue, protect the user's eyes, and enhance the user's visual experience.
[0196] FIG9 shows a third flow chart of an image display method provided in an embodiment of the present application.
[0197] In one embodiment, in combination with FIG. 5 , as shown in FIG. 9 , the above S506 may be replaced by the following S901 .
[0198] S901: Based on the change in ambient light illuminance exceeding a light illuminance threshold and / or the change in ambient color temperature exceeding a first color temperature threshold, the electronic device substitutes target light information into a first mapping relationship to obtain a target screen color temperature of the electronic device.
[0199] The first mapping relationship is used to indicate the mapping relationship between multiple sets of light information and screen color temperature. Different light information corresponds to different first mapping relationships. The following describes different situations.
[0200] Optionally, the light information may include ambient light information (such as ambient light illuminance and ambient color temperature), and thus the target light information may include ambient light information in the second environment (such as current ambient light illuminance and current ambient color temperature). Based on this, the first mapping relationship may be: a mapping relationship f(lux, cct) between ambient light illuminance and ambient color temperature and the screen color temperature of the electronic device.
[0201] In one embodiment, the first mapping relationship may be obtained by processing a target mapping table (referred to as a first mapping table) between ambient light illumination and ambient color temperature and the screen color temperature of the electronic device using a two-dimensional linear interpolation method. The target mapping table between ambient light illumination and ambient color temperature and the screen color temperature of the electronic device may be pre-stored in the electronic device.
[0202] For example, the mapping table may be as shown in Table 1:
[0203] Table 1
[0204] As can be seen from Table 1, one ambient light illuminance and one ambient color temperature can correspond to one screen color temperature. Since the data in Table 1 are discrete data, in the embodiment of the present application, based on Table 1, a two-dimensional linear interpolation method is used to obtain the first preset relationship f(lux, cct).
[0205] FIG10 shows a schematic diagram of a two-dimensional linear interpolation provided in an embodiment of the present application.
[0206] For example, as shown in Figure 10, the abscissa is the ambient color temperature, the ordinate is the ambient light illuminance, and the intersection of the abscissa and ordinate is the screen color temperature. Based on Table 1, a two-dimensional linear interpolation method is used to obtain the first preset relationship f(lux, cct).
[0207] Next, the current ambient color temperature and the current ambient illuminance are substituted into the first preset relationship f(lux, cct), that is, cct = Currentcct1 and lux = Currentlux1, to obtain the target screen color temperature. In other words, the target screen color temperature can be expressed by the following formula (1): TargetCCT = f(Currentlux1, Currentcct1) (1)
[0208] Among them, TargetCCT is the target screen color temperature; Currentlux1 is the current ambient illuminance, and Currentcct1 is the current ambient color temperature.
[0209] In other embodiments, the electronic device does not pre-store a mapping table between the ambient light illumination and ambient color temperature and the screen color temperature of the electronic device. Instead, the first mapping relationship f(lux, cct) is directly pre-stored in the electronic device. In this way, the electronic device can directly call the first mapping relationship f(lux, cct). Based on this, the electronic device's computational workload can be greatly reduced, further conserving system resources and power consumption.
[0210] Optionally, based on the above embodiment, the light information may further include device light information (e.g., screen display brightness). Therefore, the target light information may further include device light information in the second environment (e.g., current screen display brightness). Based on this, the first mapping relationship may be a mapping relationship f(lux, cct, nit) between ambient light illuminance, ambient color temperature, and screen display brightness and the screen color temperature of the electronic device.
[0211] In one embodiment, the first mapping relationship can be obtained by processing a target mapping table (which may be referred to as a second mapping table) between ambient light illumination, ambient color temperature, and screen display brightness and the screen color temperature of the electronic device using a three-dimensional linear interpolation method by the electronic device. The target mapping table between ambient light illumination, ambient color temperature, and screen display brightness and the screen color temperature of the electronic device can be pre-stored in the electronic device. In the embodiment of the present application, for ease of understanding, the second mapping table is shown in the form of a diagram.
[0212] FIG11 shows a schematic diagram of a mapping relationship among ambient light illumination, ambient color temperature, screen display brightness, and screen color temperature of an electronic device, provided in an embodiment of the present application.
[0213] In one embodiment, as shown in FIG11 , the horizontal axis represents the ambient light illumination, the vertical axis represents the screen display brightness, and the vertical axis represents the ambient color temperature. The intersection of the horizontal axis, the vertical axis, and the vertical axis represents the screen color temperature.
[0214] Specifically, as shown in Figure 11, an ambient light illuminance, an ambient color temperature, and a screen display brightness can correspond to a screen color temperature. Since the data in Figure 11 are discrete data, in this embodiment of the application, based on Figure 12, a three-dimensional linear interpolation method is used to obtain the first mapping relationship f(lux, cct, nit).
[0215] FIG12 shows a schematic diagram of a method for determining a target screen color temperature based on three-dimensional linear interpolation according to an embodiment of the present application.
[0216] In one embodiment, as shown in FIG12 , the current ambient color temperature, the current ambient illuminance, and the current screen display brightness are substituted into the second mapping relationship f(lux, cct, nit), i.e., cct = Currentcct, lux = Currentlux1, and nit = Currentnit, to obtain the target screen color temperature. In other words, the target screen color temperature can be expressed by the following formula (2): TargetCCT = f(Currentlux1, Currentcct1, Currentnit1) (2)
[0217] Among them, TargetCCT is the target screen color temperature; Currentlux1 is the current ambient light illuminance, Currentcct1 is the current ambient color temperature, and Currentnit1 is the current screen display brightness.
[0218] In other embodiments, the electronic device does not pre-store the mapping table between ambient light intensity, ambient color temperature, and the ambient color temperature and the screen color temperature of the electronic device. Instead, the electronic device directly pre-stores the first mapping relationship f(lux, cct, nit). In this way, the electronic device can directly call the first mapping relationship f(lux, cct, nit). Based on this, the electronic device's computational workload can be greatly reduced, further conserving system resources and power consumption.
[0219] It should be noted that, in other embodiments, the above S506 may also be replaced by S901, which will not be described in detail in the embodiment of the present application.
[0220] S507: The electronic device determines a target change duration according to the current screen color temperature, the target screen color temperature, and a third preset relationship.
[0221] Among them, the current screen color temperature refers to: before the light environment in which the electronic device is located changes, the screen color temperature of the electronic device's display screen matches the light environment before the change. The target transformation duration refers to: the transformation duration required for the electronic device's screen color temperature 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 the second image or N frames of the third image) when changing from the current screen color temperature to the target screen color temperature. For this reason, the target transformation duration can also be referred to as: the display duration of N frames of the second image, or the display duration of N frames of the third image.
[0222] In one embodiment, the screen color temperature of the electronic device in different light environments is 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.
[0223] 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 in the third screen color temperature. Then, the electronic device substitutes the change in the third screen color temperature into the second mapping relationship to obtain the target transition duration.
[0224] The second mapping relationship is a correspondence between the change in screen color temperature and the duration of the transformation. The second mapping relationship may be obtained by the electronic device processing a mapping table of the change in screen color temperature and the duration of the transformation. The mapping table of the change in screen color temperature and the duration of the transformation may be pre-stored in the electronic device. The second mapping relationship may also be referred to as a target mapping relationship.
[0225] For example, the mapping table may be as shown in Table 2:
[0226] Table 2
[0227] FIG13 shows a schematic diagram of the correspondence between the change in screen color temperature and the change duration provided in an embodiment of the present application.
[0228] In one embodiment, as shown in FIG13 , the horizontal axis represents the amount of change in screen color temperature, and the vertical axis represents the duration of the change corresponding to different amounts of change in screen color temperature. Based on the data in Table 2, the corresponding relationship between the amount of change in screen color temperature and the duration of the change can be expressed by the following formula (3):
[0229] Where t is the target transformation duration; diff is the change in screen color temperature; Val_i is a constant representing the change in screen color temperature; ti is a constant representing the transformation duration corresponding to the change in screen color temperature. i is a positive integer.
[0230] Next, the change in the third screen color temperature TargetΔCCT is substituted into the above formula (3), that is, diff=TargetΔCCT in the above formula (3), and the target change time t=t target .
[0231] In other embodiments, the electronic device does not pre-store a mapping table between the screen color temperature change amount and the change duration, but instead directly pre-stores the second mapping relationship. In this way, the electronic device can directly call the second mapping relationship. Based on this, the electronic device's computational workload can be greatly reduced, further saving the electronic device's system resources and power consumption.
[0232] Optionally, the image display method provided in the embodiment of the present application further needs to perform scene recognition before the above S507 to determine the target scene corresponding to the change in the light environment of the electronic device.
[0233] FIG14 shows a fifth flow chart of an image display method provided in an embodiment of the present application.
[0234] In one embodiment, in combination with FIG. 5 , as shown in FIG. 14 , before S507 , the image display method provided in the embodiment of the present application may further include S1401 and S1402 .
[0235] S1401: The electronic device determines, based on the first ambient light illuminance and the second ambient light illuminance, or the first ambient color temperature and the second ambient color temperature, a target scene corresponding to a change in the light environment in which the electronic device is located.
[0236] The first ambient color temperature is the ambient color temperature under the first light environment, the first ambient light illuminance is the ambient light illuminance under the first light environment, the second ambient color temperature is the ambient color temperature under the second light environment, and the second ambient light illuminance is the ambient light illuminance under the second light environment. In other words, the electronic device compares the ambient light information under the first light environment with the ambient light information under the second light environment to determine the target scene corresponding to the change in the light environment in which the electronic device is located.
[0237] Specifically, if the second ambient light illuminance is greater than the first ambient light illuminance, and the first ambient light illuminance is less than the second ambient light illuminance, the target scene is the lights-on scene. If the second ambient light illuminance is less than the second ambient light illuminance, and the first ambient light illuminance is greater than the first ambient light illuminance, the target scene is the lights-off scene. If the second ambient light illuminance is less than the first ambient light illuminance, and the first ambient light illuminance is greater than the second ambient light illuminance, the target scene is the light-enhanced scene. If the second ambient light illuminance is greater than the second ambient light illuminance, and the first ambient light illuminance is less than the first ambient light illuminance, the target scene is the light-reduced scene. If the second ambient color temperature is greater than the first ambient color temperature, the target scene is the color temperature-enhanced scene. If the second ambient color temperature is less than the historical ambient color temperature, the target scene is the color temperature-reduced scene. It should be noted that the target scenes include but are not limited to these.
[0238] The first illuminance is greater than the second illuminance. For example, the first illuminance is 100 lux and the second illuminance is 30 lux.
[0239] S1402: The electronic device determines a second mapping relationship based on a mapping relationship between the target scene, the amount of change in the scene and the screen color temperature, and the duration of the change.
[0240] Specifically, in different scenarios, the transformation time required for the same change in screen color temperature is different. That is to say, in different scenarios, the correspondence between the change in screen color temperature and the transformation time is different. In other words, when the light environment in which the electronic device is located changes, the corresponding scenarios are different, and the mapping table between the change in screen color temperature and the transformation time is different. In this embodiment, according to the target scene, the corresponding Table 2 is determined to obtain the second mapping relationship corresponding to the target scene. Based on this, the accuracy of the obtained second mapping relationship is higher, so that the accuracy of the target transformation time determined according to the current screen color temperature and the target screen color temperature is higher.
[0241] It should be noted that, in the embodiments shown in FIG. 6 and FIG. 9 , S1401 and S1402 may also be included before S508 , which will not be described in detail in the embodiments of the present application.
[0242] S508. The electronic device determines N color temperature conversion matrices corresponding to the N frames of third images according to the target transformation duration, the current screen color temperature, the target screen color temperature, the first color coordinates of the white point at the fourth screen color temperature corresponding to each frame of the third image, and the screen parameters.
[0243] The first color coordinates refer to the color coordinates of the white point in the RGB color space. Each color temperature conversion matrix refers to the conversion relationship between the third screen color temperature and the second screen color temperature for the three primary color values (i.e., RGB values) of the white point in each frame of the third image during the target transformation duration.
[0244] The fourth screen color temperature refers to the initial screen color temperature of each third image frame during the nonlinear screen color temperature transformation process. The second screen color temperature refers to the final screen color temperature of each third image frame during the nonlinear screen color temperature transformation process. The initial screen color temperature of each image frame is equivalent to the current screen color temperature of each image frame, and the final screen color temperature of each image frame is equivalent to the target screen color temperature of each image frame. In some embodiments, the second screen color temperature of each third image frame can be referred to as the nonlinear screen color temperature of each third image frame.
[0245] Screen parameters can include screen refresh rate and color deviation. Color deviation refers to the difference between the color coordinates of the white point in the XYZ color space and the target color temperature. Screen refresh rate refers to the number of times the electronic device's display refreshes the displayed content per unit time.
[0246] FIG15 shows a fifth flow chart of an image display method provided in an embodiment of the present application.
[0247] In one embodiment, as shown in FIG15 in combination with FIG5 , the above S508 may include the following S1501 - S1503 .
[0248] S1501: The electronic device determines a 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.
[0249] The third screen color temperature refers to the ending screen color temperature of each frame of the third image 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.
[0250] Specifically, each time the display screen of the electronic device is refreshed, the electronic device will display one frame of image. Then, in 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 expressed by the following formula (4): N = t target ×f (4)
[0251] Wherein, 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 time, and N is a positive integer; f is the screen refresh rate of the electronic device; t target That is, the electronic device determines the product of the target transformation time and the screen refresh rate as the total number N of frames of the image displayed by the electronic device during the target transformation time.
[0252] If the screen color temperature of the electronic device changes linearly from the current screen color temperature to the target screen color temperature, that is, the screen color temperature changes by the same amount when the electronic device displays each frame of the third image, then during the target transition duration, the third screen color temperature of each frame of the third image can be determined by:
[0253] 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. Then, the electronic device determines the second screen color temperature change as the quotient of the first screen color temperature change and the total number of frames. Finally, the sum of the first screen color temperature and the third screen color temperature change corresponding to each third image frame is determined as the third screen color temperature of each corresponding third image frame.
[0254] In summary, the first screen color temperature and the third screen color temperature of each frame of the third image to be displayed by the electronic device can be shown in Table 3:
[0255] Table 3
[0256] The first frame is the first frame in the total number of frames N, so the first screen color temperature CCT1 of the first frame is the current screen color temperature CurrentCCT2. In other words, the first screen color temperature CCT1 of the first frame is the current screen color temperature when the electronic device displays the first image. The Nth frame is the last frame in the total number of frames N, so the third screen color temperature CCTN in the Nth frame is the target screen color temperature TargetCCT. ΔCCT is the average change in screen color temperature (or the second screen color temperature change) during the linear transformation process.
[0257] 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 ending 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 is the third screen color temperature of the previous frame. In other words, 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-1th frame of the N frames of third images, where L is a positive integer greater than or equal to 2 and less than or equal to N.
[0258] S1502: The electronic device performs nonlinear conversion processing on each third screen color temperature according to the current screen color temperature and the target screen color temperature to obtain each corresponding second screen color temperature.
[0259] When the screen color temperature of an electronic device changes from its current color temperature to its target color temperature using the aforementioned linear transformation method, the same amount of change in color temperature will require the same transformation time. This can result in an abrupt color temperature change and a poor user experience.
[0260] To this end, in the embodiment of the present application, a nonlinear conversion is performed on the third screen color temperature corresponding to each of the third image frames. Based on this, when the screen color temperature of the electronic device is being converted, 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 conversion time required for the same amount of screen color temperature change is longer. Conversely, the conversion time required for the same amount of screen color temperature change is shorter. This is described below in conjunction with Figure 16.
[0261] FIG16 shows a schematic diagram comparing a nonlinear transformation and a linear transformation of screen color temperature provided in an embodiment of the present application.
[0262] In one embodiment, as shown in FIG16 , a straight line (i.e., a linear color temperature change line) indicates that the transformation process of the screen color temperature is a linear transformation process. At this time, the transformation time required for the same amount of change in screen color temperature is equal. A curve (non-linear color temperature change curve) indicates that the transformation process of the screen color temperature is a nonlinear transformation process. At this time, when the screen color temperature of the electronic device is close to the current screen color temperature, and when the screen color temperature of the electronic device is close to the target screen color temperature, the transformation time required for the same amount of 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 time required for the same amount of change in screen color temperature is shorter.
[0263] In other words, when the screen color temperature transition is nonlinear, the screen color temperature stays longer when it's close to the current color temperature, longer when it's close to the target color temperature, and shorter when it's farther from the current and target color temperatures. This way, the screen color temperature perceived by the user primarily reflects the current and target color temperatures, making the transition more natural and smooth.
[0264] In one embodiment, the electronic device substitutes the current screen color temperature, the target screen color temperature, and each third screen color temperature into a nonlinear conversion formula to obtain each corresponding second screen color temperature.
[0265] Exemplarily, the nonlinear conversion formula can be expressed by the following formula (5) to formula (8):
[0266] 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 nonlinear change rate of the screen color temperature.
[0267] It should be noted that, starting from the second third image, the fourth screen color temperature of each third image is equivalent to the second screen color temperature of the previous third image. Therefore, the electronic device determines that the second screen color temperature of each third image is equivalent to the fourth screen color temperature of the next third image. In other words, the fourth screen color temperature of the Mth third image is the nonlinear screen color temperature of the M-1th third image, where M is a positive integer greater than or equal to 2 and less than N.
[0268] For the first frame of the third image, the fourth screen color temperature of the first frame of the third image can still be calculated according to the above formula (5) to formula (8).
[0269] FIG17 shows a schematic diagram of the effect of screen color temperature change provided in an embodiment of the present application.
[0270] As shown in Figure 17, the horizontal axis represents time, and the vertical axis represents the change in screen color temperature. Curve 1 indicates that when the screen color temperature changes by 1000K, the time required is 1 second. Curve 2 indicates that when the screen color temperature changes by 2000K, the time required is 2 seconds. Curve 3 indicates that when the screen color temperature changes by 3000K, the time required is 3 seconds. Curve 4 indicates that when the screen color temperature changes by 4000K, the time required is 4 seconds. Curve 5 indicates that when the screen color temperature changes by 5000K, the time required is 5 seconds.
[0271] As can be seen from this, in the image display method provided by the embodiments of the present application, the time required to change the screen color temperature from the current screen color temperature to the target screen color temperature varies with the amount of change in screen color temperature, and the screen color temperature change rate (i.e., the ratio of the amount of change in screen color temperature to the required time) is fixed. Based on this, the electronic device will experience a more soothing and stable change in screen color temperature throughout the entire process, improving the user's visual experience.
[0272] S1503: The electronic device determines N color temperature conversion matrices according to each second screen color temperature, the color deviation value, and the first color coordinate of the white point at the fourth screen color temperature corresponding to each frame of image.
[0273] The calculation process of each color temperature conversion matrix is the same. The calculation process of each color temperature conversion matrix is described below with reference to FIG18.
[0274] FIG18 shows a sixth flow chart of an image display method provided in an embodiment of the present application.
[0275] Optionally, in combination with FIG15 , as shown in FIG18 , the above S1503 may include the following S1801 - S1806:
[0276] S1801. The electronic device obtains the values of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image according to the first color coordinates of the white point at the fourth screen color temperature corresponding to each frame of the third image.
[0277] Specifically, S1801 may include the following steps:
[0278] First, the electronic device obtains the first color coordinates of the white point at the fourth screen color temperature corresponding to each frame of the third image, and converts the first color coordinates of the white point at the fourth screen color temperature corresponding to each frame of the third image into the sixth color coordinates of the white point at the fourth screen color temperature corresponding to each frame of the third image. The sixth color coordinates refer to the color coordinates of the white point in the xy coordinate system of the XYZ color space at the fourth screen color temperature. In other words, at the fourth screen color temperature, the electronic device converts the color coordinates of the white point from the RGB color space to the xy coordinate system of the XYZ color space.
[0279] Exemplarily, the electronic device substitutes the first color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image into the fourth coordinate conversion formula to obtain the sixth color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image. The fourth coordinate conversion formula can be expressed by the following formula (9):
[0280] Wherein, (r1, g1, b1) is the first color coordinate of the white point corresponding to the third image of each frame; (x1, y1) is the sixth color coordinate of the white point corresponding to the third image of each frame; It is the conversion matrix between the color coordinates of the RGB color space and the color coordinates of the XYZ color space.
[0281] Then, the electronic device converts the sixth color coordinates of the white point at the fourth screen color temperature corresponding to each frame of the third image based on the relationship between the sixth color coordinates of the white point and the values of the three primary colors of the white point (i.e., XYZ values), and obtains the values of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image.
[0282] For example, 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 formula (10)-formula (12): Y=1 (10)
[0283] Where, the values of the three primary colors of the white point (X, Y, Z). Substituting the sixth color coordinate (x1, y1) of the white point corresponding to each frame of the third image into the above formulas (10) to (12), the values of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image (X1, Y1, Z1) can be obtained.
[0284] S1802. The electronic device substitutes the values of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image into a color gamut conversion formula to obtain the values of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image.
[0285] For example, the color gamut conversion formula can be expressed by the following formula (13):
[0286] Among them, (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; The color gamut conversion matrix between XYZ color space and RGB color space.
[0287] 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 (X1, Y1, Z1) 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 each frame of the third image (R current , G current , B current ).
[0288] 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.
[0289] Specifically, S1803 may include the following steps:
[0290] First, the electronic device substitutes the second screen color temperature corresponding to each frame of the third image into a color coordinate calculation formula to obtain first preset color coordinates of the white point at the second screen color temperature corresponding to each frame of the third image. The first preset color coordinates are estimated color coordinates of the white point in the xy coordinate system of the XYZ color space at the second screen color temperature.
[0291] For example, the color coordinate calculation formula can be expressed by the following formula (14) and formula (15):
[0292] Among them, (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 second color temperature threshold. A1, A2, A3, B1, B2, C1, C2, C3, D, E1, E2, F, and G are constants.
[0293] According to the relationship between the second screen color temperature corresponding to each frame of the third image and the second color temperature threshold, select one of the formulas (14) to calculate x predicted Specifically, let CCTm in the above formula (14) = the second screen color temperature corresponding to each frame of the third image, and the first preset color coordinates (xpredicted_1, ypredicted_1) of the white point under the second screen color temperature corresponding to each frame of the third image can be obtained.
[0294] Then, the electronic device may perform any one of the following embodiments according to the relationship between the color deviation value and the first threshold:
[0295] In one embodiment, if the color deviation value is less than the first threshold, the electronic device directly determines the first preset color coordinates (xpredicted_1, ypredicted_1) of the white point at the second screen color temperature corresponding to each frame of the third image as the second color coordinates (x2, y2) of the white point at the second screen color temperature corresponding to each frame of the third image.
[0296] 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 based on 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.
[0297] That is to say, if the color deviation value is greater than the first threshold, the first preset color coordinates of the white point under the second screen color temperature corresponding to each frame of the third image need to be corrected to obtain the second color coordinates of the white point under the second screen color temperature corresponding to each frame of the third image.
[0298] 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:
[0299] Step 1: 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.
[0300] Exemplarily, the first coordinate transformation formula can be expressed by the following formula (16):
[0301] Among them, (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.
[0302] Substituting the first preset color coordinates (xpredicted_1, ypredicted_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 (u3, v3) of the white point at the second screen color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space can be obtained.
[0303] Step 2: Determine the second adjusted screen color temperature corresponding to each frame of the third image as the sum of the second screen color temperature corresponding to each frame of the third image and the third color temperature threshold. The second adjusted screen color temperature is a corrected 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 may be a nonlinearly adjusted screen color temperature.
[0304] Step 3: 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 adjusted screen color temperature corresponding to each frame of the third image.
[0305] According to the relationship between the second adjusted screen color temperature and the second color temperature threshold corresponding to each frame of the third image, one of the formulas (14) is selected to calculate x predicted Specifically, let CCTm in the above formula (14) = the second adjusted screen color temperature corresponding to each frame of the third image, and the second preset color coordinates (xpredicted_2, ypredicted_2) of the white point under the second screen color temperature corresponding to each frame of the third image can be obtained.
[0306] Step 4: 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.
[0307] Substituting the second preset color coordinates (xpredicted_2, ypredicted_2) of the white point at the second adjusted screen color temperature corresponding to each frame of the third image into the above formula (16), the fourth color coordinates (u4, v4) 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.
[0308] Step 5: The electronic device determines the second color coordinates of the white point at the second screen color temperature corresponding to each frame of the third image based on the third color coordinates corresponding to each frame of the third image, the fourth color coordinates corresponding to each frame of the third image, and the color deviation value.
[0309] In this step: First, the electronic device determines the difference between u3 in the third color coordinates and u4 in the fourth color coordinates corresponding to each frame of the third image as the first variation du (i.e., du=u4-u3). Second, the electronic device determines the difference between v3 in the third color coordinates and v4 in the fourth color coordinates corresponding to each frame of the third image as the second variation dv (i.e., dv=v4-v3). Third, the electronic device calculates the first ratio radio between the first variation du and the second variation dv corresponding to each frame of the third image (i.e., ). Then, 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 based on the color deviation value, the first ratio radio corresponding to each frame of the third image, and the third color coordinates (u3, v3). Finally, the electronic device substitutes the fifth color coordinates (u_target, v_target) 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.
[0310] Specifically, the process of the electronic device determining the fifth color coordinates of the white point at the second screen color temperature corresponding to each frame of the third image in the UV coordinate system of the XYZ color space may include:
[0311] First, the electronic device substitutes the color deviation value and the first ratio radio corresponding to each third image frame into a third conversion formula to calculate a third change du_new between the third color coordinate u3 and the fourth color coordinate u4 corresponding to each third image frame, and a fourth change dv_new between the third color coordinate v3 and the fourth color coordinate v4 corresponding to each third image frame. The third change du_new is the corrected first change du, and the fourth change dv_new is the corrected second change dv.
[0312] Exemplarily, the third conversion formula can be expressed by the following formula (17):
[0313] Wherein, du_new is the third variation corresponding to each frame of the third image. dv_new is the fourth variation corresponding to each frame of the third image. radio is the first ratio corresponding to each frame of the third image. Duv is the color deviation value.
[0314] Then, the electronic device determines the sum of u3 in the third color coordinate corresponding to each frame of the third image and the third variation du_new corresponding to each frame of the third image as u_target in the fifth color coordinate corresponding to each frame of the third image. Simultaneously, the electronic device determines the sum of v3 in the third coordinate corresponding to each frame of the third image and the fourth variation dv_new corresponding to each frame of the third image as v_target in the fifth color coordinate corresponding to each frame of the third image.
[0315] Exemplarily, the second conversion formula can be expressed by the following formula (18):
[0316] Among them, (x_target, y_target) is the second color coordinate of the white point at the second screen color temperature corresponding to the third image of each frame; (u_target, v_target) is the fifth color coordinate corresponding to the third image of each frame; f, g, h, and m are constants.
[0317] S1804: The electronic device obtains the values of the three primary colors of the white point at the second screen color temperature corresponding to each frame of the third image according to the second color coordinates of the white point at the second screen color temperature corresponding to each frame of the third image.
[0318] Specifically, the electronic device substitutes 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 into the above formula (10) to formula (12), and can obtain the values (X2, Y2, Z2) of the three primary colors of the white point at the second screen color temperature corresponding to each frame of the third image.
[0319] S1805. The electronic device substitutes the values of the three primary colors of the white point at the second screen color temperature corresponding to each frame of the third image into a color gamut conversion formula to obtain the values of the three primary colors of the white point at the second screen color temperature corresponding to each frame of the third image.
[0320] Specifically, the electronic device substitutes the values of the three primary colors of the white point at the second screen color temperature corresponding to each frame of the third image (X2, Y2, Z2) into the above formula (13), and can obtain the values of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image (R target , G target , B target ).
[0321] S1806. The electronic device obtains a color temperature conversion matrix corresponding to each frame of the third image based on the values of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image and the values of the three primary colors of the white point at the second screen color temperature corresponding to each frame of the third image.
[0322] Specifically, S1806 may include: first, the electronic device calculates three second ratios R between the values of the three primary colors of the white point at the second screen color temperature corresponding to each frame of the third image and the values of the three primary colors of the white point at the fourth screen color temperature corresponding to each frame of the third image gain , G gain 、B gain Among them, the three second ratios are: Then, the electronic device calculates the value of the three second ratios R corresponding to each frame of the third image. gain , G gain 、B gain , and obtain the color temperature conversion matrix corresponding to each frame of the third image.
[0323] Exemplarily, the color temperature conversion matrix is:
[0324] It should be noted that, in any of the above embodiments, S509 may also include S1501-S1503, which will not be described in detail in the embodiments of the present application.
[0325] S509 , after displaying the first image, the electronic device processes each frame of the third image frame by frame using the color temperature conversion matrix corresponding to each frame of the third image to obtain N frames of the second image, and displays the N frames of the second image frame by frame.
[0326] 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 value of each pixel in each frame of the third image based on each color temperature conversion matrix to obtain the second image corresponding to each frame of the third image.
[0327] 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, they will not experience symptoms such as eye soreness, thereby reducing the user's visual fatigue. At the same time, the target screen color temperature of the electronic device after the change matches the changed second light environment, and the screen color temperature of the electronic device changes nonlinearly throughout the entire change process. This makes the entire process of screen color temperature change more soothing and unobtrusive, and the user's visual experience is better.
[0328] As shown in Figure 19, an embodiment of the present application also provides a chip system. The chip system 2000 includes at least one processor 2010 and at least one interface circuit 2020. The at least one processor 2010 and the at least one interface circuit 2020 can be interconnected via lines. The processor 2010 is used to support the electronic device to implement the various steps in the above method embodiment, and the at least one interface circuit 2020 can be used to receive signals from other devices (such as memory) or send signals to other devices (such as communication interfaces). The chip system may include chips and may also include other discrete devices.
[0329] An embodiment of the present application further provides a computer storage medium, which includes instructions. When the instructions are executed on the above-mentioned electronic device, the electronic device executes each step in the above-mentioned method embodiment.
[0330] An embodiment of the present application further provides a computer program product comprising instructions, which, when executed on the electronic device, causes the electronic device to execute each step in the method embodiment.
[0331] Regarding the technical effects of the chip system, computer storage medium, and computer program product, refer to the technical effects of the previous method embodiments.
[0332] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0333] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0334] Those skilled in the art will 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 aforementioned method embodiments and will not be repeated here.
[0335] In the 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 merely a logical function division. In actual implementation, there may be other division methods, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0336] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located on a single device or distributed across multiple devices. Some or all of the modules may be selected to achieve the purpose of this embodiment based on actual needs.
[0337] In addition, the functional modules in the various embodiments of the present application may be integrated into one device, or each module may exist physically separately, or two or more modules may be integrated into one device.
[0338] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using a software program, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. 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 one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more media integrated therein. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)).
[0339] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. An image display method, characterized in that: Applied to electronic equipment, the method comprises: Displaying a first image in a first light environment, wherein the RGB value of the first image matches the first light environment in which the electronic device is located, and the ambient light information in different light environments is different, and the ambient light information includes ambient light illumination and ambient color temperature; The light environment in which the electronic device is located changes from the first light environment to the second light environment, and a target screen color temperature corresponding to the target light information is obtained; wherein the target light information includes ambient light information under the second light environment, and the target screen color temperature matches the second light environment; After displaying the first image, displaying N frames of the second image frame by frame, and adjusting the screen color temperature frame by frame according to the nonlinear color temperature change curve during the display of the N frames of the second image, until the screen color temperature of the electronic device reaches the target screen color temperature when the electronic device displays the Nth frame of the second image; 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 each frame of the second image; the nonlinear color temperature change curve includes the nonlinear screen color temperature corresponding to each frame of the third image, and the nonlinear screen color temperature corresponding to each frame of the third image is obtained by nonlinearly processing 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, and the linear color temperature change line is obtained based on the current screen color temperature, the target screen color temperature and the display time of the N frames of the second image.
2. The method according to claim 1, characterized in that The target light information also includes: the screen display brightness of the electronic device under the second light environment.
3. The method according to claim 1 or 2, characterized in that: The step of obtaining a target screen color temperature corresponding to the target light information includes: Substituting the target light information into a first mapping relationship, the target screen color temperature is obtained; wherein the first mapping relationship indicates a 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: Linear interpolation is performed on the 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 to 4, characterized in that Before displaying N frames of second images frame by frame, the method further includes: The absolute value of the difference between the target screen color temperature and the current screen color temperature is substituted into the second mapping relationship to obtain the display duration of the N frames of the second image; wherein the second mapping relationship is a mapping relationship between the change in screen color temperature and the transformation duration.
6. The method according to any one of claims 1 to 5, characterized in that Before substituting the absolute value of the difference between the target screen color temperature and the current screen color temperature into the second mapping relationship to obtain the display duration of the N frames of the second image, the method further includes: According to the first ambient light illumination and the second ambient light illumination, or the first ambient color temperature and the second ambient color temperature, a target scene corresponding to the light environment change is determined; wherein the first ambient color temperature is the ambient color temperature under the first light environment, the first ambient light illumination is the ambient light illumination under the first light environment, and the second ambient color temperature is the ambient color temperature under the first light environment. an ambient color temperature under a second light environment, wherein the second ambient light illuminance is the ambient light illuminance under the second light environment; The second mapping relationship is determined according to the mapping relationship between the target scene, the scene, and the change amount and transformation duration of the screen color temperature.
7. The method according to claim 6, characterized in that The step of determining a target scene corresponding to the light environment change according to the first ambient light illumination and the second ambient light illumination, or the first ambient color temperature and the second ambient color temperature, includes: If the second ambient light illuminance is greater than the first illuminance, and the first ambient light illuminance is less than the second illuminance, then the target scene is a light-on scene; wherein the first illuminance is greater than the second illuminance; If the second ambient light illuminance is less than the second illuminance, and the first ambient light illuminance is greater than the first illuminance, then the target scene is a lights-off scene; If the second ambient light illuminance is less than the first ambient light illuminance, and the first ambient light illuminance is greater than the second ambient light illuminance, then the target scene is an illuminance-enhanced 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, then the target scene is a scene with reduced illuminance; If the second ambient color temperature is greater than the first ambient color temperature, the target scene is a color temperature enhanced scene; If the second ambient color temperature is lower than the first ambient color temperature, the target scene is a scene with reduced color temperature.
8. The method according to any one of claims 1 to 7, characterized in that Before displaying N frames of second images frame by frame, the method further includes: Determine 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; Determine the difference between the target screen color temperature and the current screen color temperature as a first screen color temperature change; Determine the quotient of the first screen color temperature change amount and the total number of frames as the second screen color temperature change amount; Determine the sum of the first screen color temperature corresponding to each frame of the third image and the change amount of the second screen color temperature as the linear screen color temperature corresponding to each frame of the third image; Among them, the first screen color temperature corresponding to the first frame image in N frames of third images is the current screen color temperature, the first screen color temperature corresponding to the Lth frame image in N frames of third images is the linear screen color temperature corresponding to the L-1th frame image in 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. The method according to any one of claims 1 to 8, characterized in that Before displaying 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 nonlinear conversion formula, obtaining a nonlinear screen color temperature corresponding to each frame of the third image; Wherein, the nonlinear conversion formula is: Among them, noLinearTargetCCT is the nonlinear 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 nonlinear change rate of the screen color temperature.
10. The method according to any one of claims 1 to 9, characterized in that Before displaying N frames of second images frame by frame, the method further includes: Determine N color temperature conversion matrices according to the nonlinear screen color temperature corresponding to each frame of the third image, the color deviation value, and the first color coordinate of the white point under the fourth screen color temperature corresponding to each frame of the third image; 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 third image of the Mth frame is the nonlinear screen color temperature of the third image of the M-1th frame, and M is a positive integer greater than or equal to 2 and less than N.
11. The method according to claim 10, characterized in that Determining N color temperature conversion matrices according to the nonlinear screen color temperature corresponding to each frame of the third image, the color deviation value, and the first color coordinate of the white point under the fourth screen color temperature corresponding to each frame of the third image includes: Obtaining an XYZ value of a white point at a fourth screen color temperature corresponding to each frame of the third image according to a first color coordinate of the white point at a fourth screen color temperature corresponding to each frame of the third image; Substituting the XYZ value of the white point at the fourth screen color temperature corresponding to each frame of the third image into the color gamut conversion formula, the RGB value of the white point at the fourth screen color temperature corresponding to each frame of the third image is obtained; Determine the second color coordinates of the white point at the nonlinear screen color temperature corresponding to each frame of the third image according to the nonlinear screen color temperature corresponding to each frame of the third image, the color deviation value and the third color temperature threshold; wherein the second color coordinates are: the color coordinates of the white point of each frame of the third image in the xy coordinate system of the XYZ color space at the nonlinear screen color temperature corresponding to each frame of the third image; Obtaining the XYZ value of the white point at the nonlinear screen color temperature corresponding to each frame of the third image according to the second color coordinate of the white point at the nonlinear screen color temperature corresponding to each frame of the third image; Substituting the XYZ value of the white point under the nonlinear screen color temperature corresponding to each frame of the third image into the color gamut conversion formula to obtain the RGB value of the white point under the nonlinear screen color temperature corresponding to each frame of the third image; Obtaining a color temperature conversion matrix corresponding to each frame of the third image according to the RGB value of the white point at the fourth screen color temperature corresponding to each frame of the third image and the RGB value of the white point at the nonlinear screen color temperature corresponding to each frame of the third image; Wherein, the color gamut conversion formula is: Among them, (R, G, B) is the RGB value; (X, Y, Z) is the XYZ value; It is the color gamut conversion matrix between XYZ color space and RGB color space.
12. The method according to claim 11, characterized in that The determining, according to the nonlinear screen color temperature corresponding to each frame of the third image, the color deviation value and the third color temperature threshold, the second color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image comprises: Substituting the nonlinear screen color temperature corresponding to each frame of the third image into the color coordinate calculation formula, obtaining the first preset color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image; wherein the first preset color coordinates are: the estimated color coordinates of the white point of each frame of the third image in the xy coordinate system of the XYZ color space under the nonlinear screen color temperature corresponding to each frame of the third image; If the color deviation value is less than the first threshold, the first preset color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image are determined as the second color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image; If the color deviation value is greater than the first threshold, determining the second color coordinates of the white point at the nonlinear screen color temperature corresponding to each frame of the third image according to the first preset color coordinates of the white point at the nonlinear screen color temperature corresponding to each frame of the third image, the nonlinear screen color temperature corresponding to each frame of the third image, the third color temperature threshold, and the color deviation value; Wherein, the color coordinate calculation formula is: Among them, (x predicted ,y predicted ) is the preset color coordinate of the white point under the nonlinear 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; A1, A2, A3, B1, B2, C1, C2, C3, D, E1, E2, F, G are constants; H is the second color temperature threshold.
13. The method according to claim 12, characterized in that The method of determining the second color coordinates of the white point at the nonlinear screen color temperature corresponding to each frame of the third image according to the first preset color coordinates of the white point at the nonlinear screen color temperature corresponding to each frame of the third image, the nonlinear screen color temperature corresponding to each frame of the third image, the third color temperature threshold, and the color deviation value comprises: Substituting the first preset color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image into the first coordinate conversion formula, to obtain the third color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space; The sum of the nonlinear screen color temperature corresponding to each frame of the third image and the third color temperature threshold is determined as the nonlinear adjustment screen color temperature corresponding to each frame of the third image; wherein the nonlinear adjustment screen color temperature is a correction value of the nonlinear screen color temperature; Substituting the nonlinearly adjusted screen color temperature corresponding to each frame of the third image into the color coordinate calculation formula to obtain a second preset color coordinate of the white point under the nonlinearly adjusted screen color temperature corresponding to each frame of the third image; Substituting the second preset color coordinates of the white point under the nonlinear screen adjustment color temperature corresponding to each frame of the third image into the first coordinate conversion formula, to obtain the fourth color coordinates of the white point under the nonlinear screen adjustment color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space; Determine the second color coordinate of the white point at the nonlinear screen color temperature corresponding to each frame of the third image according to the third color coordinate corresponding to each frame of the third image, the fourth color coordinate corresponding to each frame of the third image, and the color deviation value; Wherein, the first coordinate transformation formula is: Among them, (u predicted , v predicted ) are the color coordinates of the white point under the nonlinear screen color temperature corresponding to each frame of the third image in the uv coordinate system of the XYZ color space; a, b, c, d are constants.
14. The method according to claim 13, characterized in that The method of determining the second color coordinate of the white point at the nonlinear screen color temperature corresponding to each frame of the third image according to the third color coordinate corresponding to each frame of the third image, the fourth color coordinate corresponding to each frame of the third image, and the color deviation value comprises: Determine the difference between u3 in the third color coordinate and u4 in the fourth color coordinate corresponding to each frame of the third image as a first variation; Determine the difference between v3 in the third color coordinate and v4 in the fourth color coordinate corresponding to each frame of the third image as the second variation; Calculating a first ratio between the first variation and the second variation corresponding to each frame of the third image; Determine, according to the color deviation value, the first ratio corresponding to each frame of the third image, and the third color coordinates, a fifth color coordinate of a white point under a nonlinear screen color temperature corresponding to each frame of the third image in a uv coordinate system of an XYZ color space; wherein the fifth color coordinates are the corrected third color coordinates; Substituting the fifth color coordinate corresponding to each frame of the third image into the second conversion formula, calculating the second color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image; Wherein, the second conversion formula is: Among them, (x_target, y_target) is the second color coordinate of the white point under the nonlinear screen color temperature corresponding to each frame of the third image; (u_target, v_target) is the fifth color coordinate corresponding to each frame of the third image; f, g, h, and m are constants.
15. The method according to claim 14, characterized in that The determining, according to the color deviation value, the first ratio corresponding to each frame of the third image, and the third color coordinates, a fifth color coordinate of a 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 includes: Substituting the color deviation value and the first ratio corresponding to each frame of the third image into a third conversion formula, calculating a third change amount of u3 in the third color coordinate and u4 in the fourth color coordinate corresponding to each frame of the third image, and a fourth change amount of v3 in the third color coordinate and v4 in the fourth color coordinate corresponding to each frame of the third image; wherein the third change amount is the first change amount after correction, and the fourth change amount is the second change amount after correction; Determine the sum of u3 in the third color coordinate corresponding to each frame of the third image and the third variation corresponding to each frame of the third image as u_target in the fifth color coordinate corresponding to each frame of the third image; Determine the sum of v3 in the third color coordinate corresponding to each frame of the third image and the fourth variation corresponding to each frame of the third image as v_target in the fifth color coordinate corresponding to each frame of the third image; Wherein, the third conversion formula is: Among them, du_new is the third variation corresponding to each frame of the third image; dv_new is the fourth variation corresponding to each frame of the third image; radio is the first ratio corresponding to each frame of the third image; Duv is the color deviation value.
16. The method according to any one of claims 11 to 15, characterized in that The obtaining, according to the first color coordinates of the white point at the fourth screen color temperature corresponding to each frame of the third image, the XYZ value of the white point at the fourth screen color temperature corresponding to each frame of the third image comprises: Substituting the first color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image into the fourth coordinate conversion formula, obtaining the sixth color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image; wherein the sixth color coordinate is: the color coordinate of the white point in the xy coordinate system of the XYZ color space at the fourth screen color temperature; According to the relationship between the sixth color coordinate of the white point and the XYZ value of the white point, the sixth color coordinate of the white point at the fourth screen color temperature corresponding to each frame of the third image is converted to obtain the XYZ value of the white point at the fourth screen color temperature corresponding to each frame of the third image; Wherein, the fourth coordinate transformation formula is: Wherein, (r1, g1, b1) is the first color coordinate of the white point corresponding to each frame of the third image; (x1, y1) is the sixth color coordinate of the white point corresponding to each frame of the third image; It is the conversion matrix between the color coordinates of the RGB color space and the color coordinates of the XYZ color space.
17. The method according to claim 11, characterized in that The step of obtaining a color temperature conversion matrix corresponding to each frame of the third image according to the RGB value of the white point at the fourth screen color temperature corresponding to each frame of the third image and the RGB value of the white point at the nonlinear screen color temperature corresponding to each frame of the third image comprises: Calculate three second ratios between the RGB value of the white point at the nonlinear screen color temperature corresponding to each frame of the third image and the RGB value of the white point at the fourth screen color temperature corresponding to each frame of the third image; wherein the three second ratios are respectively: (R target , G target , B target ) is the RGB value of the white point under the nonlinear screen color temperature corresponding to each frame of the third image, (R current , G current , B current ) is the RGB value of the white point at the fourth screen color temperature corresponding to each frame of the third 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:
18. The method according to any one of claims 1 to 17, characterized in that The step of displaying N frames of second images frame by frame includes: Using each of the color temperature conversion matrices to adjust the RGB value of each pixel in each corresponding frame of the third image to obtain each frame of the second image; Display the second image of each frame.
19. The method according to any one of claims 1 to 18, characterized in that Before acquiring the target screen color temperature corresponding to the target light information, the method further includes: Acquire the current ambient light illumination and the current ambient color temperature of the light environment in which the electronic device is located; wherein the current ambient light illumination is the ambient light illumination of the light environment in which 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 in which the electronic device is located at the current acquisition moment; The absolute value of the difference between the current ambient light illumination and the historical ambient light illumination is determined as the change in ambient light illumination, and the absolute value of the difference between the current ambient color temperature and the historical ambient color temperature is determined as the change in ambient color temperature; wherein the historical ambient light illumination is the ambient light illumination at a historical collection time, the historical ambient color temperature is the ambient color temperature at the historical collection time, and the historical collection time is the collection time before the current collection time; Determining that the light environment in which the electronic device is located changes from the first light environment to a second light environment based on the change in the ambient light illumination exceeding a light illumination threshold and / or the change in the ambient color temperature exceeding a first color temperature threshold; Based on the fact that the change in the light environment does not exceed the light illumination threshold and the change in the ambient color temperature does not exceed the first color temperature threshold, it is determined that the light environment in which the electronic device is located is the first light environment.
20. The method according to claim 19, characterized in that The method further comprises: Based on the light environment in which the electronic device is located being the first light environment, the screen color temperature is not adjusted.
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; Acquiring the current ambient light illumination and the current ambient color temperature of the light environment in which the electronic device is located, including: The preset switch is in an on state, and the current ambient light illumination and the current ambient color temperature of the light environment where the electronic device is located are obtained.
22. An electronic device, characterized in that: include: 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 ambient light illumination and ambient color temperature, and send the ambient light illumination and ambient color temperature to the processor; the memory stores instructions, and when the processor executes the instructions, the method described in any one of claims 1-21 is executed.
23. A computer-readable storage medium, characterized in that: The method comprises instructions which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 21.
Citation Information
Patent Citations
Terminal color temperature adjusting method and device
CN107517368A
Screen display parameter adjusting method, terminal and computer readable storage medium
CN109558100A
Screen color temperature control method and device, storage medium and mobile terminal
CN111131612A
Screen display method and device and computer storage medium
CN112905141A
Screen display method and device, readable storage medium and electronic equipment
CN116453459A