Display method and device, electronic device, and storage medium
By acquiring image pixel values and ambient color temperature, and combining mapping relationships and weighting coefficients to adjust the display color temperature, the problem of poor display effect of the screen under different ambient color temperatures is solved, thereby improving image display quality and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2023-08-11
- Publication Date
- 2026-05-08
AI Technical Summary
Under different ambient color temperatures, the display effect of existing displays is not good, especially under strong single color temperature lighting, which can easily lead to visual fatigue and image distortion.
By acquiring the pixel values of the image and the ambient color temperature, a color temperature compensation value is determined. Combined with a preset mapping relationship and weighting coefficients, the display color temperature is adjusted to match the environment and image colors, thereby achieving the target display color temperature.
It improves image display quality, reduces the yellowish tint of warm color temperature images, and alleviates user eye strain.
Smart Images

Figure CN119479569B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of screen display technology, and in particular to a display method and apparatus, electronic device, and storage medium. Background Technology
[0002] In electronic devices such as mobile phones, computers, wearable devices, and service terminal display devices, the human eye reproduces colors differently under different ambient color temperatures. Color temperature environments that deviate from the natural spectrum can cause visual fatigue. For example, after working or studying under strong, single-color-temperature lighting for a period of time, people are prone to eye fatigue and decreased vision.
[0003] To improve display quality, the display color temperature is typically adjusted based on the ambient color temperature. However, this approach has drawbacks, such as the display appearing too yellow after adjustment, resulting in poor display quality. Summary of the Invention
[0004] This disclosure provides a display method and apparatus, an electronic device, and a storage medium.
[0005] According to a first aspect of the present disclosure, a display method is provided, comprising:
[0006] Obtain the image to be displayed, and the ambient color temperature of the environment in which the electronic device displaying the image is currently located;
[0007] Based on the pixel values of the pixels in the image, the color temperature compensation value for displaying the image by the electronic device is determined;
[0008] The target display color temperature is determined based on 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 based on the ambient color temperature and the color temperature compensation value includes:
[0011] The 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 the mapping between the ambient color temperature and the display color temperature;
[0012] The initial display color temperature is compensated using the color temperature compensation value to obtain the target display color temperature.
[0013] In some embodiments, the pixel value of the pixel includes pixel values of multiple color channels; determining the color temperature compensation value for the electronic device to display the image based on the pixel values of the pixels in the image includes:
[0014] The color proportion of the preset color channel components is determined based on the pixel values of the pixels in different color channels of the image.
[0015] The color temperature compensation value is determined based on the color proportion of the preset color channel components and the preset second mapping relationship; wherein, the preset second mapping relationship includes the 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 based on the pixel values of pixels in different color channels of the image includes:
[0017] The average pixel value of each color channel is determined based on the pixel values of the pixels in the image in different color channels.
[0018] The average pixel value corresponding to each color channel is weighted according to the preset weighting coefficients corresponding to each color channel.
[0019] Determine the sum of the weighted pixel mean values for different color channels;
[0020] The ratio between the weighted average pixel value 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; determining the target display color temperature based on the ambient color temperature and the color temperature compensation value includes:
[0022] Determine the 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 includes:
[0026] Obtain the historical target display color temperature;
[0027] The process of displaying the image at the target display color temperature via the electronic device includes:
[0028] If the 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 the present disclosure, a display device is provided, comprising:
[0030] The first acquisition module is used to acquire the image to be displayed, and the ambient color temperature of the environment in which the electronic device displaying the image is currently located;
[0031] The first determining module is used to determine the color temperature compensation value for the electronic device to display the image based on the pixel values of the pixels in the image.
[0032] The second determining module is used to determine the target display color temperature based on 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 via the electronic device.
[0034] In some embodiments, the second determining 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 the ambient color temperature and the display color temperature; and to compensate the initial display color temperature using the color temperature compensation value to obtain the target display color temperature.
[0035] In some embodiments, the pixel value of the pixel includes pixel values of multiple color channels; the first determining module is configured to determine the color proportion of a preset color channel component based on the pixel values of the pixel in the image in different color channels; and determine the color temperature compensation value based on 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 determining module is configured to: determine the average pixel value of each color channel based on the pixel values of pixels in different color channels in the image; weight the average pixel value of each color channel according to a preset weighting coefficient; determine the sum of the weighted average pixel values of different color channels; and determine the ratio between the weighted average pixel value of 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 determining 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 includes:
[0040] The second acquisition module is used to acquire the historical target display color temperature;
[0041] The display module is used to display the image at the target display color temperature via 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 the present disclosure, an electronic device is provided, comprising:
[0043] A processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the method as described in the first aspect above.
[0044] According to a fourth aspect of the present disclosure, a storage medium is provided, comprising:
[0045] When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method described in the first aspect above.
[0046] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0047] In related technologies, adjusting the display color temperature solely based on the ambient color temperature of the electronic device can lead to a severe yellowish distortion when displaying warm-colored images in environments with a warmer ambient color temperature. Furthermore, since the actual display effect of an image is the result of the superposition of the image's color temperature and the display color temperature of the display components, this embodiment of the present disclosure determines the color temperature compensation value of the image displayed by the electronic device based on the pixel values of the pixels in the image to be displayed. Thus, the target display color temperature is determined jointly based on the ambient color temperature of the environment in which the electronic device is located and the color temperature compensation value. 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 overly yellowing warm-colored images.
[0048] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0049] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0050] Figure 1 This is an example of a display method flow shown in an embodiment of the present disclosure. Figure 1 .
[0051] Figure 2 This is an example diagram illustrating a preset second mapping relationship in an embodiment of this disclosure.
[0052] Figure 3 This is an example of a display method flow shown in an embodiment of the present disclosure. Figure 2 .
[0053] Figure 4 This is a diagram of a display device shown in an embodiment of this disclosure.
[0054] Figure 5 This is a block diagram of an electronic device illustrated in an embodiment of this disclosure. Detailed Implementation
[0055] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0056] This disclosure provides a display method, the execution subject of which can be an electronic device including a display component, such as user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc.; the execution subject can 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, thereby displaying the image 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 computer-readable instructions stored in memory. The following description uses an electronic device including a display component as the execution subject as an example.
[0057] Figure 1 This is an example of a display method flow shown in an embodiment of the present disclosure. Figure 1 ,Depend on Figure 1 It can be seen that the process includes the following steps:
[0058] S101. Obtain the image to be displayed, and the ambient color temperature of the environment in which the electronic device displaying the image is currently located;
[0059] S102. Determine the color temperature compensation value for the electronic device to display the image based on the pixel values of the pixels in the image;
[0060] S103. Determine the target display color temperature based on the ambient color temperature and the color temperature compensation value;
[0061] S104. The image is displayed by the electronic device at the target display color temperature.
[0062] In step S101, the electronic device acquires the image to be displayed and the ambient color temperature of the environment in which the electronic device is currently located for displaying the image. The electronic device may acquire the ambient color temperature of the current environment through a built-in color temperature sensor, or it may acquire the ambient color temperature sensed by a color temperature sensor at a distance of less than a preset distance threshold from the electronic device, etc. This disclosure does not limit this.
[0063] In step S102, the electronic device determines the color temperature compensation value of the image to be displayed based on the pixel values of the pixels in the image; wherein, the electronic device may display the image based on a display component such as a display screen or a projection screen. The color temperature compensation value in this embodiment 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; this embodiment does not limit the determination in this way.
[0064] Since the display color temperature of a typical display component is determined solely based on the ambient color temperature, and when a user views an image through the display component of an electronic device, the actual display effect includes the superposition of the image's color and the display color temperature of the display component, this embodiment of the present disclosure determines the color temperature compensation value based on the pixel value of the pixel in the image to adjust the display color temperature of the display component, thereby improving the user experience.
[0065] In some embodiments, the electronic device determines the color temperature of an image based on the pixel values of the pixels in the image, and 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 based on a preset correspondence between the image color temperature and the color temperature compensation value; 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 average value in an image has a significant impact on the color temperature of the image, the electronic device determines the pixel average value of different color channels based on the pixel values of the pixels in the image, and determines the target color channel corresponding to the maximum pixel average value among the pixel average values of different color channels. Based on the preset correspondence between the pixel average value of the color channel and the color temperature compensation value, the color temperature compensation value corresponding to the pixel average value of the target color channel is determined as the color temperature compensation value of the image displayed by the electronic device. The preset correspondence between the pixel average value of the 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 image's color temperature, the image to be displayed is input into a preset color temperature compensation model. The color temperature compensation model processes the pixel values of the pixels in the image and outputs a color temperature compensation value that is highly correlated with the image's color temperature. This color temperature compensation model can be trained based on a deep learning network; for example, it can be obtained by training and parameter tuning a network such as a Convolutional Neural Network (CNN) or a Deep Neural Network (DNN) based on training sample image data and label values; the label values are the preset color temperature compensation values.
[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 based on 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, based on the preset correspondence between the 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 warm, in order to improve the matching degree between the display color temperature and the ambient color temperature, the display color temperature needs to be reduced (the display color temperature is warm), and the degree of reduction of the display color temperature is adjusted in combination with the color temperature compensation value; if the color temperature compensation value is obtained based on the pixel values of pixels in a warm color temperature image, 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 the display of the warm color temperature image will not be too warm in a scene where the ambient color temperature is warm.
[0070] If the ambient color temperature of the environment in which the electronic device is located is relatively cool, in order to improve the matching degree between the display color temperature and the ambient color temperature, the display color temperature needs to be increased (the display color temperature is too cool), and the increase in display color temperature should be adjusted in combination with the color temperature compensation value. If the color temperature compensation value is obtained based on the pixel values of pixels in the cool color temperature image, the display color temperature can be increased by a smaller amount in combination with the color temperature compensation value to obtain the target display color temperature, so that the display of the cool color temperature image will not be too cold in the scene where the ambient color temperature is relatively cool.
[0071] Taking adaptive screen display color temperature adjustment technology as an example, the display color temperature of the display component is adjusted according to the ambient light conditions of the electronic device, so that the electronic device can present a better display effect to the user in different lighting environments. For example, when the ambient environment is warm, the display color temperature of the display component will be adjusted to be warmer, and when the ambient environment is cold, the display color temperature of the display component will be adjusted to be cooler, in order to adapt to the current lighting environment and reduce the user's visual fatigue. However, adjusting the display color temperature only according to the ambient color temperature of the electronic device will result in a severely yellowish and distorted image when displaying warm-colored images in a warm ambient color temperature. As mentioned above, the display effect of the image is actually the result of the superposition of the image color temperature and the display color temperature of the display component. To address this, the embodiments of this disclosure determine the color temperature compensation value of the image displayed by the electronic device based on the pixel values of the pixels in the image to be displayed. Thus, the target display color temperature is determined together with 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 overly yellowing warm-colored images.
[0072] In some embodiments, determining the target display color temperature based on the ambient color temperature and the color temperature compensation value includes:
[0073] The 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 the mapping between the ambient color temperature and the display color temperature;
[0074] The initial display color temperature is compensated using the color temperature compensation value to obtain the target display color temperature.
[0075] In this embodiment, after acquiring 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. The preset first mapping relationship includes a mapping between the ambient color temperature and the display color temperature. This preset first mapping relationship can be the mapping relationship used in the aforementioned adaptive screen display color temperature adjustment technology, a mapping relationship derived by technicians based on multiple experiments, or a user-defined mapping relationship, etc., and this disclosure does not limit it in this regard. It is understood that the initial display color temperature in this embodiment is highly correlated with the ambient color temperature of the environment in which the electronic device is located.
[0076] In this embodiment, after determining the initial display color temperature corresponding to the ambient color temperature, a color temperature compensation value is used to compensate the initial display color temperature to obtain the target display color temperature. The use of a 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 also warm. If the image to be displayed is a warm color temperature, in order to prevent the warm color temperature image from being displayed 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 scenarios where the ambient color temperature is cool, the initial display color temperature corresponding to the ambient color temperature is also cool. If the image to be displayed is a cool color temperature, in order to prevent the cool color temperature image from being displayed 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 is understood that, according to the preset first mapping relationship, the initial display color temperature corresponding to the ambient color temperature is determined, and then the color temperature compensation value is used to compensate the initial color temperature to obtain the target display color temperature. This scheme takes into account both the ambient color temperature and the image color attributes, and on the basis of the initial display color temperature which is consistent with the dimension of the target display color temperature, the target display color temperature is obtained by compensation, thereby improving the accuracy of determining the target display color temperature and thus improving the display effect of the electronic device displaying the target display color temperature.
[0080] In some embodiments, the pixel value of the pixel includes pixel values of multiple color channels; determining the color temperature compensation value for the electronic device to display the image based on the pixel values of the pixels in the image includes:
[0081] The color proportion of the preset color channel components is determined based on the pixel values of the pixels in different color channels of the image.
[0082] The color temperature compensation value is determined based on the color proportion of the preset color channel components and the preset second mapping relationship; wherein, the preset second mapping relationship includes the mapping between the color proportion and the color temperature compensation value.
[0083] In this embodiment of the 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 pixel values of the preset color channel in the total sum of pixel values of all color channels; or determining the proportion of the average pixel value of the preset color channel in the total sum of pixel average values of all color channels, etc.
[0084] The preset color channel can be a pre-defined color channel; alternatively, the preset color channel can 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 (below a preset warm color temperature threshold), the preset color channel can be a blue channel; if the ambient color temperature is cool (above a preset cool color temperature threshold), the preset color channel can be a red channel, etc. It is understood that the color proportion of the preset color channel components in the embodiments of this 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 components in the image, the color temperature compensation value is determined based on the color proportion of the preset color channel components and the preset second mapping relationship. The color temperature compensation value is then used to compensate for the initial display color temperature to obtain the target display color temperature. The preset second mapping relationship is obtained based on multiple experimental fittings and includes the mapping between the color proportion and the color temperature compensation value.
[0086] It is understood that, according to the color proportion of a preset color channel component that is highly correlated with the image color temperature, the embodiments of this disclosure determine the color temperature compensation value for the image color temperature, thereby using the color temperature compensation value to compensate for the initial display color temperature, which can improve the matching degree between the compensated target display color temperature and the image color temperature, and thus improve 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 based on the pixel values of pixels in different color channels of the image includes:
[0088] The average pixel value of each color channel is determined based on the pixel values of the pixels in the image in different color channels.
[0089] The average pixel value corresponding to each color channel is weighted according to the preset weighting coefficients corresponding to each color channel.
[0090] Determine the sum of the weighted pixel mean values for different color channels;
[0091] The ratio between the weighted average pixel value corresponding to the preset color channel and the sum value is determined as the color proportion.
[0092] In this embodiment of the disclosure, the electronic device determines the average pixel value of each color channel based on the pixel values of pixels in different color channels in the image; and uses a preset weighting coefficient to weight the average pixel value of each color channel to obtain the weighted average pixel value of each color channel.
[0093] After determining the weighted average pixel value of each color channel, the electronic device determines the color proportion of the preset color channel component by the ratio between the weighted average pixel value of the preset color channel and the sum of the weighted average pixel values of each color channel.
[0094] Taking the preset color channel as 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, This represents the average pixel value of the red channel. This represents the average pixel value of the green channel. This represents the pixel mean of the blue channel. The preset weighting coefficients for the red channel are 0.299, for the green channel 0.587, and for the blue channel 0.114. These values can be adjusted as needed.
[0097] It is understandable that, since the human eye has different perception abilities for different color components, this embodiment of the present disclosure, based on the human eye's ability to perceive color, uses preset weighting coefficients for different color channels to weight the pixel mean of each color channel, and determines the color proportion of the preset color channel component by the ratio between the weighted pixel mean of the preset color channel and the sum of the weighted pixel mean values of all color channels. Compared to determining the color proportion based solely on the pixel mean, this embodiment of the present disclosure, using the weighted pixel mean to determine the color proportion, 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; determining the target display color temperature based on the ambient color temperature and the color temperature compensation value includes:
[0099] Determine the 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 this embodiment of the disclosure, 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 performing calculations on 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 can be obtained by fitting multiple experiments under different ambient color temperatures.
[0102] When the ambient color temperature of an electronic device is less than a preset color temperature threshold and the color proportion is less than a 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 warm. In this scenario, the initial display color temperature is increased according to the color temperature compensation value, such as by adding a color temperature compensation value to the initial display color temperature or by adding a 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 and causes the image to be displayed too yellow.
[0103] It is understandable that when the ambient color temperature is lower than a preset color temperature threshold, indicating that the ambient color temperature of the current electronic device is in a warm environment, if the image to be displayed is also a warm color temperature, adjusting the display color temperature solely based on the ambient color temperature can easily lead to an overly warm image display. Conversely, if the image to be displayed is a cool color temperature, adjusting the display color temperature based on the ambient color temperature to a yellowish tint will have a smaller impact on the display effect of the cool color temperature image, and no compensation is needed. Therefore, in this embodiment, when the ambient color temperature is lower than a preset color temperature threshold and the color proportion is lower than a preset proportion threshold, the electronic device increases the initial display color temperature according to the color temperature compensation value to obtain the target display color temperature. This brings the white balance and white point of the display components back to a normal state, balancing the necessity of adjusting the display color temperature in this scenario with the power consumption of the electronic device when this scenario 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 the target display color temperature.
[0105] In this embodiment of the 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 a preset proportion threshold, it indicates that the ambient color temperature of the current environment of the electronic device is relatively cool and the image to be displayed is a warm or cool 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 based on the initial display color temperature, or reducing the weighting 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 causes the image to be displayed too bluish.
[0106] It is understandable that when the ambient color temperature is greater than a preset color temperature threshold, indicating that the ambient color temperature of the current environment in which the electronic device is located is relatively cool, if the image to be displayed is also a cool color temperature, adjusting the display color temperature solely based on the ambient color temperature can easily lead to an overly cold image display. Conversely, if the image to be displayed is a warm color temperature, adjusting the display color temperature based on the ambient color temperature to be too cool will have a smaller impact on the display effect of the warm color temperature image, and no compensation is needed. Therefore, in this embodiment, 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 electronic device reduces the initial display color temperature corresponding to the ambient color temperature according to the color temperature compensation value to obtain the target display color temperature. This balances the necessity of adjusting the display color temperature when the scenario is met, as well as the power consumption of the electronic device when the scenario 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 this embodiment, the preset second mapping relationship includes a mapping between the color temperature compensation value and the color proportion of the blue channel. 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. For example, when the ambient color temperature is less than the preset color temperature threshold, i.e., the ambient color temperature is warm, the corresponding initial display color temperature is lower (warmer). If the color proportion of the blue channel component is smaller, it indicates a warmer image color temperature, and the corresponding color temperature compensation value is larger. This increases the color temperature compensation value based on the initial display color temperature, preventing the target display color temperature from being too low and causing the displayed image to appear too yellow.
[0109] Figure 2 This is an example diagram illustrating a preset second mapping relationship according to an embodiment of the present disclosure. Figure 2 In the diagram, the horizontal axis (x-axis) represents the color percentage, 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 lines shown, the maximum color temperature compensation value of 150 and the minimum color temperature compensation value (close to 0) can be preset based on color temperature compensation requirements; the color proportion of 0.05 can be the color proportion of the blue channel component determined based on the white image, and the color proportion of 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 is y = 12077x. 2 Example of a trend zone line of -3020x+132.8.
[0112] The above formula (2) corresponds to the 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. Here, the color proportion of 0.05 corresponds to the preset proportion threshold. When the color proportion of the blue channel is greater than 0.05, no display color temperature compensation is required.
[0113] It is understandable that, since the color proportion is highly correlated with the color temperature of an image, the smaller the color proportion of the blue channel component, the warmer the color temperature of the image. Therefore, when the ambient color temperature is lower than the preset color temperature threshold, that is, when the ambient color temperature of the electronic device is in a warm environment, 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. This makes the target display color temperature of the warmer image greater than the target display color temperature of the cooler image, thereby improving the display effect of the image based on the target display color temperature.
[0114] In some embodiments, the method further includes:
[0115] Obtain the historical target display color temperature;
[0116] The process of displaying the image at the target display color temperature via the electronic device includes:
[0117] If the 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 this embodiment of the disclosure, the electronic device acquires the historical target display color temperature determined for the previous frame image and determines the difference between the target display color temperature determined for the 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. This scheme can reduce the visual discomfort caused by frequent adjustment of the display color temperature of the display components.
[0119] Figure 3 This is an example of a display method flow shown in an embodiment of the present disclosure. Figure 2 ,Depend on Figure 3 It can be seen that the process includes the following steps:
[0120] S601, Statistical pixel histogram;
[0121] In this embodiment of the disclosure, the pixel values of the pixels in the image to be displayed are statistically analyzed to obtain a pixel histogram. Based on the pixel histogram, the color proportion of a preset color channel component is determined, corresponding to the aforementioned determination of the color proportion of the preset color channel component based on the pixel values of the pixels in the image in different color channels. The pixel values of the pixels in the image can be the pixel values of some pixels or the pixel values of all pixels.
[0122] S602, Register the color component detection driver;
[0123] In this embodiment of the 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, Registration color component detection feedback;
[0125] In this embodiment of the disclosure, 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. Determine the color temperature compensation value;
[0127] In this embodiment of the disclosure, based on the color temperature compensation service, the color temperature compensation value of the electronic device display image corresponding to the color proportion of the preset color channel components is determined according to the preset second mapping relationship; wherein, the preset second mapping relationship includes the mapping between the color proportion and the color temperature compensation value.
[0128] S605, Obtain ambient color temperature;
[0129] In this embodiment of the disclosure, the ambient color temperature of the environment in which the electronic device is located is obtained by a color temperature sensor;
[0130] S606, Color temperature feedback for the registration environment;
[0131] In this embodiment of the disclosure, an ambient color temperature feedback is registered, and based on the registered ambient color temperature feedback, the ambient color temperature is transmitted to the color temperature compensation service.
[0132] S607. Determine the initial display color temperature;
[0133] In this embodiment of the disclosure, based on the color temperature compensation service, the 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 the mapping between the ambient color temperature and the display color temperature.
[0134] S608. Determine the target display color temperature;
[0135] In this embodiment of the 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. Obtain historical target display color temperature;
[0137] In this embodiment of the disclosure, the historical target display color temperature is obtained, such as obtaining the target display color temperature corresponding to the previous frame image;
[0138] S610. Determine whether the difference between the target display color temperature and the historical display color temperature is greater than a preset difference threshold; if yes, proceed to step S611; if no, do not adjust the display color temperature of the electronic device.
[0139] S611, triggers a timer to update the screen color temperature.
[0140] In this embodiment of the 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 the display component of the electronic device, thereby displaying the image at the target display color temperature through the display component.
[0141] Figure 4 This is a diagram illustrating a display device according to an embodiment of the present disclosure, consisting of... Figure 4 It can be seen that this includes:
[0142] The first acquisition module 701 is used to acquire the image to be displayed and the ambient color temperature of the environment in which the electronic device displaying the image is currently located;
[0143] The first determining module 702 is used to determine the color temperature compensation value for the electronic device to display the image based on the pixel values of the pixels in the image.
[0144] The second determining module 703 is used to determine the target display color temperature based on the ambient color temperature and the color temperature compensation value;
[0145] Display module 704 is used to display the image at the target display color temperature via the electronic device.
[0146] In some embodiments, the second determining 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 the ambient color temperature and the display color temperature; and to compensate the initial display color temperature using the color temperature compensation value to obtain the target display color temperature.
[0147] In some embodiments, the pixel value of the pixel includes pixel values of multiple color channels; the first determining module 702 is configured to determine the color proportion of a preset color channel component based on the pixel values of the pixel in the image in different color channels; and determine the color temperature compensation value based on 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 determining module 702 is configured to determine the average pixel value of each color channel based on the pixel values of pixels in different color channels in the image; weight the average pixel value of each color channel according to a preset weighting coefficient; determine the sum of the weighted average pixel values of different color channels; and determine the ratio between the weighted average pixel value of 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 determining 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 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.
[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 includes:
[0152] The second acquisition module 705 is used to acquire the historical target display color temperature;
[0153] The display module 704 is used to display the image at the target display color temperature via 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 apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0155] Figure 5 This is a block diagram illustrating an electronic device according to an embodiment of this disclosure. For example, the electronic device 800 may be a mobile phone, a mobile computer, etc.
[0156] Reference Figure 5The electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply 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] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0158] Memory 804 is configured to store various types of data to support the operation of electronic device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. 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 storage, flash memory, magnetic disk, or optical disk.
[0159] Power supply component 806 provides power to various components of electronic device 800. 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 electronic device 800.
[0160] 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 touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0161] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, 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 buttons, volume buttons, power buttons, and lock buttons.
[0163] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 can detect the on / off state of electronic device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0164] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as Wi-Fi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may 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 methods described above.
[0166] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of an electronic device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0167] A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the aforementioned display method.
[0168] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the foregoing claims.
[0169] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A display method, characterized in that, The method includes: Obtain the image to be displayed, and the ambient color temperature of the environment in which the electronic device displaying the image is currently located; Based on the pixel values of the pixels in the image, the color temperature compensation value for displaying the image by the electronic device is determined; The initial display color temperature is determined based on the ambient color temperature, and the target display color temperature is obtained by compensating the initial display color temperature using 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 step of determining the initial display color temperature based on the ambient color temperature and compensating the initial display color temperature using the color temperature compensation value to obtain the target display color temperature includes: The 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 the mapping between the ambient color temperature and the display color temperature; The initial display color temperature is compensated 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 includes pixel values of multiple color channels; determining the color temperature compensation value for the electronic device to display the image based on the pixel values of the pixels in the image includes: The color proportion of the preset color channel components is determined based on the pixel values of the pixels in different color channels of the image. The color temperature compensation value is determined based on the color proportion of the preset color channel components and the preset second mapping relationship; wherein, the preset second mapping relationship includes the 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 based on the pixel values of pixels in different color channels in the image includes: The average pixel value of each color channel is determined based on the pixel values of the pixels in the image in different color channels. The average pixel value corresponding to each color channel is weighted according to the preset weighting coefficients corresponding to each color channel. Determine the sum of the weighted pixel mean values for different color channels; The ratio between the weighted average pixel value 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; the step of determining the initial display color temperature based on the ambient color temperature, and compensating the initial display color temperature using the color temperature compensation value to obtain the target display color temperature, includes: 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.
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 includes: Obtain the historical target display color temperature; The process of displaying the image at the target display color temperature via the electronic device includes: If the 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 includes: The first acquisition module is used to acquire the image to be displayed, and the ambient color temperature of the environment in which the electronic device displaying the image is currently located; The first determining module is used to determine the color temperature compensation value for the electronic device to display the image based on the pixel values of the pixels in the image. The second determining module is used to determine the initial display color temperature based on the ambient color temperature, and to compensate the initial display color temperature using the color temperature compensation value to obtain the target display color temperature; A display module is used to display the image at the target display color temperature via the electronic device.
9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to perform the method as described 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 the processor of the electronic device, the electronic device is able to perform the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Display device and color correction method
CN107808641A
Display method of electronic equipment, medium and electronic equipment
CN115019746A