CN-119479569-B - Display method and device, electronic equipment and storage medium
Abstract
The disclosure relates to a display method and device, an electronic device and a storage medium, wherein the method comprises the steps of obtaining an image to be displayed and displaying the environment color temperature of the current environment of the electronic device of the image; determining a color temperature compensation value of the image displayed by the electronic equipment according to the pixel value of the pixel point in the image, determining a target display color temperature according to the environment color temperature and the color temperature compensation value, and displaying the image with the target display color temperature through the electronic equipment. By the method, the environment color temperature and the color of the image to be displayed can be considered, and the image display effect is improved.
Inventors
- TANG HONGHUI
Assignees
- 北京小米移动软件有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20230811
Claims (10)
- 1.A display method, the method comprising: Acquiring an image to be displayed and an environment color temperature of an environment where electronic equipment displaying the image is currently located; determining a color temperature compensation value of the electronic equipment for displaying the image according to the pixel value of the pixel point in the image; determining an initial display color temperature based on the environment color temperature, and compensating the initial display color temperature by utilizing the color temperature compensation value to obtain a target display color temperature; and displaying the image with the target display color temperature through the electronic equipment.
- 2. The method of claim 1, wherein determining an initial display color temperature based on the ambient color temperature and compensating the initial display color temperature with the color temperature compensation value to obtain a target display color temperature comprises: determining an initial display color temperature corresponding to the environment color temperature according to a preset first mapping relation, wherein the preset first mapping relation comprises mapping between the environment color temperature and the display color temperature; and compensating the initial display color temperature by using the color temperature compensation value to obtain the target display color temperature.
- 3. The method of claim 1, wherein the pixel values of the pixel points comprise pixel values of a plurality of color channels, and wherein the determining a color temperature compensation value for the electronic device to display the image based on the pixel values of the pixel points in the image comprises: determining the color duty ratio of a preset color channel component according to the pixel values of the pixel points in the image in different color channels; and determining the color temperature compensation value according to the color duty ratio of the preset color channel component and a preset second mapping relation, wherein the preset second mapping relation comprises mapping between the color duty ratio and the color temperature compensation value.
- 4. A method according to claim 3, wherein said determining the color duty cycle of the preset color channel component based on the pixel values of the pixel points in the image in the different color channels comprises: determining the pixel mean value of each color channel according to the pixel values of the pixel points in the image in different color channels; weighting the pixel mean value corresponding to each color channel according to the preset weighting coefficient corresponding to each color channel; determining the sum of weighted pixel mean values of different color channels; and determining the ratio of the weighted pixel mean value corresponding to the preset color channel to the sum value as the color duty ratio.
- 5. The method of claim 3, wherein the predetermined color channel comprises a blue color channel, wherein the determining an initial display color temperature based on the ambient color temperature and compensating the initial display color temperature with the color temperature compensation value to obtain a target display color temperature comprises: Determining an initial display color temperature corresponding to the environment color temperature; And under the condition that the ambient color temperature is smaller than a preset color temperature threshold value and the color ratio is smaller than a preset ratio threshold value, increasing the initial display color temperature according to the color temperature compensation value to obtain the target display color temperature.
- 6. The method of claim 5, wherein the color temperature compensation value is inversely related to the color ratio of the blue channel when the color ratio of the blue channel is less than the preset ratio threshold in the preset second mapping relationship.
- 7. The method according to claim 1, wherein the method further comprises: acquiring a historical target display color temperature; The displaying, by the electronic device, the image at the target display color temperature includes: And displaying the image with the target display color temperature by the electronic equipment under the condition that the difference between the target display color temperature and the historical target display color temperature is larger than a preset difference threshold value.
- 8. A display device, the device comprising: the electronic equipment comprises a first acquisition module, a second acquisition module and a display module, wherein the first acquisition module is used for acquiring an image to be displayed and an environment color temperature of an environment where the electronic equipment for displaying the image is currently located; The first determining module is used for determining a color temperature compensation value of the electronic equipment for displaying the image according to the pixel value of the pixel point in the image; The second determining module is used for determining an initial display color temperature based on the environment color temperature and compensating the initial display color temperature by utilizing the color temperature compensation value to obtain a target display color temperature; And the display module is used for displaying the image with the target display color temperature through the electronic equipment.
- 9. An electronic device, comprising: A memory for storing processor-executable instructions; wherein the processor is configured to perform the method of any one of claims 1 to 7.
- 10. A computer readable storage medium, characterized in that instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1 to 7.
Description
Display method and device, electronic equipment and storage medium Technical Field The disclosure relates to the technical field of screen display, and in particular relates to a display method and device, electronic equipment and a storage medium. Background In electronic devices such as mobile phones, computers, wearing devices, service terminal display devices and the like comprising display screens, because the reduction degrees of human eyes to colors are different under different environment color temperatures, the color temperature environments deviating from natural spectrums can bring visual fatigue to the human eyes, for example, after people work or learn under strong and single color temperature lights for a period of time, the problems of eye fatigue, vision degradation and the like are easy to occur to people. In order to improve the display effect of the display screen, the display color temperature is generally adjusted based on the ambient color temperature. However, this scheme has a problem that the display screen is too yellow after adjustment, resulting in poor display effect. Disclosure of Invention The disclosure provides a display method and device, electronic equipment and a storage medium. According to a first aspect of an embodiment of the present disclosure, there is provided a display method, including: Acquiring an image to be displayed and an environment color temperature of an environment where electronic equipment displaying the image is currently located; determining a color temperature compensation value of the electronic equipment for displaying the image according to the pixel value of the pixel point in the image; Determining a target display color temperature according to the environment color temperature and the color temperature compensation value; and displaying the image with the target display color temperature through the electronic equipment. In some embodiments, the determining the target display color temperature according to the ambient color temperature and the color temperature compensation value includes: determining an initial display color temperature corresponding to the environment color temperature according to a preset first mapping relation, wherein the preset first mapping relation comprises mapping between the environment color temperature and the display color temperature; and compensating the initial display color temperature by using the color temperature compensation value to obtain the target display color temperature. In some embodiments, the pixel values of the pixel points comprise pixel values of a plurality of color channels, and the determining the color temperature compensation value of the electronic device for displaying the image according to the pixel values of the pixel points in the image comprises: determining the color duty ratio of a preset color channel component according to the pixel values of the pixel points in the image in different color channels; and determining the color temperature compensation value according to the color duty ratio of the preset color channel component and a preset second mapping relation, wherein the preset second mapping relation comprises mapping between the color duty ratio and the color temperature compensation value. In some embodiments, the determining the color duty ratio of the preset color channel component according to the pixel values of the pixel points in the image in different color channels includes: determining the pixel mean value of each color channel according to the pixel values of the pixel points in the image in different color channels; weighting the pixel mean value corresponding to each color channel according to the preset weighting coefficient corresponding to each color channel; determining the sum of weighted pixel mean values of different color channels; and determining the ratio of the weighted pixel mean value corresponding to the preset color channel to the sum value as the color duty ratio. In some embodiments, the predetermined color channel comprises a blue color channel, and the determining the target display color temperature according to the ambient color temperature and the color temperature compensation value comprises: Determining an initial display color temperature corresponding to the environment color temperature; And under the condition that the ambient color temperature is smaller than a preset color temperature threshold value and the color ratio is smaller than a preset ratio threshold value, increasing the initial display color temperature according to the color temperature compensation value to obtain the target display color temperature. In some embodiments, in the preset second mapping relationship, when the color duty ratio of the blue channel is smaller than the preset duty ratio threshold, the color temperature compensation value is inversely related to the color duty ratio of the blue channel. In some embodiments, the method further compris