Color enhancement method and device, equipment and storage medium

By detecting the lighting illuminance of the screen and building a color lookup table based on the native color gamut for color gamut mapping, the problem of reducing color display accuracy under strong light is solved, and high-precision color display under strong light conditions is achieved, improving user experience.

CN120235789APending Publication Date: 2025-07-01BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202311845761.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

The color enhancement algorithm in the prior art causes the color display accuracy to decrease under strong lighting conditions, resulting in blurred images and affecting user experience.

Method used

By detecting the ambient lighting of the screen, a first three-dimensional color lookup table based on the native color gamut is constructed, and the color gamut mapping is performed to enhance color display, and the color display accuracy is improved using a larger color gamut.

Benefits of technology

Maintain color display accuracy under strong lighting conditions, avoid image blurring, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120235789A_ABST
    Figure CN120235789A_ABST
Patent Text Reader

Abstract

The invention relates to a color enhancement method and device, equipment and a storage medium, and the method comprises the steps: responding to an original RGB value of a to-be-displayed image of a screen, and detecting the illuminance of the current environment of the screen; a first three-dimensional color lookup table is obtained in response to the situation that the illuminance meets a preset condition, and the first three-dimensional color lookup table is constructed based on an original color gamut of the screen; and performing gamut mapping on the original RGB value based on the first three-dimensional color lookup table to obtain a target RGB value of the to-be-displayed image, the target RGB value being used for the screen to display the to-be-displayed image. According to the invention, the display color of the screen can be enhanced by using a larger color gamut when the illuminance meets the preset condition, the color display precision of the to-be-displayed image can be maintained, the image blurring is avoided, and the user experience can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technologies, and in particular, to a color enhancement method, apparatus, device, and storage medium. Background Art

[0002] When a user uses an electronic device such as a mobile phone under strong sunlight, the colors perceived on the screen will become lighter. For example, when the screen displays a pure red image under strong sunlight, the human eye can only see a relatively light red. To address this problem, color enhancement algorithms can be used in related technologies to enhance the colors displayed on the screen.

[0003] Currently, the display color gamut of mobile phone screens is usually the standard P3 color gamut. However, the inventors found during the implementation of the present disclosure that the color enhancement algorithms in related technologies can enhance multiple colors with different shades (saturations) into the same color, resulting in a decrease in the display accuracy of colors, and further leading to image blurring and affecting the user experience. Summary of the Invention

[0004] To overcome the problems existing in related technologies, embodiments of the present disclosure provide a color enhancement method, apparatus, device, and storage medium to solve the defects in related technologies.

[0005] According to a first aspect of an embodiment of the present disclosure, a color enhancement method is provided, the method including:

[0006] In response to obtaining the original RGB values of the image to be displayed on the screen, detecting the illuminance of the environment where the screen is currently located;

[0007] In response to the illuminance satisfying a preset condition, obtaining a first three-dimensional color lookup table, the first three-dimensional color lookup table being constructed based on the native color gamut of the screen;

[0008] Performing color gamut mapping on the original RGB values based on the first three-dimensional color lookup table to obtain the target RGB values of the image to be displayed, the target RGB values being used for the screen to display the image to be displayed.

[0009] In some embodiments, the first three-dimensional color lookup table is constructed by adjusting the color coordinates corresponding to the expected RGB values of each color in a second three-dimensional color lookup table in the LCH color space under the native color gamut, the second three-dimensional color lookup table being a three-dimensional color lookup table used for color correction of the screen when the illuminance of the environment where the screen is located does not satisfy the preset condition.

[0010] In some embodiments, the second three-dimensional color lookup table includes mapping relationships between the desired RGB values and the original RGB values of multiple colors, and the method further includes constructing the first three-dimensional color lookup table based on the following:

[0011] In response to obtaining the second three-dimensional color lookup table, convert the desired RGB value of each color in the multiple colors to the LCH color space to obtain the original LCH color coordinates of each color;

[0012] Keep the original lightness component L and the original hue component H in the original LCH color coordinates unchanged, and by gradually increasing the original chroma component C in the original LCH color coordinates, obtain the target chroma component C that each color can reach within the native color gamut;

[0013] Convert the target LCH color coordinates composed of the target chroma component C, the original lightness component L, and the original hue component H back to the RGB color space to obtain the adjusted desired RGB value of each color;

[0014] Construct a mapping relationship between the adjusted desired RGB value of each color and the original RGB value to obtain the first three-dimensional color lookup table.

[0015] In some embodiments, the step of obtaining the target chroma component C that each color can reach within the native color gamut by gradually increasing the original chroma component C in the original LCH color coordinates includes:

[0016] Increase the chroma component C in the LCH color coordinates of each color based on a set step size to obtain the current chroma component C corresponding to each color;

[0017] Based on a preset conversion matrix, convert the current LCH color coordinates composed of the current chroma component C, the original lightness component L, and the original hue component H back to the RGB color space to obtain the current RGB value of each color. The preset conversion matrix includes a conversion matrix calculated from the color coordinates of the native color gamut;

[0018] In response to any one of the color component values in the current RGB value exceeding a set color component threshold, determine the target chroma component C based on the current chroma component C.

[0019] In some embodiments, the step of determining the target chroma component C based on the current chroma component C includes:

[0020] Determine the current color enhancement ratio corresponding to each color based on the current chroma component C and the original chroma component C;

[0021] Adjust the current color enhancement ratio based on the adjustment coefficient corresponding to the preset chromaticity range to which the original chromaticity component C belongs, and obtain the target color enhancement ratio;

[0022] Determine the target chromaticity component C based on the target color enhancement ratio and the original chromaticity component C.

[0023] In some embodiments, the method further includes:

[0024] In response to none of the numerical values of the color components in the current RGB value exceeding the set color component threshold, increase the current chromaticity component C again based on the set step size until, in the current RGB value obtained by converting the current LCH color coordinates composed of the current chromaticity component C, the original lightness component L, and the original hue component H back to the RGB color space, there is a numerical value of any one color component exceeding the set color component threshold.

[0025] In some embodiments, the method further includes:

[0026] In response to the illuminance not satisfying the preset condition, perform gamut mapping on the original RGB value based on the second three-dimensional color lookup table to obtain the target RGB value of the image to be displayed.

[0027] According to a second aspect of the embodiments of the present disclosure, there is provided a color enhancement device, the device includes:

[0028] An illuminance detection module, configured to detect the illuminance of the environment where the screen is currently located in response to obtaining the original RGB value of the image to be displayed on the screen;

[0029] A first table acquisition module, configured to acquire a first three-dimensional color lookup table in response to the illuminance satisfying the preset condition, where the first three-dimensional color lookup table is constructed based on the native gamut of the screen;

[0030] A first target determination module, configured to perform gamut mapping on the original RGB value based on the first three-dimensional color lookup table to obtain the target RGB value of the image to be displayed, where the target RGB value is used for the screen to display the image to be displayed.

[0031] In some embodiments, the first three-dimensional color lookup table is constructed by adjusting the color coordinates in the LCH color space corresponding to the desired RGB values of each color in the second three-dimensional color lookup table under the native gamut, and the second three-dimensional color lookup table is a three-dimensional color lookup table used for color correction of the screen when the illuminance of the environment where the screen is located does not satisfy the preset condition.

[0032] In some embodiments, the second three-dimensional color lookup table includes a mapping relationship between the desired RGB values and the original RGB values of multiple colors, and the apparatus further includes a first table construction module;

[0033] The first table construction module includes:

[0034] A first conversion unit, configured to, in response to obtaining the second three-dimensional color lookup table, convert the desired RGB value of each color among the multiple colors to the LCH color space to obtain the original LCH color coordinates of each color;

[0035] A chroma increasing unit, configured to keep the original lightness component L and the original hue component H in the original LCH color coordinates unchanged, and obtain the target chroma component C that each color can reach within the native color gamut by gradually increasing the original chroma component C in the original LCH color coordinates;

[0036] A second conversion unit, configured to convert the target LCH color coordinates composed of the target chroma component C, the original lightness component L, and the original hue component H back to the RGB color space to obtain the adjusted desired RGB value of each color;

[0037] A table construction unit, configured to construct a mapping relationship between the adjusted desired RGB value of each color and the original RGB value to obtain the first three-dimensional color lookup table.

[0038] In some embodiments, the chroma increasing unit is further configured to:

[0039] Increase the chroma component C in the LCH color coordinates of each color based on a set step size to obtain the current chroma component C corresponding to each color;

[0040] Based on a preset conversion matrix, convert the current LCH color coordinates composed of the current chroma component C, the original lightness component L, and the original hue component H back to the RGB color space to obtain the current RGB value of each color, where the preset conversion matrix includes a conversion matrix calculated from the color coordinates of the native color gamut;

[0041] In response to any one of the color component values in the current RGB value exceeding a set color component threshold, determine the target chroma component C based on the current chroma component C.

[0042] In some embodiments, the chroma increasing unit is further configured to:

[0043] Determine the current color enhancement ratio corresponding to each color based on the current chroma component C and the original chroma component C;

[0044] Adjust the current color enhancement ratio based on the adjustment coefficient corresponding to the preset chromaticity range to which the original chromaticity component C belongs, and obtain a target color enhancement ratio;

[0045] Determine the target chromaticity component C based on the target color enhancement ratio and the original chromaticity component C.

[0046] In some embodiments, the chromaticity increasing unit is further configured to:

[0047] In response to none of the numerical values of the color components in the current RGB value exceeding the set color component threshold, increase the current chromaticity component C again based on the set step size until, in the current RGB value obtained by converting the current LCH color coordinate composed of the current chromaticity component C, the original lightness component L, and the original hue component H back to the RGB color space, there is a numerical value of any one color component exceeding the set color component threshold.

[0048] In some embodiments, the device further includes:

[0049] A second target determination module, configured to, in response to the illuminance not satisfying the preset condition, perform gamut mapping on the original RGB value based on the second three-dimensional color lookup table to obtain the target RGB value of the to-be-displayed image.

[0050] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, the device including:

[0051] A processor and a memory for storing a computer program;

[0052] Wherein, the processor is configured to, when executing the computer program, implement:

[0053] In response to obtaining the original RGB value of the to-be-displayed image of the screen, detect the illuminance of the environment where the screen is currently located;

[0054] In response to the illuminance satisfying the preset condition, obtain a first three-dimensional color lookup table, where the first three-dimensional color lookup table is constructed based on the native gamut of the screen;

[0055] Perform gamut mapping on the original RGB value based on the first three-dimensional color lookup table to obtain the target RGB value of the to-be-displayed image, where the target RGB value is used for the screen to display the to-be-displayed image.

[0056] According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements:

[0057] In response to obtaining the original RGB values of the image to be displayed on the screen, detect the illuminance of the environment where the screen is currently located;

[0058] In response to the illuminance meeting a preset condition, obtain a first three-dimensional color lookup table, where the first three-dimensional color lookup table is constructed based on the native color gamut of the screen;

[0059] Perform color gamut mapping on the original RGB values based on the first three-dimensional color lookup table to obtain the target RGB values of the image to be displayed, where the target RGB values are used for the screen to display the image to be displayed.

[0060] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:

[0061] In the present disclosure, in response to obtaining the original RGB values of the image to be displayed on the screen, the illuminance of the environment where the screen is currently located is detected, and in response to the illuminance meeting the preset condition, a first three-dimensional color lookup table is obtained, where the first three-dimensional color lookup table is constructed based on the native color gamut of the screen, and then color gamut mapping is performed on the original RGB values based on the first three-dimensional color lookup table to obtain the target RGB values of the image to be displayed. Since the first three-dimensional color lookup table used is constructed based on the native color gamut of the screen, and the native color gamut of the screen is generally larger than the display color gamut of the screen, it is possible to enhance the screen display color using a larger color gamut when the illuminance meets the preset condition, which is beneficial to maintaining the color display accuracy of the image to be displayed, avoiding image blurring, and thus improving the user experience.

[0062] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] The drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure.

[0064] Figure 1A is a schematic diagram of the effect of a color enhancement algorithm in related art;

[0065] Figure 1B is a flowchart of a color enhancement method shown according to an exemplary embodiment of the present disclosure;

[0066] Figure 2 is a flowchart of how to construct the first three-dimensional color lookup table shown according to an exemplary embodiment of the present disclosure;

[0067] Figure 3It is a flowchart showing how to obtain the target chromaticity component C that each color can achieve within the native color gamut according to an exemplary embodiment of the present disclosure;

[0068] Figure 4 It is a flowchart showing how to determine the target chromaticity component C based on the current chromaticity component C according to another exemplary embodiment of the present disclosure;

[0069] Figure 5 It is a block diagram of a color enhancement device shown according to an exemplary embodiment of the present disclosure;

[0070] Figure 6 It is a block diagram of another color enhancement device shown according to an exemplary embodiment of the present disclosure;

[0071] Figure 7 It is a block diagram of an electronic device shown according to an exemplary embodiment of the present disclosure. Detailed implementation manners

[0072] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0073] When a user uses an electronic device such as a mobile phone under strong sunlight, the colors perceived on the screen will become lighter. For example, when the screen displays a pure red image under strong sunlight, the human eye can only see a relatively light red. To address this problem, color enhancement algorithms can be used in the related art to enhance the colors displayed on the screen.

[0074] Currently, the display color gamut of mobile phone screens is usually the standard P3 color gamut. However, the inventors found during the implementation of the present disclosure that the color enhancement algorithms in the related art can cause multiple colors with different shades (saturations) to be enhanced to the same color, resulting in a reduction in the display accuracy of colors and further causing image blurring.

[0075] For example, Figure 1A It is a schematic diagram showing the effect of a color enhancement algorithm in the related art. As Figure 1A shown, assuming that the original color accuracy is from 0.1 to 1.0 in a total of ten levels (as Figure 1Aas shown by each red box in the upper row above). Among them, 0.1 to 1 respectively represent red colors with different shades (saturations). Applying the algorithm in the related technology, each color is enhanced by two orders. For example, 0.1 is enhanced to 0.3, 0.2 is enhanced to 0.4, and so on. Then, the colors represented by 0.8 and 0.9 are both enhanced to color 1.0. At this time, the color accuracy only has seven-order color representation, which results in a reduction in the display accuracy of the color and blurring of the image.

[0076] In view of this, the present disclosure provides the following color enhancement method, device, equipment and storage medium to solve the above-mentioned drawbacks in the related technology.

[0077] Figure 1B is a flowchart of a color enhancement method shown according to an exemplary embodiment; the method of this embodiment can be executed by a color enhancement device, and the color enhancement device can be configured in an electronic device, such as a server, a workstation, a personal computer, a mobile terminal (such as a mobile phone, a tablet computer, etc.), a wearable device (such as glasses, a watch, etc.), etc. As Figure 1B shown, the method includes the following steps S101 - S103:

[0078] In step S101, in response to obtaining the original RGB values of the image to be displayed on the screen, the illuminance of the environment where the screen is currently located is detected.

[0079] In this embodiment, the electronic device can, in response to obtaining the original RGB values of the image to be displayed on the screen, detect the illuminance of the environment where the screen is currently located.

[0080] For example, multiple images can be pre-stored in the electronic device, and the image to be displayed can be determined from the multiple images according to the selection operation for triggering, and the original RGB values of the image to be displayed can be obtained. Furthermore, when the original RGB values of the image to be displayed on the screen are obtained, the illuminance of the environment where the screen is currently located can be detected. Exemplarily, the electronic device can detect the illuminance of the environment where the screen is currently located based on a built-in light sensor.

[0081] In step S102, in response to the illuminance satisfying a preset condition, a first three-dimensional color lookup table is obtained.

[0082] In this embodiment, after detecting the illuminance of the environment where the screen is currently located, the electronic device can detect whether the illuminance satisfies a preset condition, and then can obtain a first three-dimensional color lookup table when the illuminance satisfies the preset condition. Among them, the first three-dimensional color lookup table is constructed based on the native color gamut of the screen.

[0083] For example, the above illuminance satisfying the preset condition may include that the illuminance is greater than or equal to a preset illuminance threshold (such as 5000 Lux), and this embodiment does not limit this. That is to say, the preset condition may be a condition for determining whether the environment where the screen is located is a strong light irradiation environment. When the illuminance is greater than or equal to the preset illuminance threshold, it can be considered that the illuminance satisfies the preset condition, that is, the environment where the screen is located is a strong light irradiation environment (in this environment, the color perceived by the human eye on the screen will fade), and then the above first three-dimensional color lookup table is obtained.

[0084] In step S103, perform gamut mapping on the original RGB value based on the first three-dimensional color lookup table to obtain the target RGB value of the to-be-displayed image, and the target RGB value is used for the screen to display the to-be-displayed image.

[0085] In this embodiment, after obtaining the first three-dimensional color lookup table, the original RGB value can be subjected to gamut mapping based on the first three-dimensional color lookup table to obtain the target RGB value of the to-be-displayed image. Among them, the target RGB value is used for the screen to display the to-be-displayed image. That is to say, the electronic device can display the to-be-displayed image according to the above target RGB value. Compared with the original RGB value, the target RGB value can achieve a color enhancement display effect.

[0086] It is worth noting that the display gamut of a mobile phone screen is usually the standard P3 gamut, and the native gamut (hardware gamut or native gamut) of the screen is larger than the standard P3 gamut. Therefore, when performing color enhancement, using the first three-dimensional color lookup table constructed with a larger gamut (that is, the native gamut of the screen) for color enhancement is beneficial to maintaining color display accuracy and can improve the display effect of the screen.

[0087] From the above description, it can be seen that the method of this embodiment responds to obtaining the original RGB value of the to-be-displayed image of the screen, detects the illuminance of the environment where the screen is currently located, and responds to the illuminance satisfying the preset condition to obtain the first three-dimensional color lookup table, which is constructed based on the native gamut of the screen. Then, perform gamut mapping on the original RGB value based on the first three-dimensional color lookup table to obtain the target RGB value of the to-be-displayed image. Since the first three-dimensional color lookup table used is constructed based on the native gamut of the screen, and the native gamut of the screen is usually larger than the display gamut of the screen, it is possible to use a larger gamut to enhance the screen display color when the illuminance satisfies the preset condition, which is beneficial to maintaining the color display accuracy of the to-be-displayed image, avoiding image blurring, and thus can improve the user experience.

[0088] In some embodiments, the above-mentioned first three-dimensional color lookup table can be constructed by adjusting the color coordinates corresponding to the desired RGB values of each color in the second three-dimensional color lookup table in the native color gamut in the LCH color space. Among them, the second three-dimensional color lookup table can be a three-dimensional color lookup table used for color correction of the screen when the illuminance of the environment where the screen is located does not meet the preset condition (the illuminance is less than 5000 lux, that is, the screen environment is a non-strong light irradiation environment), such as the 3DLUT displayed in the original standard P3 color gamut in the related art, and this embodiment does not limit this.

[0089] In some other embodiments, the electronic device can, in response to the illuminance not meeting the preset condition, perform gamut mapping on the original RGB values based on the second three-dimensional color lookup table to obtain the target RGB values of the image to be displayed. That is to say, in the related art, the above-mentioned second three-dimensional color lookup table is used for gamut mapping regardless of whether it is in a strong light irradiation environment or a non-strong light irradiation environment. In this solution, the first three-dimensional color lookup table is used for gamut mapping in a strong light irradiation environment, and the second three-dimensional color lookup table is used for gamut mapping in a non-strong light irradiation environment.

[0090] Figure 2 It is a flowchart showing how to construct the first three-dimensional color lookup table according to an exemplary embodiment of the present disclosure. In this embodiment, on the basis of the above-mentioned embodiment, an example of how to construct the first three-dimensional color lookup table is used for exemplary illustration.

[0091] In this embodiment, the second three-dimensional color lookup table includes the mapping relationship between the desired RGB values and the original RGB values of multiple colors, that is, the second three-dimensional color lookup table is used to perform gamut mapping on the original RGB value of a certain color to obtain the desired RGB value of the color (this value can also be understood as the RGB value used to display the color).

[0092] On this basis, as Figure 2 shown, the color enhancement method of this embodiment may further include constructing the first three-dimensional color lookup table based on the following steps S201-S204:

[0093] In step S201, in response to obtaining the second three-dimensional color lookup table, the desired RGB value of each color among the multiple colors is converted to the LCH color space to obtain the original LCH color coordinates of each color.

[0094] In this embodiment, when constructing the first three-dimensional color lookup table, the second three-dimensional color lookup table can be obtained first, and then in response to obtaining the second three-dimensional color lookup table, the desired RGB value of each color among the multiple colors is converted to the LCH color space to obtain the original LCH color coordinates of each color.

[0095] For example, assume that the second three-dimensional color lookup table is a 3DLUT file for standard P3 color gamut display. When constructing the above first three-dimensional color lookup table, the desired RGB value of each color in the 3DLUT for standard P3 color gamut display can be converted to the LCH color space to obtain the original LCH color coordinates of each color.

[0096] In some embodiments, after obtaining the above-mentioned desired RGB values, they can be subjected to matrix conversions of RGB2XYZ, XYZ2LAB, and LAB2LCH, that is, first converted to the XYZ color space based on the RGB2XYZ matrix, then converted to the LAB color space based on the XYZ2LAB matrix, and further converted to the LCH color space based on the LAB2LCH matrix to obtain the original LCH color coordinates of each color.

[0097] For example, assume that the desired RGB values of a certain color are (R, G, B), then the original LCH color coordinates of this color, that is, (L, C, H), can be obtained based on the following formula (2-1):

[0098] (L, C, H) = (R, G, B) * RGB2XYZ * XYZ2LAB * LAB2LCH; (2-1)

[0099] It should be noted that since the above 3DLUT for standard P3 color gamut display converts the screen display to the standard P3 color gamut display, the RGB2XYZ matrix used in this embodiment can be a conversion matrix determined based on the color coordinates of the standard P3 color gamut. Exemplarily, this RGB2XYZ matrix can be shown as the following formula (2-2):

[0100]

[0101] In step S202, the original lightness component L and the original hue component H in the original LCH color coordinates are kept unchanged, and by gradually increasing the original chroma component C in the original LCH color coordinates, the target chroma component C that each color can reach within the native color gamut is obtained.

[0102] In this embodiment, after obtaining the original LCH color coordinates of each color, the original lightness component L and the original hue component H in the original LCH color coordinates can be kept unchanged, and by gradually increasing the original chroma component C in the original LCH color coordinates, the target chroma component C that each color can reach within the native color gamut is obtained.

[0103] For example, after increasing the chroma component C each time, it can be determined whether the increased C component meets the set requirements (for example, whether it reaches the maximum chroma component C that can be achieved within the native color gamut, etc.). Furthermore, when it is determined that the increased C component meets the set requirements, it can be determined as the target chroma component C.

[0104] In some other embodiments, the above-mentioned method for obtaining the target chroma component C that each color can achieve within the native color gamut can also refer to the following Figure 3 illustrated embodiments, which will not be elaborated here first.

[0105] In step S203, the target LCH color coordinates composed of the target chroma component C, the original lightness component L, and the original hue component H are converted back to the RGB color space to obtain the adjusted expected RGB value of each color.

[0106] In this embodiment, after obtaining the target chroma component C that each color can achieve within the native color gamut, the target LCH color coordinates composed of the target chroma component C, the original lightness component L, and the original hue component H can be converted back to the RGB color space to obtain the adjusted expected RGB value of each color.

[0107] For example, after obtaining the target chroma component C (hereinafter denoted as C 目 ) that each color can achieve within the native color gamut, the target LCH can be composed based on C 目 , the original lightness component L, and the original hue component H, that is, as shown in the following formula (2-3):

[0108] Target LCH = (L, C 目 , H); (2-3)

[0109] On this basis, the target LCH can be subjected to matrix conversions of LCH2LAB, LAB2XYZ, and XYZ2RGB, that is, first converted to the LAB color space based on the LCH2LAB matrix, then converted to the XYZ color space based on the LAB2XYZ matrix, and converted to the RGB color space based on the XYZ2RGB matrix. Furthermore, the obtained RGB value is then converted to the non-linear space (0-255) to obtain the adjusted expected RGB value of each color.

[0110] For example, assuming that the target LCH of a certain color is (L, C 目 , H), then the adjusted expected RGB value of this color, that is, (R 目 , G 目 , B 目 ) can be obtained based on the following formulas (2-4) to (2-5):

[0111] (R 线 , G 线 , B 线 ) = (L, C 目 , H) * LCH2LAB * LAB2XYZ * XYZ2RGB; (2 - 4)

[0112]

[0113] Wherein, (R 线 , G 线 , B 线 ) is the RGB value in the linear space obtained by converting the target LCH through a matrix. 4095 is the maximum value in the 12 - bit LUT. That is to say, the original 3D LUT is in a 12 - bit linear space, and through (2 - 5), it can be converted into the non - linear space of RGB, where 4095 is used for normalization.

[0114] It should be noted that the above values such as 12 - bit and 4095 are only for illustrative purposes and can be modified based on actual needs during application. This embodiment does not limit this.

[0115] In this embodiment, in order to achieve color enhancement (i.e., increase the saturation of colors) in a larger color gamut (i.e., a screen - native color gamut larger than the standard P3 color gamut), the above XYZ2RGB matrix can be determined based on the color coordinates of the screen - native color gamut. Furthermore, it is possible to increase the color saturation in a larger color gamut while retaining the original color accuracy (order). Exemplarily, the above XYZ2RGB matrix can be shown as the following formula (2 - 6):

[0116]

[0117] In step S204, a mapping relationship between the adjusted expected RGB value of each color and the original RGB value is constructed to obtain the first three - dimensional color lookup table.

[0118] In this embodiment, after obtaining the adjusted expected RGB value of each color, a mapping relationship between the adjusted expected RGB value of each color and the original RGB value can be constructed. In this way, the above - mentioned first three - dimensional color lookup table can be obtained. That is, the first three - dimensional color lookup table can be used to perform color gamut mapping on the original RGB value of a certain color to obtain the adjusted expected RGB value of this color (this value can be understood as the RGB value used to display this color, that is, the target RGB value of this color).

[0119] As can be seen from the above description, in this embodiment, in response to obtaining the second three-dimensional color lookup table, the expected RGB value of each color among the multiple colors is converted to the LCH color space to obtain the original LCH color coordinates of each color, and the original lightness component L and the original hue component H in the original LCH color coordinates are maintained unchanged. By gradually increasing the original chroma component C in the original LCH color coordinates, the target chroma component C that each color can reach within the native color gamut is obtained. Then, the target LCH color coordinates composed of the target chroma component C, the original lightness component L, and the original hue component H are converted back to the RGB color space to obtain the adjusted expected RGB value of each color. Furthermore, a mapping relationship between the adjusted expected RGB value and the original RGB value of each color is constructed to obtain the first three-dimensional color lookup table. It is possible to construct the first three-dimensional color lookup table by adjusting the color coordinates corresponding to the expected RGB values of each color in the second three-dimensional color lookup table in the LCH color space under the native color gamut. Furthermore, subsequent gamut mapping can be performed on the original RGB values based on the first three-dimensional color lookup table to obtain the target RGB values of the to-be-displayed image. Since the first three-dimensional color lookup table is constructed based on the native color gamut of the screen, and the native color gamut of the screen is usually larger than the display color gamut of the screen, it is possible to enhance the screen display color with a larger color gamut when the illuminance meets the preset conditions, which is beneficial to maintaining the color display accuracy of the to-be-displayed image, avoiding image blurring, and further improving the user experience.

[0120] Figure 3 It is a flowchart showing how to obtain the target chroma component C that each color can reach within the native color gamut according to an exemplary embodiment of the present disclosure; this embodiment takes how to obtain the target chroma component C that each color can reach within the native color gamut as an example for exemplary illustration on the basis of the above embodiment.

[0121] As Figure 3 shown, the obtaining of the target chroma component C that each color can reach within the native color gamut described in step S202 above may include the following steps S301 - S304:

[0122] In step S301, the chroma component C in the LCH color coordinates of each color is increased based on a set step size to obtain the current chroma component C corresponding to each color.

[0123] In this embodiment, after obtaining the original LCH color coordinates of each color, the chroma component C in the LCH color coordinates of each color can be increased based on a set step size to obtain the current chroma component C corresponding to each color (for the sake of distinction, hereinafter denoted as C x ).

[0124] Among them, the set step size can be set according to actual needs, such as set to 5% of the original chroma component C, etc., which is not limited in this embodiment.

[0125] In step S302, based on a preset conversion matrix, the current LCH color coordinates composed of the current chroma component C, the original lightness component L, and the original hue component H are converted back to the RGB color space to obtain the current RGB value of each color.

[0126] In this embodiment, after obtaining the current chroma component C corresponding to each color (i.e., C x ), the current LCH color coordinates can be composed of C x , the original lightness component L, and the original hue component H, as shown in the following formula (3-1):

[0127] Current LCH = (L, C x , H); (3-1)

[0128] On this basis, the current LCH can be subjected to matrix conversions of LCH2LAB, LAB2XYZ, and XYZ2RGB, that is, first converted to the LAB color space based on the LCH2LAB matrix, then converted to the XYZ color space based on the LAB2XYZ matrix, and converted to the RGB color space based on the XYZ2RGB matrix, and then the obtained RGB value is converted to the non-linear space (0-255) to obtain the current RGB value of each color.

[0129] For example, assuming that the current LCH of a certain color is (L, C x , H), then the current RGB value (R 当 , G 当 , B 当 ) of this color can be obtained based on the following formulas (3-2) to (3-3):

[0130] (R 当线 , G 当线 , B 当线 ) = (L, C x , H) * LCH2LAB * LAB2XYZ * XYZ2RGB; (3-2)

[0131]

[0132] Among them, (R 当线 , G 当线 , B 当线) The RGB values of the linear space obtained by converting the current LCH through the matrix, where 4095 is the maximum value in the 12-bit LUT. That is to say, the original 3D LUT is in a 12-bit linear space, and through (3-3), it can be converted into a non-linear RGB space, where 4095 is used for normalization.

[0133] It should be noted that the above values such as 12-bit and 4095 are only for illustrative purposes and can be modified based on actual needs during application. This embodiment does not limit this.

[0134] In this embodiment, in order to achieve color enhancement (i.e., increase the color saturation) in a larger color gamut (i.e., a color gamut larger than the standard P3 color gamut and the screen's native color gamut), the above XYZ2RGB matrix can be determined based on the color coordinates of the screen's native color gamut. Furthermore, it is possible to increase the color saturation in a larger color gamut while retaining the original color accuracy (number of levels). Exemplarily, the above XYZ2RGB matrix can be shown as the following formula (3-4):

[0135]

[0136] In step S303, it is determined whether the value of any color component in the current RGB values exceeds the set color component threshold: if so, step S304 is executed; if not, step S301 is executed again.

[0137] In this embodiment, after obtaining the current RGB values of each color, it can be determined whether the value of any color component in the current RGB values exceeds the set color component threshold (such as 255, etc.), that is, it is determined whether the values of the red R component, green G component, and blue B component in the current RGB values are greater than 255 respectively. If greater, step S304 is executed, that is, the target chromaticity component C is determined based on the current chromaticity component C.

[0138] It can be understood that when the R, G, and B values are all less than 255, it means that the current color is still within the maximum color gamut (native color gamut) of the screen. At this time, C can be continuously increased (that is, steps S301 - S303 are executed again) until at least one of the RGB values exceeds 255, and C can be obtained max , and this value can represent the maximum chromaticity value that the current color can reach within the screen's native color gamut.

[0139] In step S304, the target chromaticity component C is determined based on the current chromaticity component C.

[0140] In this embodiment, when it is determined that the value of any color component in the current RGB value exceeds the set color component threshold, the target chromaticity component C can be determined based on the current chromaticity component C. For example, the current chromaticity component C can be determined as the target chromaticity component C.

[0141] In some other embodiments, the method for determining the target chromaticity component C based on the current chromaticity component C can also be referred to in the following Figure 4 illustrated embodiments, which will not be elaborated here for the time being.

[0142] As can be seen from the above description, in this embodiment, by increasing the chromaticity component C in the LCH color coordinates of each color based on a set step size, the current chromaticity component C corresponding to each color is obtained. Then, based on a preset conversion matrix, the current LCH color coordinates composed of the current chromaticity component C, the original lightness component L, and the original hue component H are converted back to the RGB color space to obtain the current RGB value of each color. Furthermore, in response to the fact that the value of any color component in the current RGB value exceeds the set color component threshold, the target chromaticity component C is determined based on the current chromaticity component C, so as to accurately obtain the target chromaticity component C that each color can reach within the native color gamut. Furthermore, it can lay a foundation for subsequently constructing the mapping relationship between the adjusted expected RGB value and the original RGB value of each color to obtain the first three-dimensional color lookup table, and can realize enhancing the screen display color with a larger color gamut when the illuminance meets the preset conditions, which is beneficial to maintaining the color display accuracy of the image to be displayed, avoiding image blurring, and thus improving the user experience.

[0143] Figure 4 is a flowchart showing how to determine the target chromaticity component C based on the current chromaticity component C according to another exemplary embodiment of the present disclosure;

[0144] Based on the above embodiment, this embodiment takes how to determine the target chromaticity component C based on the current chromaticity component C as an example for exemplary illustration.

[0145] As Figure 4 shown, the determination of the target chromaticity component C based on the current chromaticity component C in step S304 described above may include the following steps S401 - S403:

[0146] In step S401, the current color enhancement ratio corresponding to each color is determined based on the current chromaticity component C and the original chromaticity component C.

[0147] In this embodiment, after the current chromaticity component C is determined, the current color enhancement ratio corresponding to each color can be determined based on the current chromaticity component C and the original chromaticity component C.

[0148] For example, when the current chrominance component C of a certain color is obtained (i.e., C max ), the current color enhancement ratio ratio corresponding to this color can be determined based on the following formula (4-1):

[0149]

[0150] where C is the original chrominance component C, and C max is the current chrominance component C. That is, the current color enhancement ratio can be the ratio of the current chrominance component C to the original chrominance component C.

[0151] In step S402, based on the adjustment coefficient corresponding to the preset chrominance range to which the original chrominance component C belongs, the current color enhancement ratio is adjusted to obtain the target color enhancement ratio.

[0152] In this embodiment, after determining the current color enhancement ratio ratio, the adjustment coefficient corresponding to the preset chrominance range to which the original chrominance component C belongs can be determined, and the current color enhancement ratio is adjusted based on this adjustment coefficient to obtain the target color enhancement ratio.

[0153] For example, the above adjustment coefficient α can be determined based on the following formula (4-2):

[0154]

[0155] That is to say, the adjustment coefficient α in this embodiment can be negatively correlated with the magnitude of the chrominance value within the preset chrominance range to which the original chrominance component C belongs, that is, the smaller the chrominance value, the larger the adjustment coefficient.

[0156] It should be noted that the above various chrominance ranges and the corresponding adjustment coefficients are only for illustrative purposes, and can be freely set based on the scene requirements during application, and this embodiment does not limit this.

[0157] On this basis, the current color enhancement ratio ratio can be adjusted based on the above-obtained adjustment coefficient α to obtain the target color enhancement ratio ratio_final, such as multiplying the adjustment coefficient α by the current color enhancement ratio ratio.

[0158] Exemplarily, the target color enhancement ratio ratio_final corresponding to the preset chrominance range to which the original chrominance component C belongs can be obtained based on the following formula (4-3):

[0159]

[0160] In step S403, the target chrominance component C is determined based on the target color enhancement ratio and the original chrominance component C.

[0161] In this embodiment, after obtaining the target color enhancement ratio, the target chrominance component C can be determined based on the target color enhancement ratio and the original chrominance component C. For example, multiplying the target color enhancement ratio by the original chrominance component C gives a product, which is the target chrominance component C.

[0162] Exemplarily, the target chrominance component C can be determined based on the following formula (4-4):

[0163] C 目 = ratio_final·C; (4-4)

[0164] where C 目 is the target chrominance component C.

[0165] As can be seen from the above description, in this embodiment, by determining the current color enhancement ratio corresponding to each color based on the current chrominance component C and the original chrominance component C, and adjusting the current color enhancement ratio based on the adjustment coefficient corresponding to the preset chrominance range to which the original chrominance component C belongs to obtain the target color enhancement ratio, and then determining the target chrominance component C based on the target color enhancement ratio and the original chrominance component C, it is possible to reasonably adjust the color enhancement ratio based on the range to which the original chrominance component C of each color belongs, thereby improving the accuracy of determining the target chrominance component C, facilitating maintaining the color display accuracy of the image to be displayed, avoiding image blurring, and thus improving the user experience.

[0166] Figure 5 is a block diagram of a color enhancement device shown according to an exemplary embodiment of the present disclosure; the device of this embodiment can be configured in an electronic device with a screen, such as a mobile phone, a tablet computer, a smart watch, etc. As Figure 5 shown, the device may include: an illuminance detection module 110, a first table acquisition module 120, and a first target determination module 130, where:

[0167] The illuminance detection module 110 is configured to detect the illuminance of the environment where the screen is currently located in response to obtaining the original RGB values of the image to be displayed on the screen;

[0168] The first table acquisition module 120 is configured to obtain a first three-dimensional color lookup table in response to the illuminance satisfying a preset condition, and the first three-dimensional color lookup table is constructed based on the native color gamut of the screen;

[0169] The first target determination module 130 is configured to perform color gamut mapping on the original RGB values based on the first three-dimensional color lookup table to obtain the target RGB values of the image to be displayed, and the target RGB values are used for the screen to display the image to be displayed.

[0170] As can be seen from the above description, the device in this embodiment detects the illuminance of the environment where the screen is currently located by responding to obtaining the original RGB values of the image to be displayed on the screen, and responds to the illuminance meeting a preset condition to obtain a first three-dimensional color lookup table. The first three-dimensional color lookup table is constructed based on the native color gamut of the screen, and then performs color gamut mapping on the original RGB values based on the first three-dimensional color lookup table to obtain the target RGB values of the image to be displayed. Since the first three-dimensional color lookup table used is constructed based on the native color gamut of the screen, and the native color gamut of the screen is usually larger than the display color gamut of the screen, it is possible to enhance the screen display color using a larger color gamut when the illuminance meets the preset condition, which is beneficial to maintaining the color display accuracy of the image to be displayed, avoiding image blurring, and thus improving the user experience.

[0171] Figure 6 is a block diagram of another color enhancement device shown according to an exemplary embodiment of the present disclosure; the device in this embodiment can be configured in an electronic device with a screen, such as a mobile phone, a tablet computer, a smart watch, etc. Among them, the illuminance detection module 210, the first table acquisition module 220, and the first target determination module 230 have the same functions as the illuminance detection module 110, the first table acquisition module 120, and the first target determination module 130 in the foregoing Figure 5 shown embodiment, and will not be described in detail here.

[0172] In some embodiments, the above first three-dimensional color lookup table can be constructed by adjusting the color coordinates corresponding to the desired RGB values of each color in the second three-dimensional color lookup table in the LCH color space under the native color gamut. The second three-dimensional color lookup table is a three-dimensional color lookup table used for color correction of the screen when the illuminance of the environment where the screen is located does not meet the preset condition.

[0173] In some embodiments, the second three-dimensional color lookup table includes the mapping relationships between the desired RGB values and the original RGB values of multiple colors, and the device further includes a first table construction module;

[0174] On this basis, the first table construction module 240 may include:

[0175] A first conversion unit 241, configured to convert the desired RGB value of each color in the multiple colors to the LCH color space in response to obtaining the second three-dimensional color lookup table, to obtain the original LCH color coordinates of each color;

[0176] A chroma increasing unit 242, configured to keep the original lightness component L and the original hue component H in the original LCH color coordinates unchanged, and obtain a target chroma component C that each color can reach within the native color gamut by gradually increasing the original chroma component C in the original LCH color coordinates;

[0177] A second conversion unit 243, configured to convert a target LCH color coordinate composed of the target chroma component C, the original lightness component L, and the original hue component H back to an RGB color space to obtain an adjusted expected RGB value of each color;

[0178] A table building unit 244, configured to build a mapping relationship between the adjusted expected RGB value of each color and the original RGB value to obtain the first three-dimensional color lookup table.

[0179] In some embodiments, the above chroma increasing unit 242 may further be configured to:

[0180] Increase the chroma component C in the LCH color coordinates of each color based on a set step size to obtain a current chroma component C corresponding to each color;

[0181] Based on a preset conversion matrix, convert a current LCH color coordinate composed of the current chroma component C, the original lightness component L, and the original hue component H back to an RGB color space to obtain a current RGB value of each color, where the preset conversion matrix includes a conversion matrix calculated from the color coordinates of the native color gamut;

[0182] In response to any one of the values of the color components in the current RGB value exceeding a set color component threshold, determine the target chroma component C based on the current chroma component C.

[0183] In some embodiments, the above chroma increasing unit 242 may further be configured to:

[0184] Determine a current color enhancement ratio corresponding to each color based on the current chroma component C and the original chroma component C;

[0185] Adjust the current color enhancement ratio based on an adjustment coefficient corresponding to a preset chroma range to which the original chroma component C belongs to obtain a target color enhancement ratio;

[0186] Determine the target chroma component C based on the target color enhancement ratio and the original chroma component C.

[0187] In some embodiments, the above chroma increasing unit 242 may further be configured to:

[0188] In response to the fact that none of the numerical values of the color components in the current RGB value exceeds the set color component threshold, the current chroma component C is increased again based on the set step size until, among the current RGB values obtained by converting the current LCH color coordinates composed of the current chroma component C, the original lightness component L, and the original hue component H back to the RGB color space, there is a numerical value of any one color component that exceeds the set color component threshold.

[0189] In some embodiments, the above device may further include:

[0190] A second target determination module 250, configured to perform gamut mapping on the original RGB value based on the second three-dimensional color lookup table in response to the illuminance not satisfying the preset condition, so as to obtain the target RGB value of the to-be-displayed image.

[0191] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.

[0192] Figure 7 is a block diagram of an electronic device shown according to an exemplary embodiment. For example, the device 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0193] Referring to Figure 7 , the device 900 may include one or more of the following components: a processing component 902, a memory 904, a power component 906, a multimedia component 908, an audio component 910, an input / output (I / O) interface 912, a sensor component 914, and a communication component 916.

[0194] The processing component 902 generally controls the overall operation of the device 900, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above color enhancement method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.

[0195] The memory 904 is configured to store various types of data to support the operation of the device 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phone book data, messages, pictures, videos, and the like. The memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0196] The power supply component 906 provides power for various components of the device 900. The power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.

[0197] The multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display panel and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen 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 can not only sense the boundaries of the touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.

[0198] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC) that is configured to receive external audio signals when the device 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 further includes a speaker for outputting audio signals.

[0199] The I / O interface 912 provides an interface between the processing component 902 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a power-on button, and a lock button.

[0200] The sensor assembly 914 includes one or more sensors for providing a status assessment of various aspects of the device 900. For example, the sensor assembly 914 can detect the on / off state of the device 900, the relative positioning of components, such as the display panel and keypad of the device 900. The sensor assembly 914 can also detect a change in the position of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration / deceleration of the device 900, and the temperature change of the device 900. The sensor assembly 914 can also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0201] The communication component 916 is configured to facilitate communication between the device 900 and other devices in a wired or wireless manner. The device 900 can access a wireless network based on communication standards, such as WiFi, 2G or 3G, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0202] In an exemplary embodiment, the device 900 can 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 for performing the above-described color enhancement method.

[0203] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions, such as a memory 904 including instructions, is also provided. The above instructions can be executed by a processor 920 of the device 900 to complete the above-described color enhancement method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0204] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the disclosure herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common general knowledge or conventional technical means in the technical field not disclosed herein. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.

[0205] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A color enhancement method, characterized in that, The method includes: In response to obtaining the original RGB values of the image to be displayed on the screen, detecting the illuminance of the environment where the screen is currently located; In response to the illuminance meeting a preset condition, obtaining a first three-dimensional color lookup table, where the first three-dimensional color lookup table is constructed based on the native color gamut of the screen; Performing color gamut mapping on the original RGB values based on the first three-dimensional color lookup table to obtain the target RGB values of the image to be displayed, where the target RGB values are used for the screen to display the image to be displayed.

2. The method according to claim 1, wherein The first three-dimensional color lookup table is constructed by adjusting the color coordinates in the LCH color space corresponding to the expected RGB values of each color in the second three-dimensional color lookup table under the native color gamut. The second three-dimensional color lookup table is the three-dimensional color lookup table used for color correction of the screen when the illuminance of the environment where the screen is located does not meet the preset condition.

3. The method according to claim 2, characterized in that, The second three-dimensional color lookup table includes the mapping relationships between the expected RGB values and the original RGB values of multiple colors. The method further includes constructing the first three-dimensional color lookup table based on the following method: In response to obtaining the second three-dimensional color lookup table, converting the expected RGB value of each color in the multiple colors to the LCH color space to obtain the original LCH color coordinates of each color; Keeping the original lightness component L and the original hue component H in the original LCH color coordinates unchanged, and obtaining the target chroma component C that each color can reach within the native color gamut by gradually increasing the original chroma component C in the original LCH color coordinates; Converting the target LCH color coordinates composed of the target chroma component C, the original lightness component L, and the original hue component H back to the RGB color space to obtain the adjusted expected RGB value of each color; Constructing the mapping relationship between the adjusted expected RGB value of each color and the original RGB value to obtain the first three-dimensional color lookup table.

4. The method according to claim 3, wherein The step of obtaining the target chroma component C that each color can reach within the native color gamut by gradually increasing the original chroma component C in the original LCH color coordinates includes: Increasing the chroma component C in the LCH color coordinates of each color based on a set step size to obtain the current chroma component C corresponding to each color; Based on a preset conversion matrix, converting the current LCH color coordinates composed of the current chroma component C, the original lightness component L, and the original hue component H back to the RGB color space to obtain the current RGB value of each color. The preset conversion matrix includes the conversion matrix calculated from the color coordinates of the native color gamut; In response to any one of the color component values in the current RGB values exceeding a set color component threshold, determining the target chroma component C based on the current chroma component C.

5. The method according to claim 4, wherein The step of determining the target chroma component C based on the current chroma component C includes: Determining the current color enhancement ratio corresponding to each color based on the current chroma component C and the original chroma component C; Adjust the current color enhancement ratio based on the adjustment coefficient corresponding to the preset chromaticity range to which the original chromaticity component C belongs, and obtain the target color enhancement ratio; Determine the target chromaticity component C based on the target color enhancement ratio and the original chromaticity component C.

6. The method according to claim 4, characterized in that, The method further includes: In response to none of the numerical values of any color component in the current RGB value exceeding the set color component threshold, increase the current chromaticity component C again based on the set step size until there is a numerical value of any color component in the current RGB value obtained by converting the current LCH color coordinates composed of the current chromaticity component C, the original lightness component L, and the original hue component H back to the RGB color space that exceeds the set color component threshold.

7. The method according to claim 2, characterized in that The method further includes: In response to the illuminance not meeting the preset condition, perform gamut mapping on the original RGB value based on the second three-dimensional color lookup table to obtain the target RGB value of the image to be displayed.

8. A color enhancement device, characterized in that, The device includes: An illuminance detection module, configured to detect the illuminance of the environment where the screen is currently located in response to obtaining the original RGB value of the image to be displayed on the screen; A first table acquisition module, configured to acquire a first three-dimensional color lookup table in response to the illuminance meeting the preset condition, where the first three-dimensional color lookup table is constructed based on the native gamut of the screen; A first target determination module, configured to perform gamut mapping on the original RGB value based on the first three-dimensional color lookup table to obtain the target RGB value of the image to be displayed, where the target RGB value is used for the screen to display the image to be displayed.

9. The device according to claim 8, characterized in that, The first three-dimensional color lookup table is constructed by adjusting the color coordinates in the LCH color space corresponding to the expected RGB values of each color in the second three-dimensional color lookup table under the native gamut, and the second three-dimensional color lookup table is a three-dimensional color lookup table used for color correction of the screen when the illuminance of the environment where the screen is located does not meet the preset condition.

10. The device according to claim 9, characterized in that, The second three-dimensional color lookup table includes the mapping relationship between the expected RGB values and the original RGB values of multiple colors, and the device further includes a first table construction module; The first table construction module includes: A first conversion unit, configured to convert the expected RGB value of each color in the multiple colors to the LCH color space in response to obtaining the second three-dimensional color lookup table, and obtain the original LCH color coordinates of each color; A chromaticity increase unit, configured to keep the original lightness component L and the original hue component H in the original LCH color coordinates unchanged, and obtain the target chromaticity component C that each color can reach within the native gamut by gradually increasing the original chromaticity component C in the original LCH color coordinates; A second conversion unit, configured to convert the target LCH color coordinates composed of the target chromaticity component C, the original lightness component L, and the original hue component H back to the RGB color space to obtain the adjusted expected RGB value of each color; A table construction unit for constructing a mapping relationship between the adjusted expected RGB value of each color and the original RGB value to obtain the first three-dimensional color lookup table.

11. The device according to claim 10, characterized in that, The chroma increasing unit is further configured to: Increase the chroma component C in the LCH color coordinates of each color based on a set step size to obtain the current chroma component C corresponding to each color; Based on a preset conversion matrix, convert the current LCH color coordinates composed of the current chroma component C, the original lightness component L, and the original hue component H back to the RGB color space to obtain the current RGB value of each color, and the preset conversion matrix includes a conversion matrix calculated from the color coordinates of the native color gamut; In response to any one of the color component values in the current RGB value exceeding a set color component threshold, determine the target chroma component C based on the current chroma component C.

12. The device according to claim 11, characterized in that, The chroma increasing unit is further configured to: Determine the current color enhancement ratio corresponding to each color based on the current chroma component C and the original chroma component C; Adjust the current color enhancement ratio based on the adjustment coefficient corresponding to the preset chroma range to which the original chroma component C belongs to obtain the target color enhancement ratio; Determine the target chroma component C based on the target color enhancement ratio and the original chroma component C.

13. The device according to claim 11, characterized in that, The chroma increasing unit is further configured to: In response to none of the color component values in the current RGB value exceeding the set color component threshold, increase the current chroma component C again based on the set step size until there is any one of the color component values in the current RGB value obtained by converting the current LCH color coordinates composed of the current chroma component C, the original lightness component L, and the original hue component H back to the RGB color space exceeding the set color component threshold.

14. The device according to claim 9, wherein, The device further includes: A second target determination module for, in response to the illuminance not satisfying the preset condition, performing color gamut mapping on the original RGB value based on the second three-dimensional color lookup table to obtain the target RGB value of the to-be-displayed image.

15. An electronic device, characterized in that, The device includes: A processor and a memory for storing a computer program; Wherein, the processor is configured to, when executing the computer program, implement: In response to obtaining the original RGB value of the to-be-displayed image of the screen, detecting the illuminance of the environment where the screen is currently located; In response to the illuminance satisfying the preset condition, obtaining a first three-dimensional color lookup table, where the first three-dimensional color lookup table is constructed based on the native color gamut of the screen; Performing color gamut mapping on the original RGB value based on the first three-dimensional color lookup table to obtain the target RGB value of the to-be-displayed image, and the target RGB value is used for the screen to display the to-be-displayed image.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements: In response to obtaining the original RGB value of the to-be-displayed image of the screen, detecting the illuminance of the environment where the screen is currently located; In response to the illuminance satisfying the preset condition, obtaining a first three-dimensional color lookup table, where the first three-dimensional color lookup table is constructed based on the native color gamut of the screen; Perform gamut mapping on the original RGB values based on the first three-dimensional color lookup table to obtain the target RGB values of the image to be displayed, where the target RGB values are used for the screen to display the image to be displayed.

Citation Information

Cited By

  • Image processing method and device, electronic equipment, chip and medium

    CN120747434A

  • Image processing method and device, electronic equipment, chip and medium

    CN120747434B

  • Display device and image bright color enhancement method

    CN121547650A