CN115665394A - Color correction method, system and equipment - Google Patents

Color correction method, system and equipment Download PDF

Info

Publication number
CN115665394A
CN115665394A CN202211429550.6A CN202211429550A CN115665394A CN 115665394 A CN115665394 A CN 115665394A CN 202211429550 A CN202211429550 A CN 202211429550A CN 115665394 A CN115665394 A CN 115665394A
Authority
CN
China
Prior art keywords
color
node
color space
convex hull
lookup table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211429550.6A
Other languages
Chinese (zh)
Other versions
CN115665394B (en
Inventor
李源昕
汤汉兵
冯雨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xindong Microelectronics Technology Wuhan Co ltd
Original Assignee
Xindong Microelectronics Technology Wuhan Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xindong Microelectronics Technology Wuhan Co ltd filed Critical Xindong Microelectronics Technology Wuhan Co ltd
Priority to CN202211429550.6A priority Critical patent/CN115665394B/en
Publication of CN115665394A publication Critical patent/CN115665394A/en
Application granted granted Critical
Publication of CN115665394B publication Critical patent/CN115665394B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Color Image Communication Systems (AREA)

Abstract

The application discloses a color correction method, a system and equipment. The color correction method comprises the following steps: displaying a first color according to a first node located in a first color space, wherein the first color space includes a plurality of first nodes, and each first node in the plurality of first nodes corresponds to a first color value; collecting first colors and converting the first colors into a second color space to obtain second color values, wherein each first color value corresponds to one second color value to form a forward lookup table; according to the forward lookup table, performing reverse interpolation calculation to obtain a reverse lookup table, wherein the reverse lookup table comprises a plurality of third color values, and each third color value corresponds to a fourth color value of the first color space; and performing color correction according to the reverse lookup table. By implementing the embodiment of the application, the efficiency of color correction can be effectively improved.

Description

Color correction method, system and equipment
Technical Field
The present invention relates to the field of display technologies, and in particular, to a color correction method, system, and device.
Background
With the development of computer technology, network and multimedia technology, various display devices such as cathode ray tube (cathode ray tube) displays, liquid Crystal Display (LCD) displays and organic light-emitting diode (OLED) displays are widely used.
Due to the constraints of many factors such as an imaging mechanism, the performance of components, and the precision of a manufacturing process, the performance of the display device for reproducing colors may deviate from a standard value, and therefore, color correction needs to be performed on the display device. The color correction is mainly to compensate for the color deviation caused by the non-linear characteristic of the display. The current color correction method may include a model method, a three dimensional look up table (3 DLUT) method, and a neural network method.
The color correction is realized by utilizing 3DLUT and carrying out linear interpolation, and the correction precision is higher. However, the color correction method requires a large number of test samples and a large amount of calculation, thereby increasing the calculation time and the occupation of calculation resources, and reducing the efficiency of color correction.
Disclosure of Invention
The embodiment of the application provides a color correction method, a color correction system and color correction equipment, so that the conversion of an intermediate space is not needed, the complexity is reduced, and the color correction efficiency is improved.
In a first aspect, an embodiment of the present application provides a color correction method, where the method includes: displaying a first color according to a first node located in a first color space, wherein the first color space includes a plurality of first nodes, and each of the first nodes in the plurality of first nodes corresponds to a first color value; collecting the first colors and converting the first colors into a second color space to obtain second color values, wherein each first color value corresponds to one second color value to form a forward lookup table; according to the forward lookup table, performing reverse interpolation calculation to obtain a reverse lookup table, wherein the reverse lookup table comprises a plurality of third color values, and each third color value corresponds to a fourth color value of the first color space; and carrying out color correction according to the reverse lookup table.
Optionally, the obtaining, according to the forward lookup table, a reverse lookup table by reverse interpolation calculation includes: detecting whether a first convex hull where a second node is located exists in the second color space, wherein the second color space comprises a plurality of second nodes, each second node corresponds to a third color value, and the first convex hull is a spatial structure formed by the plurality of second color values in the second color space; if yes, utilizing a plurality of second color values of the first convex hull to perform interpolation calculation on the second node to the first color space to obtain fourth color values, wherein each third color value corresponds to one fourth color value to form a reverse lookup table.
Optionally, the displaying the first color according to the first node located in the first color space includes: uniformly dividing the first color space, wherein the number of nodes on each component in the first color space is the same so as to form a plurality of first nodes; generating a display instruction according to the first node; and displaying the first color according to the display instruction.
Optionally, the performing interpolation calculation on the second node to the first color space by using the plurality of second color values of the first convex hull to obtain a fourth color value includes: dividing the first convex hull to obtain a plurality of tetrahedrons; detecting a target tetrahedron in which the second node is located in the plurality of tetrahedrons; and performing interpolation calculation on the third color value corresponding to the second node to the first color space by using the target tetrahedron to obtain the fourth color value.
Optionally, the detecting whether the first convex hull where the second node is located exists in the second color space includes: uniformly dividing the second color space to obtain a plurality of second nodes; detecting whether a third color value corresponding to the second node is surrounded by a plurality of second color values; if yes, the second node has the first convex hull.
Optionally, the acquiring the first color and converting the first color to a second color space to obtain a second color value includes: measuring the displayed first color to obtain a first original color value of a third color space; converting the first original color value from the third color space to the second color space to obtain the second color value.
Optionally, the first color space is a source RGB color space, the second color space is a target RGB color space, and the third color space is an XYZ color space.
Optionally, the detecting whether the second node in the second color space has the first convex hull according to the forward lookup table includes: detecting a cube corresponding to the second node in the source RGB color space; obtaining a second convex hull corresponding to the second color space according to the cube; detecting whether the second node is located within the second convex hull; if so, the first convex hull where the second node exists is the second convex hull.
Optionally, the method further includes: when detecting that the second node is not located within the second convex hull, detecting whether the second node is located within a third convex hull adjacent to the second convex hull; when detecting that the second node is not located in the third convex hull, detecting whether the second node is located in a fourth convex hull adjacent to the third convex hull until the first convex hull where the second node is located is found.
Optionally, the method further includes: when a convex hull formed by a plurality of second color values in the second color space is traversed and the first convex hull where the second node is located is not found, acquiring a connecting line of the second node and the center point of the second color space and an intersection point of the connecting line and a color gamut shell in the second color space; and carrying out interpolation calculation on the intersection point to the first color space to obtain the fourth color value corresponding to the second node in the reverse lookup table.
Optionally, the obtaining a reverse lookup table by performing reverse interpolation calculation according to the forward lookup table includes: detecting whether the third color value of the second color space is contained in the forward lookup table; and when the third color value is contained, setting a target color value as the fourth color value corresponding to the third color value in the reverse lookup table, wherein the target color value is the value of the first color space corresponding to the third color value in the forward lookup table.
In a second aspect, embodiments of the present application provide a color correction system comprising a color correction device and a color analyzer, wherein: the color correction device is used for displaying a first color according to a first node located in a first color space; the color analyzer is used for collecting the first color and transmitting the first color to the color correction equipment; the color correction device is further configured to convert the first color into a second color space to obtain second color values, where each first color value corresponds to one second color value to form a forward lookup table; the color correction device is further configured to calculate a reverse lookup table through reverse interpolation according to the forward lookup table, where the reverse lookup table includes a plurality of third color values, and each third color value corresponds to a fourth color value in the first color space; the color correction device is also used for carrying out color correction according to the reverse lookup table.
Optionally, the color correction device is specifically configured to: detecting whether a first convex hull where a second node is located exists in the second color space, wherein the second color space comprises a plurality of second nodes, each second node corresponds to a third color value, and the first convex hull is a spatial structure formed by the second color values in the second color space; if yes, utilizing a plurality of second color values of the first convex hull to perform interpolation calculation on the second node to the first color space to obtain fourth color values, wherein each third color value corresponds to one fourth color value to form a reverse lookup table.
Optionally, the color correction device is specifically configured to: uniformly dividing the first color space, wherein the number of nodes on each component in the first color space is the same so as to form a plurality of first nodes; generating a display instruction according to the first node; and displaying the first color according to the display instruction.
Optionally, the color correction device is specifically configured to: dividing the first convex hull to obtain a plurality of tetrahedrons; detecting a target tetrahedron in which the second node is located in the plurality of tetrahedrons; and performing interpolation calculation on the third color value corresponding to the second node to the first color space by using the target tetrahedron to obtain the fourth color value.
Optionally, the color correction device is specifically configured to: uniformly dividing the second color space to obtain a plurality of second nodes; detecting whether a third color value corresponding to the second node is surrounded by a plurality of second color values; if so, the second node has the first convex hull.
Optionally, the color correction device is specifically configured to: measuring the displayed first color to obtain a first original color value of a third color space; and converting the first original color value from the third color space to the second color space to obtain the second color value.
Optionally, the first color space is a source RGB color space, the second color space is a target RGB color space, and the third color space is an XYZ color space.
Optionally, the color correction device is specifically configured to: detecting a cube corresponding to the second node in the source RGB color space; obtaining a second convex hull corresponding to the second color space according to the cube; detecting whether the second node is located within the second convex hull; if so, the first convex hull where the second node exists is the second convex hull.
Optionally, the color correction device is further configured to: when detecting that the second node is not located within the second convex hull, detecting whether the second node is located within a third convex hull adjacent to the second convex hull; when detecting that the second node is not located in the third convex hull, detecting whether the second node is located in a fourth convex hull adjacent to the third convex hull until the first convex hull where the second node is located is found.
Optionally, the color correction device is further configured to: when a convex hull formed by a plurality of second color values in the second color space is traversed and the first convex hull where the second node is located is not found, acquiring a connection line between the second node and a center point of the second color space and an intersection point of a color gamut shell in the second color space; and carrying out interpolation calculation on the intersection point to the first color space to obtain the fourth color value corresponding to the second node in the reverse lookup table.
Optionally, the color correction device is specifically configured to: detecting whether the third color value of the second color space is contained in the forward lookup table; and when the third color value is contained, setting a target color value as the fourth color value corresponding to the third color value in the reverse lookup table, wherein the target color value is the value of the first color space corresponding to the third color value in the forward lookup table.
In a third aspect, an embodiment of the present application provides a color correction apparatus, including: one or more processors, memory, and a display; the memory coupled with the one or more processors, the memory to store computer program code, the computer program code comprising computer instructions; the computer instructions, when executed by the one or more processors, cause the color correction apparatus to perform operations comprising: calling the display to display a first color according to a first node located in a first color space, wherein the first color space comprises a plurality of first nodes, and each first node in the plurality of first nodes corresponds to a first color value; receiving the first colors collected by a color analyzer, and converting the first colors into a second color space to obtain second color values, wherein each first color value corresponds to one second color value to form a forward lookup table; according to the forward lookup table, performing reverse interpolation calculation to obtain a reverse lookup table, wherein the reverse lookup table comprises a plurality of third color values, and each third color value corresponds to a fourth color value of the first color space; and carrying out color correction according to the reverse lookup table.
Optionally, the one or more processors, when executing the computer instructions, further cause the color correction device to perform the following operations: detecting whether a first convex hull where a second node is located exists in the second color space, wherein the second color space comprises a plurality of second nodes, each second node corresponds to a third color value, and the first convex hull is a spatial structure formed by the second color values in the second color space; if so, performing interpolation calculation on the second node to the first color space by using a plurality of second color values of the first convex hull to obtain fourth color values, wherein each third color value corresponds to one fourth color value to form a reverse lookup table.
In a fourth aspect, an embodiment of the present application provides a computer storage medium storing a plurality of instructions, where the instructions are adapted to be loaded by a processor and to execute the method steps provided by the third aspect or any implementation manner of the third aspect of the embodiment of the present application.
In a fifth aspect, the present application provides a computer program product containing instructions, which when run on a computer or a processor, causes the computer or the processor to execute the method provided in any one of the possible implementations of the third aspect or the third aspect of the present application.
It can be seen that, according to the color correction method, system and device provided by the embodiment of the application, when performing color correction, the lookup table of the color space is used for correction, so that conversion of the intermediate space is not required, and compared with the case that space division is required again when performing color correction in an interpolation mode, the complexity is reduced. In addition, the reverse lookup table can be obtained by only acquiring data once and is used for color correction, the situation of repeatedly acquiring a large amount of data is reduced, and therefore operation convenience is improved.
Drawings
FIG. 1 is a diagram of a system architecture of a color correction system according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a color correction method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a color space division provided by an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a correspondence between a cube and a three-dimensional convex hull in a color space according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a tetrahedral partition provided by an embodiment of the present application;
FIG. 6 is a flow chart illustrating another color correction method according to an embodiment of the present disclosure;
fig. 7 is a schematic node mapping diagram provided in an embodiment of the present application;
FIG. 8 is a schematic diagram of a color mapping provided by an embodiment of the present application;
FIG. 9 is a schematic structural diagram of a color correction apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of another color correction apparatus according to an embodiment of the present application.
Detailed Description
Technical solutions in some embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided by the present disclosure are within the scope of protection of the present disclosure.
Throughout the specification and claims, the term "comprising" is to be interpreted in an open, inclusive sense, i.e., as "including, but not limited to," unless the context requires otherwise. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. In the description of the specification, the terms "one embodiment," "some embodiments," "example embodiments," "exemplary" or "some examples," etc., are intended to indicate that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the disclosure. The schematic representations of the above terms are not necessarily referring to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be included in any suitable manner in any one or more embodiments or examples.
Hereinafter, the terms "first" and "second" are used only for convenience of description. And are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present disclosure, "a plurality" means two or more unless otherwise specified.
In order to better understand the color correction method, system and device provided by the embodiments of the present invention, a system architecture used in the embodiments of the present invention is described below.
Referring to fig. 1, fig. 1 is a system architecture diagram of a color correction system according to an embodiment of the present disclosure. The color correction system 10, among others, comprises a color correction device 100 and a color analyzer 200, wherein:
the color correction device 100 may be a device that includes a display. The color correction device 100 may be a smart watch including a display screen, a smart bracelet, a head-mounted device (e.g., a Virtual Reality (VR) helmet, an Augmented Reality (AR), wearable glasses, etc.), a mobile phone, a tablet, a video camera, etc. It is to be understood that the specific product form of the color correction apparatus 100 is not limited to the above examples, which are merely used to explain the embodiments of the present application.
Color correction device 100 may communicate with other devices (e.g., color analyzer 200) via wired or wireless communication techniques. For example, the color correction apparatus 100 may obtain its acquired color (e.g., the first color) from the color analyzer 200 through the wireless communication technology and/or the wired communication technology. The color correction device 100 may also send data to other devices, such as to send inverse look-up tables to other display devices, via the wireless communication technology and/or wired communication technology. In this way, the display device can perform color correction according to the inverse look-up table received from the color correction device 100.
The wired communication technology can transmit information and data by using tangible media such as metal wires and optical fibers. The wired communication techniques may include, but are not limited to, one or more of the following: ethernet (ETH), M-BUS, universal Serial BUS (USB), RS-485 interface, and RS-232 interface.
The wireless communication technology may also include, but is not limited to, one or more of the following: global system for mobile communications (GSM), general Packet Radio Service (GPRS), code Division Multiple Access (CDMA), wideband Code Division Multiple Access (WCDMA), time division code division multiple access (TD-SCDMA), long Term Evolution (LTE), bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), wireless Local Area Network (WLAN) (such as wireless fidelity, wi-Fi) networks), short range wireless communication technology (near field communication, GNSS), frequency modulation (FM/FM, frequency modulation, and so on). The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou satellite navigation system (BDS), a quasi-zenith satellite system (QZSS) and/or a Satellite Based Augmentation System (SBAS), infrared technology (infra, IR), zigbee, Z-wave, NB-loT, GPRS, 3G, LTE (eete), sigFox, and LoRa.
In the embodiment of the present application, the wired communication technology and the wireless communication technology are not limited to the above examples, and may also be a 5G communication technology or a communication technology that will come into existence in the future, which is not limited in the embodiment of the present application.
The color correction apparatus 100 for displaying a first color according to a first node located in a first color space;
the color analyzer 200 for collecting the first color and transmitting to the color correction device;
the color correction device 100 is further configured to convert the first color into a second color space to obtain second color values, where each of the first color values corresponds to one of the second color values to form a forward lookup table;
the color correction device 100 is further configured to perform a reverse interpolation calculation according to the forward lookup table to obtain a reverse lookup table, where the reverse lookup table includes a plurality of third color values, and each of the third color values corresponds to a fourth color value of the first color space;
the color correction apparatus 100 is further configured to perform color correction according to the inverse look-up table.
To facilitate understanding of the embodiments of the present application, some concepts or terms referred to by the embodiments of the present application are explained.
(1) Color space
The color may be a different perception of the eye by different frequencies of light, or may represent the presence of different frequencies of light objectively. A color space is a range of colors defined by a coordinate system that one establishes to represent colors. Together with the color model, the color gamut defines a color space. Wherein the color model is an abstract mathematical model representing colors by a set of color components. The color model may include, for example, a Red Green Blue (RGB) mode, a printing four Color (CMYK) mode. Color gamut refers to the aggregate of colors that a system is capable of producing. Illustratively, adobe RGB and sRGB are two different color spaces based on the RGB model.
Each device, such as a display or printer, has its own color space and can only generate colors within its gamut. When moving an image from one device to another, the colors of the image may change on different devices as each device converts and displays RGB or CMYK according to its own color space.
Several commonly used color spaces are described below.
(1) CIE1931 color space
The CIE1931 color space (also known as CIE1931 XYZ color space) is one of the first mathematically defined color spaces. The CIE XYZ color space is directly measured based on human color vision and can serve as a basis for the definition of other color spaces. The Y parameter used by the CIE XYZ color space is the lightness or brightness of a color. The chromaticity of the color is determined using parameters X and Y, the relationship between chromaticity X, Y and tristimulus values X, Y and Z being:
Figure BDA0003944668520000101
Figure BDA0003944668520000102
the parameters x, Y can be used to determine a color, and for a display screen, the chromaticity coordinates x, Y and the luminance value Y can be measured using a color analyzer. Wherein, X and Z in the tri-stimulus value can be calculated from chromaticity coordinates X and Y and luminance Y:
Figure BDA0003944668520000103
Figure BDA0003944668520000104
(2) sRGB color space
The sRGB (standard Red Green Blue) color space is a standard RGB color space developed by Hewlett packard together with Microsoft in 1996 for displays, printers, and the Internet. It provides a standard method to define colors, allowing various computer peripherals and applications, such as display, print and scan, to have a common language for colors. The color space of the sRGB is based on independent color coordinates, so that colors can correspond to the same color coordinate system in different equipment use transmission without being influenced by different color coordinates of the equipment. However, the gamut space of sRGB is relatively small. sRGB defines colors of three primary colors of red, green, and blue, where a color value of one of the three primary colors takes a maximum value, and a color corresponding to when color values of the other two colors are both zero represents the one color. Illustratively, in the three primary colors of red, green and blue, the values of the color values R, G and B are all 0-255, and when the values of R and G are both zero, the corresponding color represents blue when the value of B is 255.
Conversion can be performed between different color spaces, and the conversion of the color spaces is described below by taking a CIE1931 color space and an sRGB color space as examples.
The calculation of the three primary colors in sRGB from the CIE XYZ coordinate system first requires its transformation to the CIE XYZ ternary mode. Namely, determining X and Z by using formula (3) and formula (4) obtains three values X, Y and Z in CIE1931 color space. Then linear R, G and B values are calculated by using a conversion matrix:
Figure BDA0003944668520000111
wherein, [ M ]] -1 A conversion matrix representing the XYZ color space to the sRGB color space.
(2) Interpolation method
Interpolation is the complementary interpolation of a continuous function on the basis of discrete data, so that this continuous curve passes through all given discrete data points. Interpolation is an important method for discrete function approximation, and by using the method, the approximate values of functions at other points can be estimated through the value conditions of the functions at a limited number of points. Suppose that the real-valued function f (x) in a certain interval A has n +1 mutually different points x0, x1 \8230 \ 8230, the value at x n is f (x 0) \8230; f (x). It is required to estimate the value of f (x) at some point x in [ a, b ]. Interpolation is performed by finding a function P (x) that has the same function value (sometimes, even the same first derivative value) as f (x) at the node x0, x1, \8230;, xn, and using the value P (x) as an approximation of the function f (x).
In the field of image processing, interpolation may be used to fill the gaps between pixel nodes in an image transform. For example, in a mapping table between color spaces, a set of nodes in a color space a { A1, A2, A3 \8230; \8230, an } corresponds to a set of nodes in another color space, for example, B, in turn { B1, B2, B3 \8230; \8230, bn }. Then, a color point a in the color space a that is not included in the node set is given, and then the mapping relationship between the node set in the color space a and the node set corresponding to the color space B is utilized to perform interpolation calculation to obtain a color point B corresponding to the color point a in the color space B.
In some embodiments of the present application, the interpolation for the node a of the color space a may be a polyhedral interpolation, for example, the node a may be interpolated by using a plurality of nodes corresponding to a polyhedron enclosing the node a in the color space a.
A color correction method provided in the embodiments of the present application is described below. When the color correction is carried out, the color correction method utilizes the lookup table of the color space to carry out correction, thereby needing no conversion of an intermediate space, reducing the complexity of color correction and improving the efficiency of color correction.
Specifically, please refer to fig. 2, fig. 2 is a schematic flow chart of a color correction method according to an embodiment of the present disclosure. As shown in fig. 2, the color correction method may include S101 to S106.
S101, the color correction apparatus 100 displays a first color according to a first node located in a first color space.
S102, the color analyzer 200 collects the first color.
After S102, S103 is executed.
S103, transmitting the first color collected by the color analyzer 200 to the color correction apparatus 100.
S104, the color correction device 100 converts the first color into a second color space to obtain a second color value.
Wherein each first color value corresponds to one second color value to form a forward lookup table.
S105, the color correction device 100 performs a reverse interpolation calculation according to the forward lookup table to obtain a reverse lookup table.
The reverse lookup table includes a plurality of third color values, and each of the third color values corresponds to a fourth color value of the first color space.
S106, the color correction device 100 performs color correction according to the inverse look-up table.
After step S106, the process ends, and the color correction is completed this time.
In the embodiment of the present application, the color correction device 100 may also send the inverse lookup table to other display devices, for example, different devices with the same process condition and hardware condition. Other display devices may perform color correction according to the inverse look-up table.
In the embodiment of the application, when color correction is carried out, the lookup table of the color space is used for correction, so that conversion of an intermediate space is not needed, and compared with the interpolation mode for carrying out color correction and carrying out space division again, the complexity is reduced. In addition, the reverse lookup table can be obtained only by collecting data once and is used for color correction, the situation of repeatedly collecting a large amount of data is reduced, and therefore operation convenience is improved.
In some embodiments of the present application, the first color space is a source RGB color space, the second color space is a target RGB color space, and the third color space is an XYZ color space.
It is to be understood that, in the embodiments of the present application, the color space is described as an example, but the first color space, the second color space, and the third color space are not particularly limited in the embodiments of the present application, and may be other types of color spaces. The first color space and the second color space may be the same type of color space, such as both RGB color spaces, or both LAB color spaces.
In some embodiments of the present application, step S101 is specifically implemented as: uniformly dividing the first color space, wherein the number of nodes on each component in the first color space is the same so as to form a plurality of first nodes; generating a display instruction according to the first node; and displaying the first color according to the display instruction.
In the following, a Look Up Table (LUT) with a size of 9 × 9 is taken as an example for both the forward lookup table and the reverse lookup table, the source space (the first color space) and the target space (i.e., the second color space) are standard sRGB, and the third color space is XYZ color space.
It can be understood that, in the embodiment of the present application, the size of the lookup table is 9x9x9, and the step size is 32, but the size of the lookup table and the step size of the node are not limited in the embodiment of the present application, and may also be other size values and step size values, and the size of the lookup table may also be 17x17x17 or 33x33x33, and the like, which is not limited in the embodiment of the present application.
Referring to fig. 3, fig. 3 is a schematic diagram of color space division according to an embodiment of the present disclosure. As shown in fig. 3, the device RGB space is uniformly divided, the number of nodes N =9, and the division step size is 32, that is, each component of the RGB code is [0, 32, 64, 96, 128, 160, 192, 224, 255], and total 9 × 9=729 sampling points (nodes), which are called device _ RGB (first color value corresponding to the first node). The first node is a point where the RGB three components respectively take values corresponding to the components. The display of the color correction apparatus 100 is driven to sequentially display colors according to the display instruction. Namely, the first color is the color which is sent to the display by the driving command.
In some embodiments of the present application, step S104 is specifically implemented as: measuring the displayed first color to obtain a first original color value of a third color space; and converting the first original color value from the third color space to the second color space to obtain the second color value.
Specifically, the color analyzer 200 is used to measure the first color actually displayed by the display, and obtain a set of 9x9x9 XYZ data, which is referred to as meas _ XYZ, and is the first original color value.
And taking a standard D65 white point as a reference white point, and transferring the measured meas _ xyz data to a standard sRGB space through a conversion matrix, wherein the corresponding RGB value is called the meas _ RGB, namely the second color value. The concrete conversion formula is as follows:
Figure BDA0003944668520000131
Figure BDA0003944668520000132
wherein:
Figure BDA0003944668520000141
and establishing a forward three-dimensional LUT, wherein each first color value corresponds to one second color value in a forward lookup table. Specifically, a 9x9x9 forward three-dimensional LUT is established by using device _ rgb (first color value corresponding to the first node) and corresponding meas _ rgb (second color value). The forward three-dimensional LUT stores the corresponding relation between the device _ rgb and the meas _ rgb, and when any device _ rgb value in the device space (first color space) is known, the cube/tetrahedron in which the device _ rgb is located can be searched, cube interpolation/tetrahedron interpolation is carried out on the point to obtain the meas _ rgb value in the corresponding sRGB space (second color space), and the mapping from the device _ rgb to the meas _ rgb is realized.
Specifically, please refer to fig. 4, wherein fig. 4 is a schematic diagram illustrating a corresponding relationship between a cube and a three-dimensional convex hull in a color space according to an embodiment of the present disclosure. As shown in fig. 4, (a) is a small cube of the uniformly sampled deviceRGB space, the vertex { a, B, C, D, E, F, G, H } of the cube corresponds to deviceRGB (first color value); (B) The XYZ values measured for the various vertices of the cube are transformed into the sRGB space, with each vertex { A ', B', C ', D', E ', F', G ', H' } corresponding to meas _ rgb (the second color value).
Optionally, step S105 is specifically implemented as: detecting whether a first convex hull where a second node is located exists in the second color space, wherein the second color space comprises a plurality of second nodes, each second node corresponds to a third color value, and the first convex hull is a spatial structure formed by the second color values in the second color space; if so, performing interpolation calculation on the second node to the first color space by using a plurality of second color values of the first convex hull to obtain fourth color values, wherein each third color value corresponds to one fourth color value to form a reverse lookup table.
Specifically, the nodes of the reverse lookup table are preset, and uniform division can be generally adopted, so that the cube can be quickly positioned for interpolation during color correction. For the node target RGB value in the reverse lookup table, i.e. the third color value, it is looked up which cube vertex's measured RGB value (the second color value in the forward lookup table) is surrounded by the formed three-dimensional convex hull. And interpolating the nodes of the reverse lookup table by using the surrounding points in the forward lookup table to obtain a fourth color value corresponding to the third color value in the first color space. Thus, the RGB value corresponding to the third color value in the source space (i.e., the first color space) of the node in the second color space is obtained. In this way, each node of the reverse lookup table is traversed to obtain a fourth color value corresponding to the third color value in the reverse lookup table in the first color space. The table formed by the third color value and the fourth color value is the reverse lookup table.
For example, the following steps are carried out:
(1) The color correction device uniformly divides the device RGB space (first color space) in the forward lookup table to obtain cubes and numbers the cubes. The color correction device stores the 8 vertex device rgb values (first color values) of the cube corresponding to the number, and the corresponding measured meas rgb values (second color values). The data structure is shown in table 1 below:
cubue_index point_index device_rgb meas_rgb
1 1 R d1 ,G d1 ,B d1 R m1 ,G m1 ,B m1
…… …… …… ……
1 8 R d8 ,G d8 ,B d8 R m8 ,G m8 ,B m8
table 1 data structure stored by color correction device
As shown in table 1, the data structure includes 8 vertices, i.e., 1-8, with cube number 1, and a first color value device _ rgb and a second color value meas _ rgb for each vertex. The data structures for the other cube numbers are similar to the data structures corresponding to the cube number 1 and are not listed here.
(2) The node position of the reverse 3DLUT is preset, namely the node target RGB value, namely the third color value. Here, in order to increase the interpolation speed at the time of correction, uniform division is still employed, i.e., components of the nodes of the second color space are [0, 32, 64, 96, 128, 160, 192, 224, 255], respectively.
(3) Traversing a node in the preset sRGB space may be referred to as sRGB _ node _ loc (third color value corresponding to the second node). For each srgb _ node _ loc the following operations are performed:
and (3) searching a forward lookup table, searching the cubes stored in the step (1), and finding out the measured RGB value (the second color value in the forward lookup table) of which cube vertex the current node is surrounded by to form a three-dimensional convex hull. The shape made up of meas _ rgb (second color value) mapped to the sRGB space (second color space) due to the cube formed of 8 device _ rgb (first color value corresponding to the first node) is no longer a cube. Here, a three-dimensional convex hull formed by 8 meas _ rgb is used for judgment.
Firstly, the color correction equipment judges which rule cube of the equipment space the current node falls into, records the number of the cube, and finds out the three-dimensional convex hull corresponding to the sRGB space according to the cube number. And judging whether the second node in the second color space falls into the three-dimensional convex hull. And judging whether the current node is positioned in the three-dimensional convex hull or not according to the value of the third color value corresponding to the current node.
In some embodiments of the present application, the interpolation calculation is performed on the second node to the first color space by using a plurality of second color values of the first convex hull to obtain a fourth color value, which may be implemented as: dividing the first convex hull to obtain a plurality of tetrahedrons; detecting a target tetrahedron in which the second node is located in the plurality of tetrahedrons; and performing interpolation calculation on the third color value corresponding to the second node to the first color space by using the target tetrahedron to obtain the fourth color value.
In some embodiments of the present application, the detecting whether the first convex hull where the second node is located exists in the second color space includes: uniformly dividing the second color space to obtain a plurality of second nodes; detecting whether a third color value corresponding to the second node is surrounded by a plurality of second color values; if so, the second node has the first convex hull.
Specifically, please refer to fig. 5, wherein fig. 5 is a schematic diagram of a tetrahedron division according to an embodiment of the present application. The convex hull can be tetrahedrally partitioned in the manner of fig. 5, as shown in fig. 5. Consistent with the tetrahedral partitioning in the first color space, a cube made up of nodes 1-8 corresponds to nodes 1-8 in the second color space, e.g., according to a forward lookup table. The tetrahedron is divided into a first color space and a second color space, wherein the tetrahedron is composed of four nodes, for example, tetrahedrons composed of 1, 2, 3, 4 and 5. And judging the tetrahedron in which the second node is positioned. And after finding the corresponding tetrahedron, performing tetrahedron interpolation on the second node to the first color space to obtain a corresponding srgb _ node _ value, namely a fourth color value.
In this way, traversing the second node in the second color space, detecting whether the second node in the second color space has the first convex hull, and if so, obtaining the corresponding srgb _ node _ value, that is, the fourth color value, according to the above reverse interpolation method.
In some embodiments of the present application, detecting whether the second node in the second color space has the first convex hull according to the forward lookup table may be implemented as: detecting a cube corresponding to the second node in the source RGB color space; obtaining a second convex hull corresponding to the second color space according to the cube; detecting whether the second node is located within the second convex hull; if so, the first convex hull where the second node exists is the second convex hull.
Specifically, the embodiment of the present application may provide a method for quickly searching a three-dimensional convex hull surrounding a point to be interpolated: because the display is corrected once when being delivered from the factory, the error is not too large. The display input value (first color value) and the measurement value (second color value) do not differ too far. With this feature, the color correction apparatus quickly locates the second node. First, it is determined that the RGB value (third color value) of the target node (second node) falls within the cube composed of the first nodes in the first color space. And then finding a three-dimensional convex hull formed by the second color value corresponding to the cube according to the forward lookup table. And judging whether the point falls into the three-dimensional convex hull. If not, the convex hull corresponding to the neighborhood of the cube is searched, and the correlation among the data is utilized to reduce the searching time.
In the embodiment of the application, when the first convex hull is searched, the interpolation point is quickly positioned by utilizing the correlation among the data, and the calculation speed is greatly increased compared with the brute force search, so that the efficiency of obtaining the reverse lookup table is improved, and the efficiency of color correction is improved.
It can be understood that, in the embodiment of the present application, the first convex hull lookup is performed according to the cube corresponding to the forward lookup table as an example, but the embodiment of the present application is not limited to the above method for detecting whether the first convex hull exists, and may also perform other lookup manners, such as sequential lookup, which is not limited by the embodiment of the present application.
Another color correction method provided in the embodiments of the present application is described below. When the color correction is carried out, the color correction method utilizes the lookup table of the color space to carry out correction, thereby needing no conversion of an intermediate space, reducing the complexity of color correction and improving the efficiency of color correction.
Specifically, please refer to fig. 6, wherein fig. 6 is a schematic flow chart of another color correction method according to an embodiment of the present application. As shown in fig. 6, the color correction method may include S201 to S213.
S201, the color correction apparatus 100 displays a first color according to a first node located in the source RGB color space.
In the embodiment of the present application, the source RGB color space is used for example, and the first color space may also be other types of color spaces.
S202, the color analyzer 200 collects the first color.
After S202, S203 is executed.
S203, transmitting the first color collected by the color analyzer 200 to the color correction apparatus 100.
S204, the color correction device 100 converts the first color into a target RGB color space to obtain a second color value.
Wherein each first color value corresponds to one second color value to form a forward lookup table.
In the embodiment of the present application, the above descriptions of steps S201 to S204 may refer to steps S101 to S104 in the method described in fig. 2.
The fourth color value corresponding to the third color value is obtained by utilizing the forward lookup table and reverse interpolation, so that the obtained reverse lookup table can comprise the following three conditions. Case 1: s205 to S206; case 2: s207 to S211; case 3: s212 to S213.
S205, the color correction apparatus 100 detects whether the third color value of the second color space is included in the forward lookup table.
S206, when the third color value is included, the color correction apparatus 100 sets the target color value as the fourth color value corresponding to the third color value in the reverse lookup table.
Wherein the target color value is a value of the first color space corresponding to the third color value in the forward lookup table.
Specifically, the forward lookup table is searched, if the value of srgb _ node _ loc (the third color value) in the forward lookup table has a meas _ rgb value (the second color value) equal to it, the first color value device _ rgb corresponding to the second color value meas _ rgb value in the forward lookup table is the fourth color value srgb _ node _ value of the third color value pair drink in the reverse lookup table, and then the next second node is calculated. If the srgb _ node _ loc value (the third color value) is not equal to the meas _ rgb value (the second color value) in the forward lookup table, go to cases 2 and 3 to get the fourth color value corresponding to the third color value.
S207, when the second color value equal to the color value corresponding to the second node is not included, the color correction apparatus 100 detects the cube corresponding to the second node in the source RGB color space.
S208, the color correction apparatus 100 obtains a second convex hull corresponding to the target RGB color space according to the cube.
S209, the color correction apparatus 100 detects whether the second node is located in the second convex hull.
S210, when it is detected that the second node is not located in the second convex hull, the color correction apparatus 100 detects whether the second node is located in a third convex hull adjacent to the second convex hull.
S211, when it is detected that the second node is not located in the third convex hull, the color correction apparatus 100 detects whether the second node is located in a fourth convex hull adjacent to the third convex hull until the first convex hull where the second node is located is found.
Regarding steps S207 to S211, the forward lookup table is searched, the cube in the first color space in the forward lookup table is searched, and the current second node is found to be surrounded by the three-dimensional convex hull formed by the measured RGB values of the vertex of the cube (the second color values in the forward lookup table). The shape made up of meas _ rgb (second color value) mapped to the sRGB space (second color space) due to the cube formed by the 8 device _ rgb (first color value corresponding to the first node) is no longer a cube. Here, a three-dimensional convex hull formed by 8 meas _ rgb is used for judgment.
Firstly, the color correction device can judge which regular cube of the device space the current node falls into, record the cube number, and find the three-dimensional convex hull corresponding to the sRGB space according to the cube number. And judging whether the second node in the second color space falls into the three-dimensional convex hull. Specifically, the color correction device determines whether the current node falls within the three-dimensional convex hull according to the value of the third color value corresponding to the current node.
When the second node falls in the three-dimensional convex hull, the color correction device performs interpolation calculation on the second node to the first color space by using the plurality of second color values of the first convex hull to obtain a fourth color value. And when the second node does not fall within the three-dimensional convex hull (second convex hull), the color correction apparatus detects whether the second node is located within a third convex hull adjacent to the second convex hull.
And when the second node is detected to be positioned in the third convex hull, the third convex hull is the first convex hull, and the color correction equipment performs interpolation calculation on the second node to the first color space by utilizing a plurality of second color values of the first convex hull to obtain a fourth color value. When detecting that the second node is not located in the third convex hull, the color correction apparatus 100 detects whether the second node is located in a fourth convex hull adjacent to the third convex hull until the first convex hull in which the second node is located is found.
For example, the data structure shown in table 1 is used as an example. The color correction device judges which regular cube (namely the cube formed by the first node in the first color space) of the device space the current node falls into, records the cube number, and finds the three-dimensional convex hull corresponding to the sRGB space according to the cube number. And judging whether the second node in the second color space falls into the three-dimensional convex hull. If so, according to the above reverse interpolation method, a corresponding srgb _ node _ value, i.e. a fourth color value, is obtained.
If not, searching a convex hull corresponding to the neighborhood of the current cube according to the number in the table 1 until a convex hull surrounding the point to be interpolated is found, performing interpolation calculation on the srgb _ node _ value according to the method, ending the calculation, and calculating the next node until all second nodes are traversed to calculate the corresponding fourth color value.
S212, when the convex hull formed by the plurality of second color values in the second color space is traversed and the first convex hull where the second node is located is not found, the color correction device 100 obtains an intersection point of a connection line between the second node and the center point of the second color space and the color gamut shell in the second color space.
S213, the color correction device 100 performs interpolation calculation on the intersection point to the first color space, and the color correction device 100 obtains the fourth color value corresponding to the second node in the inverse lookup table.
S214, the color correction device 100 performs color correction according to the inverse look-up table.
After step S214, the process ends, and the present color correction is completed.
Specifically, in one possible embodiment, the color correction apparatus 100 detects whether the second node is located in a fourth convex hull adjacent to the third convex hull until all three-dimensional convex hulls formed by the second color values are traversed, but the third convex hull where the second node is located is not found. This means that the second node falls outside the display gamut of the color correction device and is a color that the display cannot display, and the color correction device is required to map this point into the gamut.
Specifically, the outer surface of the source RGB color space partitioning cube corresponds to the target RGB color space and remains the outer surface. Thus, the color correction device 100 can record these outer surfaces as the cube is divided, taking these outer surfaces as gamut shells for the target RGB color space. And when the point to be interpolated is positioned outside the target RGB color space color gamut, connecting the point to be interpolated and the central point with the color gamut shell to intersect at one point, wherein the intersection point is the point after the color gamut mapping.
And the boundary point of the sampling points in each color space corresponds to the display color gamut boundary. And mapping by using an outermost plane formed by 9x9x9 points in the sampling data, thereby calculating a corresponding fourth color value of a second node outside the color gamut space in the reverse lookup table. Referring to fig. 7, fig. 7 is a schematic node mapping diagram according to an embodiment of the present disclosure. As shown in fig. 7, four points of the device space (also referred to as the source RGB color space, also referred to as the first color space) cube form a plane, and the four points may not be on the same plane corresponding to the sRGB space (also referred to as the second color space, also referred to as the target RGB color space). It is therefore necessary to connect the plane diagonals to form triangles and use the planes formed by these triangles as gamut shells, avoiding complex gamut boundary calculations.
Specifically, please refer to fig. 8, fig. 8 is a schematic diagram of a color mapping according to an embodiment of the present disclosure. As shown in fig. 8, for the node P outside the color gamut, the node P may be one of the second nodes, which does not include the second color value equal to the color value corresponding to the second node and has no first convex hull. Connecting the second node P and the center point of the second color space. For example, for a second color space with a node number of 9x9x9, the center point E is (128, 128, 128). The line segment of the second node and the center point, which is formed, intersects with the color gamut shell at a point F, and the point F may be a mapped point, that is, a point corresponding to the second node in the inverse lookup table. Then, the mapped intersection is interpolated into the first color space by using a forward lookup table to obtain the corresponding srgb _ node _ value. And taking the srgb _ node _ value as a point corresponding to the first color space corresponding to the reverse lookup table by the second node P. Wherein the interpolation calculation may be a tetrahedral interpolation.
Optionally, the process of forming the line segment may select another point other than the center point E, for example, an arbitrary point located in the gamut range in the first color space, then obtain an intersection point of a connection line between the point and the second node P and the gamut shell, and use the intersection point as a mapped point, perform interpolation calculation on the mapped intersection point to the first color space by using a forward lookup table, and find a corresponding srgb _ node _ value, that is, a fourth color value.
In the embodiment of the application, the outer surface of the color gamut is directly formed by utilizing the collected data in the forward lookup table during the color gamut mapping, and the complicated color gamut boundary calculation is avoided, so that the efficiency of generating the reverse lookup table is improved, and the color correction efficiency is improved.
With respect to step S106 shown in fig. 2 and step S214 shown in fig. 6, the inverse look-up table may be written to a chip of the color correction device, and color correction is performed according to the inverse look-up table stored in the chip. When a display instruction is received, the color correction apparatus 100 may look up the reverse lookup table according to the color value carried by the display instruction. And carrying out interpolation calculation on the color value according to the reverse lookup table to obtain a color value corresponding to the color value in the first color space. And then displaying according to the color value corresponding to the first color space. Therefore, the reverse lookup table can be obtained only by collecting data once and is used for color correction, the situation of repeatedly collecting a large amount of data is reduced, and the operation convenience is improved.
Referring to fig. 8, fig. 8 is a schematic diagram illustrating a color correction using an inverse lookup table according to an embodiment of the present disclosure. The process of color correction may be implemented in a color correction device. As shown in fig. 8, after obtaining the inverse lookup table 101 according to the color correction method shown in fig. 2 or fig. 6, the inverse lookup table 101 may be configured in the driver chip 102 in the color correction device. The color correction device 100 may receive a display instruction carrying an sRGB input value 103. The color correction apparatus 100 may interpolate the sRGB input value 103 using the inverse lookup table 101 to obtain the display correction data 104, and display according to the display correction data 104. The reverse lookup table can be obtained only by collecting data once and is used for color correction, the situation of repeatedly collecting a large amount of data is reduced, and therefore operation convenience is improved.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a color correction device according to an embodiment of the present application. As shown in fig. 9, the color correction apparatus 100 may include: at least one processor 501, at least one communication bus 502, at least one network interface 504, a user interface 503, and a memory 505.
Wherein a communication bus 502 is used to enable connective communication between these components.
The user interface 503 may include a Display (i.e., a monitor) and a Camera (Camera), and optionally, the user interface 503 may also include a standard wired interface and a wireless interface.
The network interface 504 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Processor 501 may include one or more processing cores, among other things. The processor 501 connects various parts within the overall color correction device 100 using various interfaces and lines, performs various functions of the color correction device 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 505, and calling data stored in the memory 505.
Optionally, the processor 501 may be implemented in at least one hardware form of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 501 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 501, but may be implemented by a single chip.
The Memory 505 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable medium. The memory 505 may be used to store instructions, programs, code sets, or instruction sets. The memory 505 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 505 may alternatively be at least one memory device located remotely from the processor 501. As shown in fig. 9, the memory 505, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module.
In the color correction apparatus 100 shown in fig. 9, the user interface 503 is mainly used as an interface for providing input for a user, and acquires data input by the user; and the processor 501 may be configured to call the application program stored in the memory 505, and specifically perform the following operations:
calling the display to display a first color according to a first node located in a first color space, wherein the first color space comprises a plurality of first nodes, and each first node in the plurality of first nodes corresponds to a first color value;
receiving the first colors collected by a color analyzer, and converting the first colors into a second color space to obtain second color values, wherein each first color value corresponds to one second color value to form a forward lookup table;
according to the forward lookup table, performing reverse interpolation calculation to obtain a reverse lookup table, wherein the reverse lookup table comprises a plurality of third color values, and each third color value corresponds to a fourth color value of the first color space;
and carrying out color correction according to the reverse lookup table.
Referring to fig. 10, fig. 10 is a schematic structural diagram of another color correction apparatus provided in the embodiment of the present application. As shown in fig. 10, the color correction apparatus 100 may include a display module 201, a receiving module 202, and a calculating module 203 and a correcting module 204. Wherein:
the display module 201 is configured to invoke the display to display a first color according to a first node located in a first color space, where the first color space includes a plurality of first nodes, and each of the first nodes corresponds to a first color value.
A receiving module 202, configured to receive the first color collected by the color analyzer, and convert the first color into a second color space to obtain second color values, where each first color value corresponds to one second color value to form a forward lookup table.
And the calculating module 203 is configured to calculate a reverse lookup table by reverse interpolation according to the forward lookup table, where the reverse lookup table includes a plurality of third color values, and each third color value corresponds to a fourth color value in the first color space.
And the correcting module 204 is configured to perform color correction according to the inverse lookup table.
In some embodiments of the present application, the calculating module 203 is specifically configured to:
detecting whether a first convex hull where a second node is located exists in the second color space, wherein the second color space comprises a plurality of second nodes, each second node corresponds to a third color value, and the first convex hull is a spatial structure formed by the plurality of second color values in the second color space;
if so, performing interpolation calculation on the second node to the first color space by using a plurality of second color values of the first convex hull to obtain fourth color values, wherein each third color value corresponds to one fourth color value to form a reverse lookup table.
The color correction equipment provided by the embodiment of the application utilizes the lookup table of the color space to correct when color correction is carried out, so that conversion of an intermediate space is not needed, and compared with the situation that space division is needed again when color correction is carried out in an interpolation mode, the complexity is reduced. In addition, the reverse lookup table can be obtained only by collecting data once and is used for color correction, the situation of repeatedly collecting a large amount of data is reduced, and therefore operation convenience is improved.
Embodiments of the present application further provide a computer-readable storage medium, which stores instructions that, when executed on a computer or processor, cause the computer or processor to perform one or more of the steps in the embodiments shown in fig. 2 or fig. 6. The respective constituent modules of the above-described color correction apparatus, if implemented in the form of software functional units and sold or used as separate products, may be stored in the computer-readable storage medium.
The above-described embodiments are merely preferred embodiments of the present application, and are not intended to limit the scope of the present application, and various modifications and improvements made to the technical solutions of the present application by those skilled in the art without departing from the design spirit of the present application should fall within the protection scope defined by the claims of the present application.
The color correction method, system and device disclosed in the embodiments of the present invention are described in detail above, and the principle and the embodiments of the present invention are explained in detail herein by applying specific examples, and the description of the embodiments above is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (24)

1. A color correction method, comprising:
displaying a first color according to a first node located in a first color space, wherein the first color space comprises a plurality of first nodes, and each first node corresponds to a first color value;
collecting the first colors and converting the first colors into a second color space to obtain second color values, wherein each first color value corresponds to one second color value to form a forward lookup table;
according to the forward lookup table, performing reverse interpolation calculation to obtain a reverse lookup table, wherein the reverse lookup table comprises a plurality of third color values, and each third color value corresponds to a fourth color value of the first color space;
and carrying out color correction according to the reverse lookup table.
2. The method of claim 1, wherein the calculating a reverse lookup table by reverse interpolation according to the forward lookup table comprises:
detecting whether a first convex hull where a second node is located exists in the second color space according to the forward lookup table, wherein the second color space includes a plurality of second nodes, each second node corresponds to a third color value, and the first convex hull is a spatial structure formed by the plurality of second color values in the second color space;
if yes, utilizing a plurality of second color values of the first convex hull to perform interpolation calculation on the second node to the first color space to obtain fourth color values, wherein each third color value corresponds to one fourth color value to form the reverse lookup table.
3. The method of claim 1, wherein displaying the first color according to the first node located in the first color space comprises:
uniformly dividing the first color space, wherein the number of nodes on each component in the first color space is the same so as to form a plurality of first nodes;
generating a display instruction according to the first node;
and displaying the first color according to the display instruction.
4. The method of claim 2, wherein interpolating the first color space from the second node using the plurality of second color values of the first convex hull comprises:
dividing the first convex hull to obtain a plurality of tetrahedrons;
detecting a target tetrahedron in which the second node is located in the plurality of tetrahedrons;
and performing interpolation calculation on the third color value corresponding to the second node to the first color space by using the target tetrahedron to obtain the fourth color value.
5. The method of claim 2, wherein the detecting whether the first convex hull where the second node is located exists in the second color space comprises:
uniformly dividing the second color space to obtain a plurality of second nodes;
detecting whether a third color value corresponding to the second node is surrounded by a plurality of second color values;
if so, the second node has the first convex hull.
6. The method of claim 2, wherein said capturing the first color and converting to a second color space, resulting in a second color value comprises:
measuring the displayed first color to obtain a first original color value of a third color space;
converting the first original color value from the third color space to the second color space to obtain the second color value.
7. The method of claim 6, wherein the first color space is a source RGB color space, the second color space is a target RGB color space, and the third color space is an XYZ color space.
8. The method of claim 7, wherein the detecting whether the first convex hull where the second node is located exists in the second color space comprises:
detecting a cube corresponding to the second node in the source RGB color space;
obtaining a second convex hull corresponding to the second color space according to the cube;
detecting whether the second node is located within the second convex hull;
if so, the first convex hull where the second node exists is the second convex hull.
9. The method of claim 8, further comprising:
when detecting that the second node is not located within the second convex hull, detecting whether the second node is located within a third convex hull adjacent to the second convex hull;
when detecting that the second node is not located in the third convex hull, detecting whether the second node is located in a fourth convex hull adjacent to the third convex hull until the first convex hull where the second node is located is found.
10. The method of claim 9, further comprising:
when a convex hull formed by a plurality of second color values in the second color space is traversed and the first convex hull where the second node is located is not found, acquiring a connecting line of the second node and the center point of the second color space and an intersection point of the connecting line and a color gamut shell in the second color space;
and carrying out interpolation calculation on the intersection point to the first color space to obtain the fourth color value corresponding to the second node in the reverse lookup table.
11. The method according to any of claims 2-10, wherein the calculating a reverse lookup table by reverse interpolation from the forward lookup table comprises:
detecting whether the third color value of the second color space is contained in the forward lookup table;
and when the third color value is contained, setting a target color value as the fourth color value corresponding to the third color value in the reverse lookup table, wherein the target color value is the value of the first color space corresponding to the third color value in the forward lookup table.
12. A color correction system, comprising a color correction device and a color analyzer, wherein:
the color correction device is used for displaying a first color according to a first node located in a first color space;
the color analyzer is used for collecting the first color and transmitting the first color to the color correction equipment;
the color correction device is further configured to convert the first color into a second color space to obtain second color values, where each first color value corresponds to one second color value to form a forward lookup table;
the color correction device is further configured to calculate a reverse lookup table through reverse interpolation according to the forward lookup table, where the reverse lookup table includes a plurality of third color values, and each third color value corresponds to a fourth color value in the first color space;
the color correction device is also used for carrying out color correction according to the reverse lookup table.
13. The color correction system of claim 12, wherein the color correction device is configured to:
detecting whether a first convex hull where a second node is located exists in the second color space, wherein the second color space comprises a plurality of second nodes, each second node corresponds to a third color value, and the first convex hull is a spatial structure formed by the plurality of second color values in the second color space;
if so, performing interpolation calculation on the second node to the first color space by using a plurality of second color values of the first convex hull to obtain fourth color values, wherein each third color value corresponds to one fourth color value to form a reverse lookup table.
14. The color correction system of claim 12, wherein the color correction device is configured to:
uniformly dividing the first color space, wherein the number of nodes on each component in the first color space is the same so as to form a plurality of first nodes;
generating a display instruction according to the first node;
and displaying the first color according to the display instruction.
15. The color correction system of claim 13, wherein the color correction device is configured to:
dividing the first convex hull to obtain a plurality of tetrahedrons;
detecting a target tetrahedron in which the second node is located in the plurality of tetrahedrons;
and performing interpolation calculation on the third color value corresponding to the second node to the first color space by using the target tetrahedron to obtain the fourth color value.
16. The color correction system of claim 13, wherein the color correction device is configured to:
uniformly dividing the second color space to obtain a plurality of second nodes;
detecting whether a third color value corresponding to the second node is surrounded by a plurality of second color values;
if so, the second node has the first convex hull.
17. The color correction system according to any of claims 13, characterized in that the color correction device is configured to:
measuring the displayed first color to obtain a first original color value of a third color space;
converting the first original color value from the third color space to the second color space to obtain the second color value.
18. The color correction system of claim 17, wherein said first color space is a source RGB color space, said second color space is a target RGB color space, and said third color space is an XYZ color space.
19. The color correction system of claim 18, wherein the color correction device is configured to:
detecting a cube corresponding to the second node in the source RGB color space;
obtaining a second convex hull corresponding to the second color space according to the cube;
detecting whether the second node is located within the second convex hull;
if so, the first convex hull where the second node exists is the second convex hull.
20. The color correction system of claim 19, wherein the color correction device is further configured to:
when detecting that the second node is not located within the second convex hull, detecting whether the second node is located within a third convex hull adjacent to the second convex hull;
when detecting that the second node is not located in the third convex hull, detecting whether the second node is located in a fourth convex hull adjacent to the third convex hull until the first convex hull where the second node is located is found.
21. The color correction system of claim 20, wherein the color correction device is further configured to:
when a convex hull formed by a plurality of second color values in the second color space is traversed and the first convex hull where the second node is located is not found, acquiring a connecting line of the second node and the center point of the second color space and an intersection point of the connecting line and a color gamut shell in the second color space;
and carrying out interpolation calculation on the intersection point to the first color space to obtain the fourth color value corresponding to the second node in the reverse lookup table.
22. The color correction system according to any of claims 13-16, characterized in that the color correction device is configured to:
detecting whether the third color value of the second color space is contained in the forward lookup table;
and when the third color value is contained, setting a target color value as the fourth color value corresponding to the third color value in the reverse lookup table, wherein the target color value is the value of the first color space corresponding to the third color value in the forward lookup table.
23. A color correction apparatus characterized in that the color correction apparatus comprises: one or more processors, memory, and a display;
the memory coupled with the one or more processors, the memory to store computer program code, the computer program code comprising computer instructions;
the computer instructions, when executed by the one or more processors, cause the color correction apparatus to perform operations comprising:
calling the display to display a first color according to a first node located in a first color space, wherein the first color space comprises a plurality of first nodes, and each first node in the plurality of first nodes corresponds to a first color value;
receiving the first colors collected by a color analyzer, and converting the first colors into a second color space to obtain second color values, wherein each first color value corresponds to one second color value to form a forward lookup table;
according to the forward lookup table, performing reverse interpolation calculation to obtain a reverse lookup table, wherein the reverse lookup table comprises a plurality of third color values, and each third color value corresponds to a fourth color value of the first color space;
and carrying out color correction according to the reverse lookup table.
24. The color correction device of claim 23, wherein the one or more processors, when executing the computer instructions, further cause the color correction device to:
detecting whether a first convex hull where a second node is located exists in the second color space, wherein the second color space comprises a plurality of second nodes, each second node corresponds to a third color value, and the first convex hull is a spatial structure formed by the plurality of second color values in the second color space;
if so, performing interpolation calculation on the second node to the first color space by using a plurality of second color values of the first convex hull to obtain fourth color values, wherein each third color value corresponds to one fourth color value to form a reverse lookup table.
CN202211429550.6A 2022-11-15 2022-11-15 Color correction method, system and equipment Active CN115665394B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211429550.6A CN115665394B (en) 2022-11-15 2022-11-15 Color correction method, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211429550.6A CN115665394B (en) 2022-11-15 2022-11-15 Color correction method, system and equipment

Publications (2)

Publication Number Publication Date
CN115665394A true CN115665394A (en) 2023-01-31
CN115665394B CN115665394B (en) 2024-02-20

Family

ID=85020382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211429550.6A Active CN115665394B (en) 2022-11-15 2022-11-15 Color correction method, system and equipment

Country Status (1)

Country Link
CN (1) CN115665394B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010033258A1 (en) * 1998-08-20 2001-10-25 Berryman Walter Henry Method and apparatus for colour-correction of display modules
CN101460988A (en) * 2006-06-02 2009-06-17 三星电子株式会社 Multiprimary color display with dynamic gamut mapping
CN114402379A (en) * 2019-12-11 2022-04-26 谷歌有限责任公司 Color calibration of display modules using a reduced number of display characteristic measurements

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010033258A1 (en) * 1998-08-20 2001-10-25 Berryman Walter Henry Method and apparatus for colour-correction of display modules
CN101460988A (en) * 2006-06-02 2009-06-17 三星电子株式会社 Multiprimary color display with dynamic gamut mapping
CN114402379A (en) * 2019-12-11 2022-04-26 谷歌有限责任公司 Color calibration of display modules using a reduced number of display characteristic measurements

Also Published As

Publication number Publication date
CN115665394B (en) 2024-02-20

Similar Documents

Publication Publication Date Title
CN111429827B (en) Display screen color calibration method and device, electronic equipment and readable storage medium
US6724507B1 (en) Image processing method and image processing apparatus
US6292195B1 (en) Formatting color signals by selecting irregularly distributed output color points of one color space surrounding an inputted color point of another color space
US10614596B2 (en) Image processing method, electronic device and apparatus having storage function
US20070242086A1 (en) Image processing system, image processing apparatus, image sensing apparatus, and control method thereof
KR101431653B1 (en) Method of color mapping from non-convex source gamut into non-convex target gamut
CN101646010A (en) Information processing device, method and program
JP2000175065A (en) Image processor and image processing method
WO2020216085A1 (en) Tetrahedral interpolation calculation method and apparatus, gamut conversion method and apparatus, and medium
CN107564493B (en) Color gamut compression method and device and display equipment
US11749145B2 (en) Color calibration of display modules using a reduced number of display characteristic measurements
JP4787453B2 (en) Color conversion method, color conversion apparatus, and color conversion program
CN114218421A (en) Resource recall method and device and network side equipment
US6930691B2 (en) Color transformation in 3D color space
CN115665394B (en) Color correction method, system and equipment
CN111435990B (en) Color space encoding method and apparatus
CN115529447B (en) Display method, system and equipment
KR100280819B1 (en) Color Device Color Reproduction Area Meter and Color Reproduction Limit Area Extraction Method
CN115918066A (en) Display method and device and electronic equipment
US20030174350A1 (en) Color signal processing device capable of storing a color gamut efficiently and a method using the same
CN113670443B (en) Color difference measurement method and system based on device-independent color space and intelligent terminal
WO2024000473A1 (en) Color correction model generation method, correction method and apparatus, and medium and device
US9424801B2 (en) Display control device, non-transitory computer readable medium storing display control program, and color value data structure
WO2021197213A1 (en) Color modulation method and apparatus for display, electronic device, and storage medium
CN115550629A (en) Image quality adjusting method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant