Detailed Description
The technical solutions of the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which are obtained by a person skilled in the art based on the embodiments of the present application, fall within the scope of protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type, and are not limited to the number of objects, such as the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The method and the device for adjusting the screen color provided by the embodiment of the application are described in detail through specific embodiments and application scenes thereof with reference to the accompanying drawings.
Referring to fig. 1, one of flowcharts of a screen color adjustment method according to an embodiment of the application is shown. The screen color adjustment method provided by the embodiment of the application can be applied to the production end of the screen of the electronic equipment.
The process of the screen color adjustment method provided by the embodiment of the application comprises the following steps:
step 101, acquiring the original color gamut information and white point information of a screen of the electronic device.
In this embodiment, the color gamut refers to a range of colors that can be expressed by a certain color pattern. The size of the color gamut is dependent on the device, the medium and the viewing conditions. The larger the gamut of the device, the more colors that can be reproduced.
The native color gamut refers to a color space set by a screen of an electronic device when shipped. Typically for display device default color appearance. In practice, the colors of the visible spectrum in nature constitute the largest color gamut space, which contains all the colors visible to the human eye, and can be represented by the CIELAB (International Commission on Illumination, international committee on illumination) color space. The native color gamut is a subset of the CIELAB color space.
The native color gamut information is information related to the native color gamut. The original color gamut information can be obtained after the production end detects the mode degree screen colors by using a color analyzer and the like. White point information refers to information related to white points in a color space. The white point information may be set by a technician at the production end. The white point is the white point.
In some alternative implementations of the present embodiment, the native color gamut information may include, but is not limited to, color coordinates of each vertex of the native color gamut and actual luminance values of each vertex of the native color gamut. The white point information may include, but is not limited to, the color coordinates of the white point, the luminance value of the white point. The original color gamut has three vertices, which respectively refer to maximum points that can be reached by three colors of red, green and blue in a color space corresponding to the original color gamut. These three vertices define the boundary of the native color gamut. The color coordinates are coordinates of colors, each corresponding to a point in the chromaticity diagram. The actual brightness value is the brightness value after the screen is produced and when the color adjustment is not performed.
Step 102, generating first information based on the primary color gamut information and the white point information, the first information being used to calibrate the colors in the primary color gamut.
In this embodiment, the target color of each target point in the original color gamut may be determined based on the original color gamut information and the white point information, and the first information may be generated based on the true color and the target color of each target point in the original color gamut. Wherein the target point in the native color gamut may be a partial point or a full point in the native color gamut. Each point in the original color domain corresponds to a color coordinate. The first information may include a mapping of the true color of each target point in the original color domain to the target color. This first information may be used to calibrate the colors in the native color gamut.
Before the color gamut conversion, the color in the original color gamut can be calibrated based on the first information, so that the color in the original color gamut is more accurate, the condition that partial colors cannot be displayed due to low saturation is avoided, the color display capability of the screen is fully utilized, and the color gamut conversion is performed on the basis, so that the screen achieves the optimal display effect.
In some alternative implementations of the present embodiment, the native color gamut information includes color coordinates of each vertex of the native color gamut, an actual luminance value, and an actual three-primary gray scale value, and the white point information includes color coordinates of the white point and a target luminance value of the white point. The color coordinates of each vertex of the native color gamut are the color coordinates of the red vertex (NativeRx, nativeRy), the color coordinates of the green vertex (NativeGx, nativeGy), and the color coordinates of the blue vertex (NativeBx, nativeBy), respectively. The actual luminance values of the vertices of the native color gamut are the luminance value NativeLR of the red vertex, the actual luminance value NativeLG of the green vertex, and the actual luminance value NativeLB of the blue vertex, respectively. The three primary colors include red, green and blue. The gray scale value refers to the brightness level from darkest to brightest in the image. The three primary color gray scale values comprise red gray scale values, green gray scale values and blue gray scale values. The actual three-primary-color gray scale value is the three-primary-color gray scale value after the screen is produced and when the color adjustment is not performed yet. The color coordinates of the white point may be noted (TargetWx, targetWy) and the target luminance value of the white point may be noted TargetLw. Step 102 may further comprise the sub-steps of:
in a substep 1021, the target luminance value and the color coordinates of each target point in the original color gamut are determined based on the color coordinates of each vertex of the original color gamut, the color coordinates of the white point, and the target luminance value of the white point.
Alternatively, the steps may be performed as follows:
First, a target luminance value for each vertex of the native color gamut is determined based on the color coordinates of the white point (TargetWx, targetWy) and the target luminance value of the white point TargetLw. The target luminance value of the red vertex, the target luminance value of the green vertex, and the target luminance value of the blue vertex may be sequentially noted as TargetLR, targetLG, targetLB. In practice, color matching equation calculations TargetLR, targetLG, targetLB may be employed.
Second, the target luminance value of each target point in the original color gamut and the target luminance value of the three primary colors of each target point are determined based on the target luminance value of each vertex of the original color gamut (i.e., targetLR, targetLG, targetLB). In practice, for a target point with actual three primary color gray scale values (Rn, gn, bn), the target luminance value Lc and the three primary color target luminance value (LRn, LGn, LBn) of the target point can be calculated based on Gamma (Gamma) correction. See below:
LRn=(Rn/255)2.2×TargetLR
LGn=(Gn/255)2.2×TargetLG
LBn=(Bn/255)2.2×TargetLB
Lc=LRn+LGn+LBn。
third, the tristimulus values of the target points in the original color gamut are determined based on the color coordinates of the vertices of the original color gamut (i.e., (NativeRx, nativeRy), (NativeGx, nativeGy), (NativeBx, nativeBy)), the target brightness values of the target points in the original color gamut, and the target brightness values of the three primary colors. In practice, for a target point whose actual three primary color gray scale value is (Rn, gn, bn), the target luminance value Lc and the three primary color target luminance value (LRn, LGn, LBn) are based. Rn, gn, bn are the gray scale value of red, the gray scale value of green, the gray scale value of blue in the color corresponding to the target point in turn. LRn, LGn, LBn are, in order, the luminance value of red, the luminance value of green, and the luminance value of blue in the color corresponding to the target point. Its tristimulus value [ Xc, yc, zc ] can be determined according to the following calculation formula:
Fourth, the color coordinates of each target point in the original color domain are determined based on the tristimulus values of each target point in the original color domain. In practice, for a target point with actual gray scale values (Rn, gn, bn) of three primary colors, the color coordinates (Cx, cy) thereof can be calculated by referring to the following formula:
In step 1022, the target trichromatic gray-scale value of each target point in the primary color gamut is determined based on the color coordinates of each vertex of the primary color gamut (i.e., (NativeRx, nativeRy), (NativeGx, nativeGy), (NativeBx, nativeBy)), the target brightness value and the color coordinates of each target point in the primary color gamut.
Alternatively, the steps may be performed as follows:
First, a target trichromatic ratio of each target point in the primary color gamut is determined based on the color coordinates of each target point in the primary color gamut and the color coordinates of each vertex of the primary color gamut (i.e., (NativeRx, nativeRy), (NativeGx, nativeGy), (NativeBx, nativeBy)). In practice, for a target point whose actual three primary color gray scale value is (Rn, gn, bn), its target three primary color ratio (r, g, b) can be determined according to the following calculation formula:
And a second step of determining the target trichromatic brightness value of each target point in the original color domain based on the target brightness value and the target trichromatic proportion of each target point in the original color domain. In practice, for a target point whose actual three primary color gray scale value is (Rn, gn, bn), its target three primary color luminance value (LRnr, LGnr, LBnr) can be calculated based on its target luminance value Lc and target three primary color ratio (r, g, b) by the following formula:
LRnr=Lc×r
LGnr=Lc×g
LBnr=Lc×b
And thirdly, determining target trichromatic gray scale values of all target points in the original color domain based on the target trichromatic brightness values of all target points in the original color domain. In practice, for a target point whose actual trichromatic gray-scale value is (Rn, gn, bn), its target trichromatic gray-scale value (Rnt, gnt, bnt) can be calculated by gamma correction based on its target trichromatic luminance value (LRnr, LGnr, LBnr), see specifically below:
Rnt=255×(LRnr/NativeLR)(1/2.2)
Gnt=255×(LGnr/NativeLG)(1/2.2)
Bnt=255×(LBnr/NativeLB)(1/2.2)
In a substep 1023, first information is generated based on the target trichromatic gray scale values and the actual trichromatic gray scale values for each target point in the primary color domain. In practice, for a target point whose actual three primary color gray level value is (Rn, gn, bn) whose target three primary color gray level value is (Rnt, gnt, bnt), a mapping of (Rn, gn, bn) and (Rnt, gnt, bnt) can be established. Based on the mapping, the three primary gray scale values of the target point can be adjusted from (Rn, gn, bn) to (Rnt, gnt, bnt). For other target points, the mapping of the target trichromatic gray scale value and the actual trichromatic gray scale value can be obtained in the same way, so that the generated mapping is summarized to obtain the first information.
By the method, the first information of the mapping relation between the target trichromatic gray scale values of the target points and the actual trichromatic gray scale values can be obtained. Therefore, before performing color gamut conversion, the terminal device can calibrate the colors in the original color gamut based on the first information, so that the colors in the original color gamut are more accurate, the situation that partial colors cannot be displayed due to low saturation is avoided, the color display capability of the screen is fully utilized, and the color gamut conversion is performed on the basis, so that the screen achieves the optimal display effect.
Step 103, the first information and the native color gamut information are sent to the electronic device, so that the electronic device generates second information based on the native color gamut information and target color gamut information set by a user, and adjusts the color of the screen based on the first information and the second information, wherein the second information is used for converting the color gamut of the screen from the native color gamut to the target color gamut.
In this embodiment, the target color gamut may be set by the user. The target color gamut may include, but is not limited to, a standard color gamut, a custom color gamut, and the like. The standard color gamut refers to the sum of colors that a technical system can produce. The color range which can be displayed by a technical system is defined, and the color range is an important index for measuring the color expression capability of the display equipment. The standard color gamut is present in order to ensure consistency and accuracy of colors between different devices so that colors can be reproduced correctly between different devices. The custom color gamut may be a color gamut custom by a user, also referred to as a personalized color gamut.
In this embodiment, the native color gamut information transmitted to the electronic device may include, but is not limited to, color coordinates of each vertex of the native color gamut, and the like. The target color gamut information may include, but is not limited to, color coordinates of each vertex of the target color gamut, coordinates and luminance values of the white point in the target color gamut, gray scale values of each target point in the target color gamut, and the like. The electronic device may perform the conversion of the native color gamut to the target color gamut using conventional color gamut conversion approaches.
In practical application, referring to fig. 2, the native color gamut information of the screen of the electronic device may be acquired first. Then, the white point information is set by a technician at the production end. Then, the target brightness value and the color coordinate of each target point in the original color gamut are determined based on the color coordinates of each vertex of the original color gamut, the color coordinates of the white point and the target brightness value of the white point, and then, the target trichromatic proportion of each target point in the original color gamut is determined based on the color coordinates of each target point in the original color gamut and the color coordinates of each vertex of the original color gamut. Then, the target trichromatic brightness value of each target point in the original color domain is determined based on the target brightness value and the target trichromatic proportion of each target point in the original color domain. Then, based on the target trichromatic brightness value of each target point in the original color domain, the target trichromatic gray-scale value of each target point in the original color domain is determined. And finally, generating first information based on the target trichromatic gray scale value and the actual trichromatic gray scale value of each target point in the original color domain. The first information may be a three-dimensional LUT file.
In some optional implementations of the present embodiments, after the first information and the native color gamut information are sent to the electronic device, the electronic device may be caused to perform the following second information generating step:
in a substep 1031, luminance values for each vertex of the target color gamut are determined based on the color coordinates of each vertex of the target color gamut, the coordinates of the white point in the target color gamut, and the luminance values.
Assuming that the target gamut red, green, blue set points are (TargetRx, targetRy) (TargetGx, targetGy) (TargetBx, targetBy), the coordinates of the white point in the target gamut are (TargetWx ', targetWy '), and the luminance value of the white point in the target gamut is TargetLw '. The brightness of the red, green, blue set points (TargetLR ', targetLG ', targetLB ') can be calculated according to the following formula:
In a sub-step 1032, the luminance value of each target point in the target color gamut and the luminance value of each vertex of the target color gamut are determined based on the gray scale value of each target point in the target color gamut and the luminance value of the three primary colors.
Wherein each point in the target color gamut corresponds to a color coordinate. The target point in the target color gamut may be part or all of the points in the target color gamut. The target points in the target color gamut may correspond one-to-one with the target points in the native color gamut, and both may have the same color coordinates. Assuming that the gray scale value of the three primary colors of a certain target point in the target color gamut is (Rt, gt, bt), the brightness value of the three primary colors of the target point and the brightness value of the target point can be calculated respectively according to a gamma correction mode. The luminance values of the three primary colors of the target point may be denoted as (LRt, LGt, LBt) and the luminance value of the target point may be denoted as Lct. Lct = LRt + LGt + LBt.
In step 1033, three primary color gray scale values of each target point in the target color gamut under the native color gamut are determined based on the color coordinates of each vertex of the native color gamut, the luminance value of each target point in the target color gamut, and the three primary color luminance values.
Here, assuming that the trichromatic gray scale value of a certain target point in the target color gamut is (Rt, gt, bt), the trichromatic luminance value of the target point may be denoted as (LRt, LGt, LBt), and the luminance value of the target point may be denoted as Lct. The three primary color ratio (r ', g ', b ') of the target point under the native color gamut can be calculated using the following formula:
Finally, the inverse of the gamma correction is performed (degamma), resulting in the three primary color ratios (Rt ', gt ', bt ') of the target point under the native color gamut.
In a substep 1034, second information is generated based on the three primary gray scale values of each target point in the target color gamut under the target color gamut and the three primary gray scale values under the native color gamut.
In practice, for a target point whose three primary color gray scale value in the target color gamut is (Rt, gt, bt), whose three primary color gray scale value under the native color gamut is (Rt ', gt', bt '), a mapping of (Rt, gt, bt) and (Rt', gt ', bt') can be established. Based on this mapping, the three primary color gray scale values of the corresponding points under the native color gamut can be adjusted from (Rt, gt, bt) to (Rt ', gt ', bt '). For other target points, the mapping of the three primary color gray scale values under the original color gamut and the three primary color gray scale values under the target color gamut can be obtained in the same manner, so that the generated mapping is summarized, and the second information is obtained.
It should be noted that, when the target point is a partial point in the target color gamut, interpolation algorithms such as tri-linear interpolation or tetrahedral interpolation may be combined to supplement mapping information of other points to obtain the second information.
In practical application, referring to fig. 3A, after the production end generates the first information for calibrating the colors in the native color gamut of the screen, it may be sent to the terminal side. After receiving the image to be displayed, the main control chip of the terminal side electronic device can determine the target color gamut of the original image and send the target color gamut information to the independent display chip. The single display chip may receive the original color gamut information, and may perform the above sub-steps 1031 to 1034 through the color gamut conversion module after receiving the target color gamut information sent by the main control chip, to obtain the second information. And then, the single display chip can adjust the color of the screen based on the first information and the second information, so that the display effect of the screen is improved. Wherein both the first information and the second information below may be a three-dimensional LUT (Look-Up-Table). The LUT is used to define a variation rule of RGB values, and a new picture effect is obtained by changing the RGB value of each pixel. In brief, the LUT is used to output one set of RGB values as another set of RGB values, thereby changing the exposure and color of the picture. Before the color gamut conversion, the color in the original color gamut can be calibrated based on the first information, so that the color in the original color gamut is more accurate, the condition that partial colors cannot be displayed due to low saturation is avoided, the color display capability of the screen is fully utilized, and the color gamut conversion is performed on the basis, so that the screen achieves the optimal display effect. In addition, color accuracy can also be maintained when the target color gamut is greater than the standard color gamut.
In some optional implementations of this embodiment, the second information generating step may further include, prior to performing the sub-step 1031 described above:
Sub-step 1035, determines a target display effect for the screen. The target display effect is the expected display effect and can be set by a user.
Optionally, the target display effect includes a first display effect that is consistent with ambient light, a second display effect that maintains the original image color.
In substep 1036, the target color gamut information is updated based on the target display effect and the three primary color ratios of the ambient light.
Here, since the three primary colors of different ambient lights have different proportions, the red, green and blue saturation of the screen can be respectively adjusted according to the three primary colors of the ambient lights, so that the display effect is prevented from being reduced due to the fact that all colors are adjusted to the maximum saturation.
Optionally, in the case that the target display effect is the first display effect, the color saturation of each vertex of the target color gamut may be adjusted such that the ratio of the color saturation of each vertex of the adjusted target color gamut is proportional to the ratio of the three primary colors of the ambient light. For example, if the proportion of red light in the current ambient light is small, the saturation of the red color of the screen may be reduced.
Alternatively, in the case where the target display effect is the second display effect, the color saturation of each vertex of the target color gamut may be adjusted such that the ratio of the color saturation of each vertex of the adjusted target color gamut is inversely proportional to the ratio of the three primary colors of the ambient light. For example, if the proportion of red light in the current ambient light is small, the saturation of the red color of the screen may be increased, and the result of the superposition of the screen light and the screen reflected ambient light may be kept unchanged.
In practical application, referring to fig. 3B, after the production end generates the first information for calibrating the colors in the native color gamut of the screen, it may be sent to the terminal side. After receiving the image to be displayed, the main control chip of the terminal side electronic device can determine the target color gamut of the original image and send the target color gamut information to the independent display chip. The single-display chip can receive the original color gamut information and also can receive the three primary color proportion of the ambient light acquired by the sensor. After receiving the target color gamut information sent by the main control chip, the single display chip sequentially executes the sub-steps 1035 to 1036 and the sub-steps 1031 to 1034 through the color gamut conversion module to obtain second information. And then, the single display chip can adjust the color of the screen based on the first information and the second information, so that the display effect of the screen is improved. Wherein both the first information and the second information below may be three-dimensional LUTs. Before the color gamut conversion, the color in the original color gamut can be calibrated based on the first information, so that the color in the original color gamut is more accurate, the condition that partial colors cannot be displayed due to low saturation is avoided, the color display capability of the screen is fully utilized, and the color gamut conversion is performed on the basis, so that the screen achieves the optimal display effect. In addition, through respectively adjusting the red, green and blue saturation of the screen according to the red, green and blue proportion of the ambient light, the phenomena of oversaturation, undersaturation and color cast can be improved, and therefore the color accuracy under the target color gamut is ensured.
The method provided by the embodiment of the application comprises the steps of firstly acquiring the original color gamut information and the white point information of the screen of the electronic device, then generating first information for calibrating colors in the original color gamut based on the original color gamut information and the white point information, and then sending the first information and the original color gamut information to the electronic device, so that the electronic device can generate second information for converting the original color gamut into the target color gamut based on the original color gamut information and target color gamut information set by a user, and the electronic device can conveniently adjust the colors of the screen based on the second information. Before the color gamut conversion, the color in the original color gamut can be calibrated based on the first information, so that the color in the original color gamut is more accurate, the condition that partial colors cannot be displayed due to low saturation is avoided, the color display capability of the screen is fully utilized, and the color gamut conversion is performed on the basis, so that the screen achieves the optimal display effect. In addition, color accuracy can also be maintained when the target color gamut is greater than the standard color gamut.
It should be noted that, in the method for adjusting a screen color according to the embodiment of the present application, the execution body may be a screen color adjusting device. In the embodiment of the present application, a method for executing a screen color adjustment by a screen color adjustment device is taken as an example, and the screen color adjustment device provided by the embodiment of the present application is described.
As shown in fig. 4, the screen color adjustment apparatus 400 of the present embodiment includes an acquisition unit 401 for acquiring native color gamut information and white point information of a screen of an electronic device, a first generation unit 402 for generating first information for calibrating colors in a native color gamut based on the native color gamut information and white point information, and a second generation unit 403 for transmitting the first information and the native color gamut information to the electronic device to cause the electronic device to generate second information based on the native color gamut information and target color gamut information set by a user, and adjust the color of the screen based on the first information and the second information, the second information being for converting the color gamut of the screen from the native color gamut to the target color gamut.
In some alternative implementations of this embodiment, the native color gamut information includes color coordinates of each vertex of a native color gamut and actual luminance values of each vertex of the native color gamut, the white point information includes color coordinates of a white point and target luminance values of the white point, the first generation unit 401 is further configured to determine the target luminance values and the color coordinates of each target point in the native color gamut based on the color coordinates of each vertex of the native color gamut, the color coordinates of the white point, and the target luminance values of the white point, determine the target trichromatic gray scale values of each target point in the native color gamut based on the color coordinates of each vertex of the native color gamut, the target luminance values and the color coordinates of each target point in the native color gamut, and generate the first information based on the target trichromatic gray scale values and the actual trichromatic gray scale values of each target point in the native color gamut. By the method, the first information of the mapping relation between the target trichromatic gray scale values of the target points and the actual trichromatic gray scale values can be obtained. Therefore, before performing color gamut conversion, the terminal device can calibrate the colors in the original color gamut based on the first information, so that the colors in the original color gamut are more accurate, the situation that partial colors cannot be displayed due to low saturation is avoided, the color display capability of the screen is fully utilized, and the color gamut conversion is performed on the basis, so that the screen achieves the optimal display effect.
In some optional implementations of this embodiment, the first generating unit 402 is further configured to determine a target luminance value of each vertex of the native color gamut based on the color coordinates of the white point and the target luminance value of the white point, determine a target luminance value of each target point in the native color gamut and a target luminance value of three primary colors of each target point based on the target luminance value of each vertex of the native color gamut, determine a tristimulus value of each target point in the native color gamut based on the color coordinates of each vertex of the native color gamut, the target luminance value of each target point in the native color gamut, and the target luminance value of three primary colors, and determine the color coordinates of each target point in the native color gamut based on the tristimulus value of each target point in the native color gamut.
In some optional implementations of this embodiment, the first generating unit 402 is further configured to determine a target trichromatic proportion of each target point in the original color gamut based on the color coordinates of each target point in the original color gamut and the color coordinates of each vertex of the original color gamut, determine a target trichromatic luminance value of each target point in the original color gamut based on the target luminance value and the target trichromatic proportion of each target point in the original color gamut, and determine a target trichromatic gray scale value of each target point in the original color gamut based on the target trichromatic luminance value of each target point in the original color gamut.
In some alternative implementations of the present embodiment, the native color gamut information includes color coordinates of vertices of a native color gamut, the second generating unit 403 is further configured to send the first information and the native color gamut information to the electronic device, to cause the electronic device to perform a second information generating step of determining a luminance value of each vertex of a target color gamut based on the color coordinates of each vertex of the target color gamut, coordinates and luminance values of white points in the target color gamut, determining a luminance value of each target point in the target color gamut and a three-primary luminance value based on the gray-scale value of each target point in the target color gamut and the luminance value of each vertex of the target color gamut, determining a three-primary gray-scale value of each target point in the target color gamut under the native color gamut based on the color coordinates of each vertex of the native color gamut, the luminance value of each target point in the target color gamut, and the three-primary gray-scale value under the native color gamut, and generating second information based on the three-primary gray-scale value of each target point in the target color gamut under the target color gamut and the three-primary gray-scale value under the native color gamut.
In some optional implementations of this embodiment, the second information generating step further includes determining a target display effect of the screen and updating the target color gamut information based on the target display effect and a three primary color ratio of ambient light. The saturation, the undersaturation and the color cast phenomenon can be improved by respectively adjusting the red, green and blue saturation of the screen according to the red, green and blue proportion of the ambient light, so that the color accuracy under the target color gamut is ensured.
In some optional implementations of this embodiment, the target display effect includes a first display effect consistent with ambient light and a second display effect that maintains an original image color, and the updating the target color gamut information based on the target display effect and the three primary color ratio of ambient light includes adjusting the color saturation of each vertex of the target color gamut such that the adjusted ratio of the color saturation of each vertex of the target color gamut is proportional to the three primary color ratio of ambient light when the target display effect is the first display effect, and adjusting the color saturation of each vertex of the target color gamut such that the adjusted ratio of the color saturation of each vertex of the target color gamut is inversely proportional to the three primary color ratio of ambient light when the target display effect is the second display effect. The saturation, the undersaturation and the color cast phenomenon can be improved by respectively adjusting the red, green and blue saturation of the screen according to the red, green and blue proportion of the ambient light, so that the color accuracy under the target color gamut is ensured.
The device provided by the embodiment of the application firstly acquires the original color gamut information and the white point information of the screen of the electronic device, then generates first information for calibrating colors in the original color gamut based on the original color gamut information and the white point information, and then sends the first information and the original color gamut information to the electronic device, so that the electronic device can generate second information for converting the original color gamut into the target color gamut based on the original color gamut information and the target color gamut information set by a user, and the electronic device can conveniently adjust the colors of the screen based on the second information. Before the color gamut conversion, the color in the original color gamut can be calibrated based on the first information, so that the color in the original color gamut is more accurate, the condition that partial colors cannot be displayed due to low saturation is avoided, the color display capability of the screen is fully utilized, and the color gamut conversion is performed on the basis, so that the screen achieves the optimal display effect.
The screen color adjusting device in the embodiment of the application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be other devices than a terminal. The electronic device may be a Mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a Mobile internet appliance (Mobile INTERNET DEVICE, MID), an augmented Reality (Augmented Reality, AR)/Virtual Reality (VR) device, a robot, a wearable device, an Ultra-Mobile Personal Computer (UMPC), a netbook or a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), or may be a server, a network attached storage (Network Attached Storage, NAS), a Personal computer (Personal Computer, PC), a Television (TV), a teller machine, a self-service machine, or the like, which is not particularly limited in the embodiments of the present application.
The screen color adjusting device in the embodiment of the application can be a device with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, and the embodiment of the present application is not limited specifically.
The screen color adjusting device provided by the embodiment of the present application can implement each process implemented by the method embodiment of fig. 1, and in order to avoid repetition, a detailed description is omitted here.
Optionally, as shown in fig. 5, the embodiment of the present application further provides an electronic device 500, including a processor 501 and a memory 502, where the memory 502 stores a program or an instruction that can be executed on the processor 501, and the program or the instruction implements each step of the above-mentioned embodiment of the screen color adjustment method when executed by the processor 501, and the steps achieve the same technical effect, so that repetition is avoided and no further description is given here.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 600 includes, but is not limited to, a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, and a processor 610.
Those skilled in the art will appreciate that the electronic device 600 may further include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 610 by a power management system to perform functions such as managing charge, discharge, and power consumption by the power management system. The electronic device structure shown in fig. 6 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
The method comprises the steps of acquiring native color gamut information and white point information of a screen of an electronic device, generating first information based on the native color gamut information and the white point information, wherein the first information is used for calibrating colors in a native color gamut, sending the first information and the native color gamut information to the electronic device, enabling the electronic device to generate second information based on the native color gamut information and target color gamut information set by a user, and adjusting the colors of the screen based on the first information and the second information, wherein the second information is used for converting the color gamut of the screen from the native color gamut to the target color gamut.
Before the color gamut conversion, the color in the original color gamut can be calibrated based on the first information, so that the color in the original color gamut is more accurate, the condition that partial colors cannot be displayed due to low saturation is avoided, the color display capability of the screen is fully utilized, and the color gamut conversion is performed on the basis, so that the screen achieves the optimal display effect.
Optionally, the native color gamut information comprises color coordinates of each vertex of a native color gamut and an actual luminance value of each vertex of the native color gamut, the white point information comprises color coordinates of a white point and a target luminance value of the white point, the processor 610 is further configured to determine a target luminance value and color coordinates of each target point in the native color gamut based on the color coordinates of each vertex of the native color gamut, the color coordinates of the white point and the target luminance value of the white point, determine a target trichromatic gray scale value of each target point in the native color gamut based on the color coordinates of each vertex of the native color gamut, the target luminance value and the color coordinates of each target point in the native color gamut, and generate first information based on the target trichromatic gray scale value and the actual trichromatic gray scale value of each target point in the native color gamut. By the method, the first information of the mapping relation between the target trichromatic gray scale values of the target points and the actual trichromatic gray scale values can be obtained. Therefore, before performing color gamut conversion, the terminal device can calibrate the colors in the original color gamut based on the first information, so that the colors in the original color gamut are more accurate, the situation that partial colors cannot be displayed due to low saturation is avoided, the color display capability of the screen is fully utilized, and the color gamut conversion is performed on the basis, so that the screen achieves the optimal display effect.
Optionally, the processor 610 is further configured to determine a target luminance value of each vertex of the native color gamut based on the color coordinates of the white point and the target luminance value of the white point, determine a target luminance value of each target point in the native color gamut and a three-primary color target luminance value of each target point based on the target luminance value of each vertex of the native color gamut, determine a tristimulus value of each target point in the native color gamut based on the color coordinates of each vertex of the native color gamut, the target luminance value of each target point in the native color gamut and the three-primary color target luminance value, and determine the color coordinates of each target point in the native color gamut based on the tristimulus values of each target point in the native color gamut.
Optionally, the processor 610 is further configured to determine a target trichromatic ratio of each target point in the original color gamut based on the color coordinates of each target point in the original color gamut and the color coordinates of each vertex of the original color gamut, determine a target trichromatic brightness value of each target point in the original color gamut based on the target brightness value and the target trichromatic ratio of each target point in the original color gamut, and determine a target trichromatic gray scale value of each target point in the original color gamut based on the target trichromatic brightness value of each target point in the original color gamut.
Optionally, the native color gamut information comprises color coordinates of each vertex of a native color gamut, the processor 610 is further configured to send the first information and the native color gamut information to the electronic device, to cause the electronic device to perform a second information generating step of determining luminance values of each vertex of a target color gamut based on the color coordinates of each vertex of the target color gamut, coordinates of a white point in the target color gamut, and luminance values, determining luminance values of each target point in the target color gamut and luminance values of each vertex of the target color gamut, determining three-primary gray-scale values of each target point in the target color gamut based on the color coordinates of each vertex of the native color gamut, the luminance values of each target point in the target color gamut, and the three-primary luminance values, and generating second information based on the three-primary gray-scale values of each target point in the target color gamut and the three-primary gray-scale values in the native color gamut.
Optionally, the second information generating step further comprises determining a target display effect of the screen and updating the target color gamut information based on the target display effect and the three primary color ratio of the ambient light. The saturation, the undersaturation and the color cast phenomenon can be improved by respectively adjusting the red, green and blue saturation of the screen according to the red, green and blue proportion of the ambient light, so that the color accuracy under the target color gamut is ensured.
The target display effect comprises a first display effect which is consistent with the ambient light and a second display effect which maintains the color of the original image, wherein updating of the target color gamut information based on the target display effect and the three primary color proportion of the ambient light comprises the steps of adjusting the color saturation of each vertex of the target color gamut when the target display effect is the first display effect so that the adjusted proportion of the color saturation of each vertex of the target color gamut is in direct proportion to the three primary color proportion of the ambient light, and adjusting the color saturation of each vertex of the target color gamut when the target display effect is the second display effect so that the adjusted proportion of the color saturation of each vertex of the target color gamut is in inverse proportion to the three primary color proportion of the ambient light. The saturation, the undersaturation and the color cast phenomenon can be improved by respectively adjusting the red, green and blue saturation of the screen according to the red, green and blue proportion of the ambient light, so that the color accuracy under the target color gamut is ensured.
It should be appreciated that in embodiments of the present application, the input unit 604 may include a graphics processor (Graphics Processing Unit, GPU) 6041 and a microphone 6042, with the graphics processor 6041 processing image data of still pictures or video obtained by an image capturing apparatus (e.g., a camera) in a video capturing mode or an image capturing mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 607 includes at least one of a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts of a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
The memory 609 may be used to store software programs as well as various data. The memory 609 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 609 may include volatile memory or nonvolatile memory, or the memory 609 may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM), static random access memory (STATIC RAM, SRAM), dynamic random access memory (DYNAMIC RAM, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate Synchronous dynamic random access memory (Double DATA RATE SDRAM, DDRSDRAM), enhanced Synchronous dynamic random access memory (ENHANCED SDRAM, ESDRAM), synchronous link dynamic random access memory (SYNCH LINK DRAM, SLDRAM), and Direct random access memory (DRRAM). Memory 609 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
The processor 610 may include one or more processing units, and optionally, the processor 610 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, etc., and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The embodiment of the application also provides a readable storage medium, on which a program or an instruction is stored, which when executed by a processor, implements each process of the above-mentioned embodiment of the screen color adjustment method, and can achieve the same technical effects, so that repetition is avoided, and no further description is given here.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes computer readable storage medium such as computer readable memory ROM, random access memory RAM, magnetic or optical disk, etc.
The embodiment of the application further provides a chip, which comprises a processor and a communication interface, wherein the communication interface is coupled with the processor, and the processor is used for running programs or instructions to realize the processes of the embodiment of the screen color adjustment method, and the same technical effects can be achieved, so that repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
Embodiments of the present application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the respective processes of the above-mentioned embodiments of the screen color adjustment method, and achieve the same technical effects, and are not described herein in detail for avoiding repetition.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.