Display method and device, electronic equipment and storage medium
By acquiring the image and ambient color temperature in electronic devices, determining the color temperature compensation value based on the pixel value, and adjusting the display color temperature, the problem of poor image display effect at different ambient color temperatures is solved, and the display effect and user experience are improved.
Patent Information
- Application Number
- CN202311013480.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-11
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2043-08-11
Smart Images

Figure CN119479569A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of screen display technology, and in particular to a display method and device, an electronic device, and a storage medium. Background Art
[0002] In electronic devices including mobile phones, computers, wearable devices, service terminal display devices, etc., since the human eye has different degrees of color restoration under different ambient color temperatures, the color temperature environment that deviates from the natural spectrum will cause visual fatigue to the human eye. For example, after working or studying under strong, single color temperature lighting for a period of time, people are prone to problems such as eye fatigue and decreased vision.
[0003] In order to improve the display effect of the display screen, the display color temperature is usually adjusted based on the ambient color temperature. However, this solution has the problem that the display screen appears too yellow after adjustment, resulting in poor display effect. Summary of the invention
[0004] The present disclosure provides a display method and device, an electronic device, and a storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a display method, including:
[0006] Acquire an image to be displayed and an ambient color temperature of an environment in which an electronic device displaying the image is currently located;
[0007] Determining a color temperature compensation value for displaying the image by the electronic device according to pixel values of pixels in the image;
[0008] Determining a target display color temperature according to the ambient color temperature and the color temperature compensation value;
[0009] The image is displayed by the electronic device at the target display color temperature.
[0010] In some embodiments, determining the target display color temperature according to the ambient color temperature and the color temperature compensation value includes:
[0011] Determine the initial display color temperature corresponding to the ambient color temperature according to a preset first mapping relationship; wherein the preset first mapping relationship includes a mapping between the ambient color temperature and the display color temperature;
[0012] The initial display color temperature is compensated by using the color temperature compensation value to obtain the target display color temperature.
[0013] In some embodiments, the pixel value of the pixel point includes pixel values of multiple color channels; and determining the color temperature compensation value of the electronic device displaying the image according to the pixel value of the pixel point in the image includes:
[0014] Determine the color proportion of a preset color channel component according to the pixel values of the pixel points in the image in different color channels;
[0015] The color temperature compensation value is determined according to the color proportion of the preset color channel component and a preset second mapping relationship; wherein the preset second mapping relationship includes a mapping between the color proportion and the color temperature compensation value.
[0016] In some embodiments, determining the color proportion of a preset color channel component according to the pixel values of the pixel points in the image in different color channels includes:
[0017] Determine the pixel mean of each color channel according to the pixel values of the pixel points in the image in different color channels;
[0018] Weighting the pixel means corresponding to each of the color channels according to the preset weighting coefficients corresponding to each of the color channels;
[0019] Determine the sum of weighted pixel means of different color channels;
[0020] The ratio between the weighted pixel mean corresponding to the preset color channel and the sum value is determined as the color proportion.
[0021] In some embodiments, the preset color channel includes a blue channel; and determining the target display color temperature according to the ambient color temperature and the color temperature compensation value includes:
[0022] Determine an initial display color temperature corresponding to the ambient color temperature;
[0023] When the ambient color temperature is less than a preset color temperature threshold and the color proportion is less than a preset proportion threshold, the initial display color temperature is increased according to the color temperature compensation value to obtain the target display color temperature.
[0024] In some embodiments, in the preset second mapping relationship, when the color proportion of the blue channel is less than the preset proportion threshold, the color temperature compensation value is negatively correlated with the color proportion of the blue channel.
[0025] In some embodiments, the method further comprises:
[0026] Get the historical target display color temperature;
[0027] The step of displaying the image at the target display color temperature by the electronic device includes:
[0028] In a case where a difference between the target display color temperature and the historical target display color temperature is greater than a preset difference threshold, the image is displayed at the target display color temperature by the electronic device.
[0029] According to a second aspect of an embodiment of the present disclosure, there is provided a display device, including:
[0030] A first acquisition module, used to acquire an image to be displayed and an ambient color temperature of an environment in which an electronic device displaying the image is currently located;
[0031] A first determination module, configured to determine a color temperature compensation value for displaying the image by the electronic device according to a pixel value of a pixel point in the image;
[0032] A second determination module, configured to determine a target display color temperature according to the ambient color temperature and the color temperature compensation value;
[0033] A display module is used to display the image at the target display color temperature through the electronic device.
[0034] In some embodiments, the second determination module is used to determine the initial display color temperature corresponding to the ambient color temperature according to a preset first mapping relationship; wherein the preset first mapping relationship includes a mapping between ambient color temperature and display color temperature; and the initial display color temperature is compensated using the color temperature compensation value to obtain the target display color temperature.
[0035] In some embodiments, the pixel value of the pixel point includes pixel values of multiple color channels; the first determination module is used to determine the color proportion of the preset color channel component according to the pixel values of the pixel points in the image in different color channels; determine the color temperature compensation value according to the color proportion of the preset color channel component and a preset second mapping relationship; wherein the preset second mapping relationship includes a mapping between the color proportion and the color temperature compensation value.
[0036] In some embodiments, the first determination module is used to determine the pixel mean of each color channel according to the pixel value of the pixel point in the image in different color channels; weight the pixel mean corresponding to each color channel according to the preset weighting coefficient corresponding to each color channel; determine the sum of the weighted pixel means of different color channels; and determine the ratio between the weighted pixel mean corresponding to the preset color channel and the sum as the color proportion.
[0037] In some embodiments, the preset color channel includes a blue channel; the second determination module is used to determine the initial display color temperature corresponding to the ambient color temperature; when the ambient color temperature is less than a preset color temperature threshold and the color proportion is less than a preset proportion threshold, the initial display color temperature is increased according to the color temperature compensation value to obtain the target display color temperature.
[0038] In some embodiments, in the preset second mapping relationship, when the color proportion of the blue channel is less than the preset proportion threshold, the color temperature compensation value is negatively correlated with the color proportion of the blue channel.
[0039] In some embodiments, the apparatus further comprises:
[0040] The second acquisition module is used to obtain the historical target display color temperature;
[0041] The display module is used to display the image at the target display color temperature through the electronic device when the difference between the target display color temperature and the historical target display color temperature is greater than a preset difference threshold.
[0042] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0043] A processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method as described in the first aspect above.
[0044] According to a fourth aspect of an embodiment of the present disclosure, there is provided a storage medium, including:
[0045] When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as described in the first aspect above.
[0046] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0047] As in the related art, adjusting the display color temperature only according to the ambient color temperature of the electronic device will result in severe yellowish distortion when displaying warm-colored images under warm ambient color temperatures. In addition, since the display effect of the image is actually the result of the superposition of the color temperature of the image and the display color temperature of the display component, the embodiment of the present disclosure determines the color temperature compensation value of the image displayed by the electronic device according to the pixel values of the pixels in the image to be displayed, and thus determines the target display color temperature according to the ambient color temperature of the environment in which the electronic device is located and the color temperature compensation value. In this way, both the ambient color temperature and the color of the image can be taken into account, thereby improving the display effect of the image and reducing problems such as the image with warm color temperature being displayed too yellow.
[0048] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0050] Figure 1 This is an example of a display method process shown in an embodiment of the present disclosure Figure 1 .
[0051] Figure 2 It is an example diagram of a preset second mapping relationship shown in an embodiment of the present disclosure.
[0052] Figure 3 This is an example of a display method process shown in an embodiment of the present disclosure Figure 2 .
[0053] Figure 4 2 is a diagram of a display device shown in an embodiment of the present disclosure.
[0054] Figure 5 It is a block diagram of an electronic device shown in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0055] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0056] The embodiment of the present disclosure provides a display method, and its execution subject may be an electronic device including a display component, such as a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc.; the execution subject may also be a server or other electronic device. If the execution subject is a server or other electronic device, the server or other electronic device determines the target display color temperature based on the acquired image to be displayed and the ambient color temperature, and then sends the target display color temperature to the electronic device including the display component, so that the image is displayed at the target display color temperature through the display component of the electronic device. In some possible implementations, the display method can be implemented by a processor calling a computer-readable instruction stored in a memory. The following is an example of an electronic device including a display component as the execution subject.
[0057] Figure 1 This is an example of a display method process shown in an embodiment of the present disclosure Figure 1 ,Depend on Figure 1 It can be seen that the following steps are included:
[0058] S101, acquiring an image to be displayed and an ambient color temperature of an environment in which an electronic device displaying the image is currently located;
[0059] S102, determining a color temperature compensation value for displaying the image by the electronic device according to pixel values of pixels in the image;
[0060] S103, determining a target display color temperature according to the ambient color temperature and the color temperature compensation value;
[0061] S104: Display the image at the target display color temperature through the electronic device.
[0062] In step S101, the electronic device obtains an image to be displayed, and the ambient color temperature of the environment in which the electronic device currently displays the image; wherein the electronic device may obtain the ambient color temperature of the current environment through a built-in color temperature sensor; or it may obtain the ambient color temperature sensed by a color temperature sensor whose distance from the electronic device is less than a preset distance threshold, etc., which is not limited in the present disclosure.
[0063] In step S102, the electronic device determines the color temperature compensation value of the image displayed by the electronic device according to the pixel values of the pixels in the image; wherein the electronic device can display the image based on a display component such as a display screen or a projection screen. The color temperature compensation value of the embodiment of the present disclosure may be determined based on the pixel values of some pixels in the image, or based on the pixel values of all pixels in the image, which is not limited in the embodiment of the present disclosure.
[0064] Since the display color temperature of a display component is usually determined only according to the ambient color temperature, when a user views an image through the display component of an electronic device, the display effect of the image actually includes the effect of the superposition of the color of the image and the display color temperature of the display component. In this regard, in the embodiment of the present disclosure, a color temperature compensation value is determined based on the pixel value of a pixel point in the image to adjust the display color temperature of the display component, which can improve the user experience.
[0065] In some embodiments, the electronic device determines the color temperature of the image based on the pixel values of the pixels in the image, and based on the preset correspondence between the image color temperature and the color temperature compensation value, determines the color temperature compensation value corresponding to the color temperature of the image as the color temperature compensation value of the image displayed by the electronic device; wherein the preset correspondence between the image color temperature and the color temperature compensation value can be obtained by testing in an experimental environment based on the user's perception.
[0066] In some embodiments, since the color channel corresponding to the maximum pixel mean in the image has a greater influence on the color temperature of the image, the electronic device determines the pixel means of different color channels according to the pixel values of the pixel points in the image, and determines the target color channel corresponding to the maximum pixel mean among the pixel means of different color channels, thereby determining the color temperature compensation value corresponding to the pixel mean of the target color channel as the color temperature compensation value of the image displayed by the electronic device based on the correspondence between the pixel mean of the preset color channel and the color temperature compensation value; wherein the correspondence between the pixel mean of the preset color channel and the color temperature compensation value can also be obtained by testing in an experimental environment based on the user's perception.
[0067] In some embodiments, since the pixel values of each color channel in an image determine the color temperature of the image, the image to be displayed is input into a preset color temperature compensation model, and the pixel values of the pixels in the image are processed by the color temperature compensation model to output a color temperature compensation value that has a greater correlation with the color temperature of the image. The color temperature compensation model may be trained based on a deep learning network; for example, based on training sample image data and label values, a network such as a convolutional neural network (CNN) or a deep learning network (DNN) is trained and adjusted to obtain the color temperature compensation model; wherein the label value is the preset color temperature compensation value.
[0068] In step S103, after determining the color temperature compensation value of the image displayed by the electronic device, the electronic device determines the target display color temperature according to the ambient color temperature and the color temperature compensation value; for example, based on a preset display color temperature function, the ambient color temperature and the color temperature compensation value are processed to obtain the target display color temperature; or, according to the correspondence between the preset ambient color temperature, the color temperature compensation value, and the display color temperature, the display color temperature corresponding to the ambient color temperature and the color temperature compensation value is determined as the target display color temperature, etc., so that after determining the target display color temperature, in step S104, the image is displayed at the target display color temperature through the display component of the electronic device.
[0069] For example, if the ambient color temperature of the environment in which the electronic device is located is warmer, in order to improve the matching degree between the display color temperature and the ambient color temperature, it is necessary to lower the display color temperature (the display color temperature is warmer), and adjust the degree of reduction of the display color temperature in combination with the color temperature compensation value; if the color temperature compensation value is obtained based on the pixel value of the pixel point in the image with warm color temperature, the display color temperature is reduced by a smaller degree in combination with the color temperature compensation value to obtain the target display color temperature, so that in the scene where the ambient color temperature is warmer, the display of the warm color temperature image will not be too warm.
[0070] If the ambient color temperature of the environment in which the electronic device is located is relatively cold, in order to improve the matching degree between the display color temperature and the ambient color temperature, it is necessary to increase the display color temperature (the display color temperature is relatively cold), and adjust the increase degree of the display color temperature in combination with the color temperature compensation value; if the color temperature compensation value is obtained based on the pixel value of the pixel point in the image with cold color temperature, the display color temperature is increased with a smaller increase degree in combination with the color temperature compensation value to obtain the target display color temperature, so that in the scene where the ambient color temperature is relatively cold, the display of the cold color temperature image will not be too cold.
[0071] Taking the adaptive screen display color temperature adjustment technology as an example, the display color temperature of the display component is adjusted according to the light conditions of the electronic device's surrounding environment, so that the electronic device can be presented to the user with a better display effect in different light environments. For example, when the surrounding environment is warm, the display color temperature of the display component will be adjusted to be warmer, and when the surrounding environment is cold, the display color temperature of the display component will be adjusted to be colder, so as to adapt to the current light environment, thereby reducing the user's visual fatigue. However, only adjusting the display color temperature according to the ambient color temperature of the electronic device will result in serious yellow distortion when displaying warm-colored images under the condition of warm ambient color temperature. As mentioned above, the display effect of the image is actually the effect of the superposition of the color temperature of the image and the display color temperature of the display component. In this regard, the embodiment of the present disclosure determines the color temperature compensation value of the electronic device displaying the image according to the pixel value of the pixel point in the image to be displayed, so as to jointly determine the target display color temperature according to the ambient color temperature of the environment in which the electronic device is located and the color temperature compensation value. It can be understood that this method can take into account both the ambient color temperature and the color of the image, improve the display effect of the image, and reduce problems such as the yellowing of the warm color temperature image.
[0072] In some embodiments, determining the target display color temperature according to the ambient color temperature and the color temperature compensation value includes:
[0073] Determine the initial display color temperature corresponding to the ambient color temperature according to a preset first mapping relationship; wherein the preset first mapping relationship includes a mapping between the ambient color temperature and the display color temperature;
[0074] The initial display color temperature is compensated by using the color temperature compensation value to obtain the target display color temperature.
[0075] In an embodiment of the present disclosure, after obtaining the ambient color temperature, the electronic device determines the initial display color temperature corresponding to the ambient color temperature according to a preset first mapping relationship; wherein the preset first mapping relationship includes a mapping between the ambient color temperature and the display color temperature; the preset first mapping relationship may be a mapping relationship used by the aforementioned adaptive screen display color temperature adjustment technology, or a mapping relationship obtained by a technician based on multiple experiments, or a user-defined mapping relationship, etc., and the present disclosure does not limit this. It can be understood that the initial display color temperature of the embodiment of the present disclosure is highly correlated with the ambient color temperature of the environment in which the electronic device is located.
[0076] After determining the initial display color temperature corresponding to the ambient color temperature, the embodiment of the present disclosure uses the color temperature compensation value to compensate the initial display color temperature to obtain the target display color temperature. The use of the color temperature compensation value to compensate the initial display color temperature can be implemented for different scenarios.
[0077] Taking a positive color temperature compensation value as an example, for a scene with a warm ambient color temperature, the initial display color temperature corresponding to the ambient color temperature is warmer. At this time, if the image to be displayed has a warm color temperature, in order to prevent the warm color temperature image from being too warm, the sum of the initial display color temperature and the color temperature compensation value, or the sum of the initial display color temperature and the weighted color temperature compensation value, can be determined as the target display color temperature.
[0078] For scenes with cold ambient color temperature, the initial display color temperature corresponding to the ambient color temperature is cold. At this time, if the image to be displayed has a cold color temperature, in order to prevent the display of the cold color temperature image from being too cold, the difference between the initial display color temperature and the color temperature compensation value, or the difference between the initial display color temperature and the weighted color temperature compensation value, can be determined as the target display color temperature.
[0079] It can be understood that the embodiment of the present disclosure determines the initial display color temperature corresponding to the ambient color temperature according to the preset first mapping relationship, and thus compensates the initial color temperature with the color temperature compensation value to obtain the target display color temperature. This scheme takes into account both the ambient color temperature and the image color attributes, and compensates for the target display color temperature based on the initial display color temperature consistent with the target display color temperature dimension, thereby improving the accuracy of determining the target display color temperature, and further improving the display effect of the electronic device displaying at the target display color temperature.
[0080] In some embodiments, the pixel value of the pixel point includes pixel values of multiple color channels; and determining the color temperature compensation value of the electronic device displaying the image according to the pixel value of the pixel point in the image includes:
[0081] Determine the color proportion of a preset color channel component according to the pixel values of the pixel points in the image in different color channels;
[0082] The color temperature compensation value is determined according to the color proportion of the preset color channel component and a preset second mapping relationship; wherein the preset second mapping relationship includes a mapping between the color proportion and the color temperature compensation value.
[0083] In an embodiment of the present disclosure, the electronic device determines the color proportion of a preset color channel component based on the pixel values of pixels in different color channels in an image; such as determining the proportion of the sum of the pixel values of the preset color channel in the total of the pixel values of each color channel; or determining the proportion of the pixel mean of the preset color channel in the total of the pixel mean of each color channel, etc.
[0084] Among them, the preset color channel can be a pre-set color channel; in addition, the preset color channel can also be determined based on the ambient color temperature of the environment in which the electronic device is located. For example, if the ambient color temperature is warm (less than a preset warm color temperature threshold), the preset color channel can be a blue channel; if the ambient color temperature is cold (greater than a preset cold color temperature threshold), the preset color channel can be a red channel, etc. It can be understood that the color proportion of the preset color channel component in the embodiment of the present disclosure is highly correlated with the color temperature of the image to be displayed.
[0085] After determining the color proportion of the preset color channel component in the image, the color temperature compensation value is determined according to the color proportion of the preset color channel component and the preset second mapping relationship, so as to compensate the initial display color temperature with the color temperature compensation value to obtain the target display color temperature; wherein the preset second mapping relationship is obtained based on multiple test fittings, including the mapping between the color proportion and the color temperature compensation value.
[0086] It can be understood that the embodiment of the present disclosure determines the color temperature compensation value for the image color temperature based on the color proportion of the preset color channel component that has a greater correlation with the image color temperature, and then uses the color temperature compensation value to compensate for the initial display color temperature. This can improve the degree of matching between the target display color temperature and the image color temperature after compensation, thereby improving the effect of displaying the image at the target display color temperature.
[0087] In some embodiments, determining the color proportion of a preset color channel component according to the pixel values of the pixel points in the image in different color channels includes:
[0088] Determine the pixel mean of each color channel according to the pixel values of the pixel points in the image in different color channels;
[0089] Weighting the pixel means corresponding to each of the color channels according to the preset weighting coefficients corresponding to each of the color channels;
[0090] Determine the sum of weighted pixel means of different color channels;
[0091] The ratio between the weighted pixel mean corresponding to the preset color channel and the sum value is determined as the color proportion.
[0092] In the embodiment of the present disclosure, the electronic device determines the pixel mean of each color channel based on the pixel values of the pixel points in the image in different color channels; and uses a preset weighting coefficient to weight the pixel mean of each color channel respectively to obtain the weighted pixel mean of each color channel.
[0093] After determining the weighted pixel mean of each color channel, the electronic device determines the ratio between the weighted pixel mean corresponding to the preset color channel and the sum of the weighted pixel means of each color channel as the color proportion of the preset color channel component.
[0094] Taking the blue channel as an example, the color proportion b of the blue channel component can be expressed by the following formula (1):
[0095]
[0096] in, represents the pixel mean of the red channel, represents the pixel mean of the green channel, Represents the pixel mean of the blue channel. The preset weighting coefficient corresponding to the red channel is 0.299, the preset weighting coefficient corresponding to the green channel is 0.587, and the preset weighting coefficient corresponding to the blue channel is 0.114; among them, 0.299, 0.587, and 0.114 can be adjusted as needed.
[0097] It can be understood that due to the different perception capabilities of the human eye to different color components, the embodiments of the present disclosure weight the pixel means of each color channel based on the human eye's perception capability of color using preset weighting coefficients of different color channels, and determine the ratio between the weighted pixel mean corresponding to the preset color channel and the sum of the weighted pixel means of each color channel as the color proportion of the preset color channel component. Compared with determining the color proportion based only on the pixel mean, the color proportion determined by the weighted pixel mean in the embodiments of the present disclosure can better characterize the color temperature of the image perceived by the user, thereby helping to improve the accuracy of determining the color temperature compensation value based on the color proportion of the preset color channel component.
[0098] In some embodiments, the preset color channel includes a blue channel; and determining the target display color temperature according to the ambient color temperature and the color temperature compensation value includes:
[0099] Determine an initial display color temperature corresponding to the ambient color temperature;
[0100] When the ambient color temperature is less than a preset color temperature threshold and the color proportion is less than a preset proportion threshold, the initial display color temperature is increased according to the color temperature compensation value to obtain the target display color temperature.
[0101] In the disclosed embodiment, the electronic device determines the initial display color temperature corresponding to the ambient color temperature by determining the display color temperature corresponding to the ambient color temperature as the initial display color temperature based on the aforementioned preset first mapping relationship; or by calculating the ambient color temperature based on a preset initial display color temperature function to obtain the initial display color temperature corresponding to the ambient color temperature; wherein the preset initial display color temperature function may be obtained by fitting multiple tests under different ambient color temperatures.
[0102] When the ambient color temperature of the electronic device is less than a preset color temperature threshold and the color proportion is less than the preset proportion threshold, it indicates that the ambient color temperature of the current environment of the electronic device is warm and the image to be displayed is a warm color temperature. In this scenario, the initial display color temperature is increased according to the color temperature compensation value, such as increasing the color temperature compensation value on the basis of the initial display color temperature, or increasing the weighted value of the color temperature compensation value to obtain the target display color temperature, so that the target display color temperature is not too warm, causing the image to appear too yellow.
[0103] It is understandable that when the ambient color temperature of the electronic device is less than the preset color temperature threshold, which indicates that the ambient color temperature of the current environment of the electronic device is warm, if the image to be displayed is also warm, adjusting the display color temperature based on the ambient color temperature alone will easily cause the image to be displayed too warm; and if the image to be displayed is cold, adjusting the display color temperature based on the ambient color temperature to be yellowish will have little effect on the display effect of the cold color temperature image, and no compensation is required. In this regard, when the ambient color temperature of the electronic device of the embodiment of the present disclosure is less than the preset color temperature threshold and the color proportion is less than the preset proportion threshold, the initial display color temperature is increased according to the color temperature compensation value to obtain the target display color temperature, thereby returning the white balance and white point of the display component to a normal state, taking into account the necessity of adjusting the display color temperature when the scene is met, and the power consumption of the electronic device when the scene is not met.
[0104] In addition, in some embodiments, when the ambient color temperature is greater than a preset color temperature threshold and the color proportion is greater than a preset proportion threshold, the initial display color temperature is reduced according to the color temperature compensation value to obtain a target display color temperature.
[0105] In an embodiment of the present disclosure, when the ambient color temperature of the electronic device is greater than a preset color temperature threshold and the color proportion is greater than the preset proportion threshold, it indicates that the ambient color temperature of the environment in which the current electronic device is located is cold and the image to be displayed is a cold or warm color temperature. In this scenario, the initial display color temperature is reduced according to the color temperature compensation value, such as reducing the color temperature compensation value on the basis of the initial display color temperature, or reducing the weighted value of the color temperature compensation value to obtain the target display color temperature, so that the target display color temperature is not too cold and the image is displayed too blue.
[0106] It is understandable that when the ambient color temperature of the electronic device is greater than the preset color temperature threshold, which indicates that the ambient color temperature of the current environment of the electronic device is cold, if the image to be displayed is also cold, adjusting the display color temperature based on the ambient color temperature alone is likely to cause the image to be displayed too cold; and if the image to be displayed is warm, adjusting the display color temperature based on the ambient color temperature to be cold has little effect on the display effect of the warm color temperature image, and no compensation is required. In this regard, when the ambient color temperature of the electronic device of the embodiment of the present disclosure is greater than the preset color temperature threshold and the color proportion is greater than the preset proportion threshold, the initial display color temperature corresponding to the ambient color temperature is reduced according to the color temperature compensation value to obtain the target display color temperature, taking into account the necessity of adjusting the display color temperature when the scene is met, and the power consumption of the electronic device when the scene is not met.
[0107] In some embodiments, in the preset second mapping relationship, when the color proportion of the blue channel is less than the preset proportion threshold, the color temperature compensation value is negatively correlated with the color proportion of the blue channel.
[0108] In the disclosed embodiment, the preset second mapping relationship includes a mapping between a color temperature compensation value and a color proportion of a blue channel, and when the color proportion of the blue channel is less than the preset proportion threshold, the color temperature compensation value is negatively correlated with the color proportion of the blue channel. Exemplarily, when the ambient color temperature is less than the preset color temperature threshold, that is, when the ambient color temperature is warmer, the corresponding initial display color temperature is smaller (warmer); if the color proportion of the blue channel component is smaller, the warmer the image color temperature, the larger the corresponding color temperature compensation value, thereby increasing the color temperature compensation value on the basis of the initial display color temperature, so that the target display color temperature is not too small, resulting in the display screen being too yellow.
[0109] Figure 2 is an example diagram of a preset second mapping relationship shown in an embodiment of the present disclosure, Figure 2 In the figure, the horizontal axis (x-axis) represents the color proportion, and the vertical axis (y-axis) represents the color temperature compensation value; the solid line represents the preset second mapping relationship, which can be expressed by the following formula (2):
[0110]
[0111] Figure 2 In the solid line shown, the maximum color temperature compensation value 150 and the minimum color temperature compensation value (close to 0) can be pre-set based on the color temperature compensation requirement; the color proportion 0.05 can be the color proportion of the blue channel component determined based on the white image, and the color proportion 0.2 can be the color proportion of the blue channel component determined based on the blue image, that is, the maximum value of x is 0.2; the virtual value y=12077x 2 Example of a trend zone line of -3020x+132.8.
[0112] The above formula (2) corresponds to the aforementioned situation where the ambient color temperature is less than the preset color temperature threshold and the color proportion of the blue channel is less than the preset proportion threshold, the initial display color temperature is increased according to the color temperature compensation value to obtain the target display color temperature, wherein the color proportion of 0.05 corresponds to the preset proportion threshold, and when the color proportion of the blue channel is greater than 0.05, there is no need to compensate the display color temperature.
[0113] It can be understood that due to the large correlation between the color proportion and the color temperature of the image, the smaller the color proportion of the blue channel component, the warmer the image color temperature. Therefore, when the ambient color temperature is lower than the preset color temperature threshold, that is, the ambient color temperature of the electronic device is warmer, the initial display color temperature is corrected according to the color temperature correction value that is negatively correlated with the color proportion of the blue channel, so that the target display color temperature of the warmer image is greater than the target display color temperature of the colder image, thereby improving the display effect of the image displayed based on the target display color temperature.
[0114] In some embodiments, the method further comprises:
[0115] Get the historical target display color temperature;
[0116] The step of displaying the image at the target display color temperature by the electronic device includes:
[0117] In a case where a difference between the target display color temperature and the historical target display color temperature is greater than a preset difference threshold, the image is displayed at the target display color temperature by the electronic device.
[0118] In an embodiment of the present disclosure, an electronic device obtains a historical target display color temperature determined for a previous frame of image, and determines a difference between a target display color temperature determined for a current image frame to be displayed and the historical target display color temperature; when the difference between the target display color temperature and the historical target display color temperature is greater than a preset difference threshold, the electronic device displays the image to be displayed at the target display color temperature. Through this solution, the discomfort to the human eye caused by frequent adjustment of the display color temperature of the display component can be reduced.
[0119] Figure 3 This is an example of a display method process shown in an embodiment of the present disclosure Figure 2 ,Depend on Figure 3 It can be seen that the following steps are included:
[0120] S601, counting pixel histogram;
[0121] In the embodiment of the present disclosure, the pixel values of the pixels in the image to be displayed are counted to obtain a pixel histogram, and based on the pixel histogram, the color proportion of the preset color channel component is determined, corresponding to the aforementioned determination of the color proportion of the preset color channel component according to the pixel values of the pixels in the image in different color channels. The pixel values of the pixels in the image may be the pixel values of some pixels or all pixels.
[0122] S602, registering a color component detection driver;
[0123] In an embodiment of the present disclosure, a color component detection driver is registered, and based on the registered color component detection driver, the color proportion of a preset color channel component in the image is detected; wherein, when switching to the next image frame to be displayed, the color proportion of the preset color channel component in the image frame is detected.
[0124] S603, registering color component detection feedback;
[0125] In the disclosed embodiment, color component detection feedback is registered, and based on the registered color component detection feedback, the color proportion is transmitted to the color temperature compensation service.
[0126] S604, determining a color temperature compensation value;
[0127] In an embodiment of the present disclosure, based on the color temperature compensation service, the color temperature compensation value of the electronic device displaying the image corresponding to the color proportion of the preset color channel component is determined according to a preset second mapping relationship; wherein the preset second mapping relationship includes a mapping between the color proportion and the color temperature compensation value.
[0128] S605, obtaining the ambient color temperature;
[0129] In the embodiment of the present disclosure, the ambient color temperature of the environment in which the electronic device is located is obtained by a color temperature sensor;
[0130] S606, registering ambient color temperature feedback;
[0131] In an embodiment of the present disclosure, ambient color temperature feedback is registered, and based on the registered ambient color temperature feedback, the ambient color temperature is transmitted to a color temperature compensation service.
[0132] S607, determining an initial display color temperature;
[0133] In an embodiment of the present disclosure, based on the color temperature compensation service, an initial display color temperature corresponding to the ambient color temperature is determined according to a preset first mapping relationship; wherein the preset first mapping relationship includes a mapping between the ambient color temperature and the display color temperature.
[0134] S608, determining a target display color temperature;
[0135] In the embodiment of the present disclosure, the sum of the initial display color temperature and the color temperature compensation value is determined as the target display color temperature. Corresponding to the aforementioned situation where the ambient color temperature is less than the preset color temperature threshold and the color proportion is less than the preset proportion threshold, the initial display color temperature is increased according to the color temperature compensation value to obtain the target display color temperature; wherein the color proportion is the color proportion of the blue channel.
[0136] S609, obtaining historical target display color temperature;
[0137] In the disclosed embodiment, a historical target display color temperature is obtained, such as obtaining a target display color temperature corresponding to a previous frame of image;
[0138] S610, determining whether the difference between the target display color temperature and the historical display color temperature is greater than a preset difference threshold; if so, executing step S611; if not, not adjusting the display color temperature of the electronic device.
[0139] S611. Trigger a timer to update the screen color temperature.
[0140] In an embodiment of the present disclosure, when the difference between the target display color temperature and the historical display color temperature is greater than a preset color temperature threshold, a timer is triggered to update the display color temperature of a display component of the electronic device, thereby displaying an image at the target display color temperature through the display component.
[0141] Figure 4 is a diagram of a display device shown in an embodiment of the present disclosure, comprising Figure 4 It is known that, including:
[0142] A first acquisition module 701 is used to acquire an image to be displayed and an ambient color temperature of an environment in which an electronic device displaying the image is currently located;
[0143] A first determining module 702, configured to determine a color temperature compensation value for displaying the image by the electronic device according to a pixel value of a pixel point in the image;
[0144] A second determination module 703 is used to determine a target display color temperature according to the ambient color temperature and the color temperature compensation value;
[0145] The display module 704 is configured to display the image at the target display color temperature through the electronic device.
[0146] In some embodiments, the second determination module 703 is used to determine the initial display color temperature corresponding to the ambient color temperature according to a preset first mapping relationship; wherein the preset first mapping relationship includes a mapping between ambient color temperature and display color temperature; and the initial display color temperature is compensated using the color temperature compensation value to obtain the target display color temperature.
[0147] In some embodiments, the pixel value of the pixel point includes pixel values of multiple color channels; the first determination module 702 is used to determine the color proportion of the preset color channel component according to the pixel values of the pixel points in the image in different color channels; determine the color temperature compensation value according to the color proportion of the preset color channel component and a preset second mapping relationship; wherein the preset second mapping relationship includes a mapping between the color proportion and the color temperature compensation value.
[0148] In some embodiments, the first determination module 702 is used to determine the pixel mean of each color channel according to the pixel value of the pixel point in the image in different color channels; weight the pixel mean corresponding to each color channel according to the preset weighting coefficient corresponding to each color channel; determine the sum of the weighted pixel means of different color channels; and determine the ratio between the weighted pixel mean corresponding to the preset color channel and the sum as the color proportion.
[0149] In some embodiments, the preset color channel includes a blue channel; the second determination module 703 is used to determine the initial display color temperature corresponding to the ambient color temperature; when the ambient color temperature is less than the preset color temperature threshold and the color proportion is less than the preset proportion threshold, the initial display color temperature is increased according to the color temperature compensation value to obtain the target display color temperature.
[0150] In some embodiments, in the preset second mapping relationship, when the color proportion of the blue channel is less than the preset proportion threshold, the color temperature compensation value is negatively correlated with the color proportion of the blue channel.
[0151] In some embodiments, the apparatus further comprises:
[0152] The second acquisition module 705 is used to acquire the historical target display color temperature;
[0153] The display module 704 is configured to display the image at the target display color temperature through the electronic device when the difference between the target display color temperature and the historical target display color temperature is greater than a preset difference threshold.
[0154] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0155] Figure 5 800 is a block diagram of an electronic device shown in an embodiment of the present disclosure. For example, the electronic device 800 may be a mobile phone, a mobile computer, etc.
[0156] Reference Figure 5, the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0157] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0158] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0159] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0160] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0161] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0162] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0163] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0164] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as Wi-Fi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0165] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0166] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0167] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the aforementioned display method.
[0168] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims above.
[0169] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A display method, characterized in that: The method comprises: Acquire an image to be displayed and an ambient color temperature of an environment in which an electronic device displaying the image is currently located; Determining a color temperature compensation value for displaying the image by the electronic device according to pixel values of pixels in the image; Determining a target display color temperature according to the ambient color temperature and the color temperature compensation value; The image is displayed by the electronic device at the target display color temperature.
2. The method according to claim 1, characterized in that The determining a target display color temperature according to the ambient color temperature and the color temperature compensation value includes: Determine the initial display color temperature corresponding to the ambient color temperature according to a preset first mapping relationship; wherein the preset first mapping relationship includes a mapping between the ambient color temperature and the display color temperature; The initial display color temperature is compensated by using the color temperature compensation value to obtain the target display color temperature.
3. The method according to claim 1, characterized in that The pixel value of the pixel point includes pixel values of multiple color channels; and determining the color temperature compensation value of the electronic device displaying the image according to the pixel value of the pixel point in the image includes: Determine the color proportion of a preset color channel component according to the pixel values of the pixel points in the image in different color channels; The color temperature compensation value is determined according to the color proportion of the preset color channel component and a preset second mapping relationship; wherein the preset second mapping relationship includes a mapping between the color proportion and the color temperature compensation value.
4. The method according to claim 3, characterized in that The step of determining the color proportion of a preset color channel component according to the pixel values of the pixel points in the image in different color channels includes: Determine the pixel mean of each color channel according to the pixel values of the pixel points in the image in different color channels; Weighting the pixel means corresponding to each of the color channels according to the preset weighting coefficients corresponding to each of the color channels; Determine the sum of weighted pixel means of different color channels; The ratio between the weighted pixel mean corresponding to the preset color channel and the sum value is determined as the color proportion.
5. The method according to claim 3, characterized in that: The preset color channel includes a blue channel; and determining a target display color temperature according to the ambient color temperature and the color temperature compensation value includes: Determine an initial display color temperature corresponding to the ambient color temperature; When the ambient color temperature is less than a preset color temperature threshold and the color proportion is less than a preset proportion threshold, the initial display color temperature is increased according to the color temperature compensation value to obtain the target display color temperature.
6. The method according to claim 5, characterized in that In the preset second mapping relationship, when the color proportion of the blue channel is less than the preset proportion threshold, the color temperature compensation value is negatively correlated with the color proportion of the blue channel.
7. The method according to claim 1, characterized in that The method further comprises: Get the historical target display color temperature; The step of displaying the image at the target display color temperature by the electronic device includes: In a case where a difference between the target display color temperature and the historical target display color temperature is greater than a preset difference threshold, the image is displayed at the target display color temperature by the electronic device.
8. A display device, characterized in that: The device comprises: A first acquisition module, used to acquire an image to be displayed and an ambient color temperature of an environment in which an electronic device displaying the image is currently located; A first determination module, configured to determine a color temperature compensation value for displaying the image by the electronic device according to a pixel value of a pixel point in the image; A second determination module, configured to determine a target display color temperature according to the ambient color temperature and the color temperature compensation value; A display module is used to display the image at the target display color temperature through the electronic device.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Photographing method and device
CN105100764A
Display device and color correction method
CN107808641A
Method and system for adjusting white balance, and display
CN108965846A
Screen display method and device
CN109461409A
White balance automatic switching method and device
CN109547762A