Method and device for generating color mapping table, method and device for correcting color mapping table, medium and equipment
Patent Information
- Application Number
- CN202280001976.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2024-09-06
AI Technical Summary
It is difficult to effectively perform color correction with existing technology, resulting in differences in display characteristics of display panels and the inability to achieve the same color performance as standard images.
By generating a color mapping table, using the coordinates of multiple sampling points in the color space to establish a sampling point space, executing preset processing steps to obtain the target color coordinates, and generating a color mapping table based on these coordinates, and then processing the original color data of the pixels Correction. Specific steps include converting sampling points into target sampling points, performing nonlinear transformation, using the display attribute information of the display panel and video display standards to determine the target color coordinates, and obtaining corrected color data through an interpolation algorithm.
The color correction of the display panel is realized to ensure that the displayed color is consistent with the standard image, improving the perfection of the display effect.
Smart Images

Figure CN118614054A
Abstract
Description
Color mapping table generation method, correction method, device, medium, and equipment Technical Field
[0001] The present disclosure relates to the field of display technology, and in particular to a method and device for generating a color mapping table, a method and device for color correction, a computer storage medium, and a display device. Background Art
[0002] With the advancement of image and video technology, people are increasingly pursuing more perfect video display effects. Among the many image characteristics, color, as one of the most direct perceptual attributes of the human visual system, has been deeply and extensively studied. Color management is an essential feature of high-end monitors. By correcting color, even screens with different display characteristics can achieve the same color performance as a standard image.
[0003] Summary of the Invention
[0004] The present disclosure provides a method and device for generating a color mapping table, a method and device for color correction, a computer storage medium, and a display device.
[0005] In a first aspect, the present disclosure provides a method for generating a color mapping table, wherein the color mapping table is used to perform color correction on a display panel, the method comprising:
[0006] Establishing a sampling point space according to first color coordinates of the plurality of sampling points in the first color space;
[0007] Performing a preset processing step on each sampling point to obtain a target color coordinate of each sampling point in the first color space, and generating the color mapping table according to the first color coordinate and the target color coordinate of each sampling point;
[0008] The preset processing steps for each sampling point include:
[0009] Taking the sampling point as a source sampling point, determining a target sampling point corresponding to the source sampling point;
[0010] The target sampling points are processed to obtain the target color coordinates.
[0011] In some embodiments, determining a target sampling point corresponding to the source sampling point includes:
[0012] Taking the sampling point as a source sampling point, and determining the theoretical color coordinates of the source sampling point in the second color space according to a standard conversion rule between the first color space and the second color space;
[0013] determining a target sampling point corresponding to the source sampling point based on actual color coordinates of at least some of the sampling points in the sampling point space in the second color space and the theoretical color coordinates; wherein the actual color coordinates of the sampling point in the second color space are determined based on at least display attribute information of the display panel and the first color coordinates of the sampling point;
[0014] The processing of the target sampling point to obtain the target color coordinates includes:
[0015] performing a nonlinear transformation on the first color coordinate of the target sampling point according to a video display standard of the display panel to obtain a linear coordinate of the target sampling point;
[0016] The linear coordinates are nonlinearly transformed according to the display attribute information to obtain the target color coordinates.
[0017] In some embodiments, determining the target sampling point corresponding to the source sampling point based on the actual color coordinates of at least some of the sampling points in the sampling point space in the second color space and the theoretical color coordinates specifically includes: performing at least one target search process, wherein each target search process includes:
[0018] Determine a spherical search area with the first sampling point as the center and the first preset value as the radius;
[0019] If a coordinate difference between an actual color coordinate of at least one sampling point in the spherical search area and the theoretical color coordinate in the second color space is less than a preset threshold, one of the at least one sampling point is used as the target sampling point;
[0020] Otherwise, determine whether the current process is the Nth target search process. If so, use the sampling point corresponding to the minimum coordinate difference obtained in the previous N target search processes as the target sampling point; if not, enter the next target search process;
[0021] Wherein, N is a preset integer greater than 1; the first sampling point in the first target search process is the source sampling point; in each target search process after the first one, the first sampling point is the sampling point corresponding to the minimum coordinate difference obtained in the previous target search process.
[0022] In some embodiments, taking one of the at least one sampling point as the target sampling point specifically includes:
[0023] The sampling point corresponding to the minimum coordinate difference among the at least one sampling point is used as the target sampling point.
[0024] In some embodiments, the first preset value is greater than or equal to the difference between RGB coordinates of colors with the same color coordinate in different color gamuts.
[0025] In some embodiments, before performing the preset processing steps on each sampling point, the method further includes:
[0026] Obtaining display attribute information of the display panel; the display attribute information includes: a mapping relationship between color input and output of the display panel and a gamma curve of the display panel, wherein the mapping relationship represents: when the display panel displays in response to test color data, a relationship between a third color coordinate of an actually displayed color in a third color space and a linear coordinate of the test color data, wherein the linear coordinate of the test color data is obtained by performing a nonlinear transformation on the first color coordinate of the test color data in the first color space according to the gamma curve.
[0027] In some embodiments, the first color space is an RGB space, the second color space is a LAB space, and the third color space is an XYZ space.
[0028] In some embodiments, establishing a sampling point space according to first color coordinates of a plurality of sampling points in a first color space specifically includes:
[0029] Establishing a three-dimensional coordinate system, the three-dimensional coordinate system including a first coordinate axis extending along a first direction, a second coordinate axis extending along a second direction, and a third coordinate axis extending along a third direction;
[0030] According to a preset number of sampling points, a plurality of sampling points are equally spaced along the first direction, the second direction, and the third direction in the sampling point space; every eight adjacent sampling points serve as vertices to form a sampling cube, and all sampling cubes constitute the sampling point space;
[0031] The coordinates of the sampling point in the sampling point space are consistent with the first color coordinates of the sampling point.
[0032] In some embodiments, determining the theoretical color coordinates of the source sampling point in the second color space according to a standard conversion rule between the first color space and the second color space specifically includes:
[0033] converting a first color coordinate of the source sampling point in the first color space into a linear coordinate according to a video display standard of the display panel;
[0034] Determining the color coordinates of the source sampling point in the third color space according to the linear coordinates and a conversion rule between the first color space and the third color space;
[0035] The theoretical color coordinates of the source sampling point in the second color space are determined according to the color coordinates of the source sampling point in the third color space and a conversion rule between the third color space and the second color space.
[0036] In a second aspect, an embodiment of the present disclosure provides a color correction method, including:
[0037] In response to raw color data of a pixel, converting the raw color data into first color coordinates in the first color space;
[0038] Mapping the first color coordinate of the original color data to a sampling point space to obtain a mapping point corresponding to the first color coordinate of the original color data in the sampling point space, and determining, based on the mapping coordinates of the mapping point, first color coordinates of a plurality of reference points corresponding to the mapping coordinates in the first color space;
[0039] Determining the target color coordinates of each reference point based on the first color coordinates of each reference point and a color mapping table generated using the above method;
[0040] According to the target color coordinates of each reference point, corrected color data of the pixel is obtained through an interpolation algorithm.
[0041] In some embodiments, the sampling point space includes a plurality of sampling cubes, each of which is defined by eight sampling points as vertices, and each of which is divided into a plurality of tetrahedrons;
[0042] Determining, according to the mapping coordinates of the mapping points, first color coordinates of a plurality of reference points corresponding to the mapping coordinates in the first color space specifically includes:
[0043] Determine the tetrahedron where the mapping point is located, and use each vertex of the tetrahedron as a reference point;
[0044] The coordinates of the reference point in the sampling point space are used as the first color coordinates of the reference point.
[0045] In some embodiments, obtaining the corrected color data of the pixel by an interpolation algorithm according to the target color coordinates of each reference point includes:
[0046] Obtain the corrected color data of the pixel using the following formula;
[0047]
[0048] Wherein, p represents a mapping point, and p0, p1, p2, and p3 represent vertices of the tetrahedron where the mapping point is located. is the corrected color data; f(p0), f(p1), f(p2), and f(p3) are the target color coordinates of the four vertices of the tetrahedron respectively; (x0, y0, z0) are the coordinates of vertex p0 relative to the reference point; (x1, y1, z1) are the coordinates of vertex p1 relative to the reference point, (x2, y2, z2) are the coordinates of vertex p2 relative to the reference point, (x3, y3, z3) are the coordinates of vertex p3 relative to the reference point, and (x3, y3, z3) are the coordinates of vertex p3 relative to the reference point; (z, y, z) is the first color coordinate of the mapping point; wherein the reference point is one of the vertices of the sampling cube where the mapping point is located.
[0049] In a third aspect, an embodiment of the present disclosure provides a device for generating a color mapping table, comprising:
[0050] A space establishing module is configured to establish a sampling point space according to first color coordinates of a plurality of sampling points in the first color space;
[0051] a processing module configured to perform a preset processing step on each sampling point to obtain a target color coordinate of each sampling point in the first color space, and generate the color mapping table according to the first color coordinate and the target color coordinate of each sampling point;
[0052] The preset processing steps for each sampling point include:
[0053] Taking the sampling point as a source sampling point, determining a target sampling point corresponding to the source sampling point;
[0054] The target sampling points are processed to obtain the target color coordinates.
[0055] In a fourth aspect, an embodiment of the present disclosure provides a color correction device, including:
[0056] a conversion module configured to convert the original color data of the pixel into first color coordinates in the first color space in response to the original color data of the pixel;
[0057] a reference point acquisition module configured to map the first color coordinate of the original color data into a sampling point space, obtain a mapping point corresponding to the first color coordinate of the original color data in the sampling point space, and determine, based on the mapping coordinates of the mapping point, first color coordinates of a plurality of reference points corresponding to the mapping coordinates in the first color space;
[0058] a target color determination module configured to determine the target color coordinates of each reference point based on the first color coordinates of each reference point and a color mapping table; the color mapping table is generated by the above-mentioned generation device;
[0059] The interpolation module is configured to obtain the corrected color data of the pixel through an interpolation algorithm according to the target color coordinates of each reference point.
[0060] In a fifth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, and the computer program implements the above-mentioned method when executed by a processor.
[0061] In a sixth aspect, an embodiment of the present disclosure provides a display device, including:
[0062] one or more processors;
[0063] a memory for storing one or more programs;
[0064] When the one or more programs are executed by the one or more processors, the one or more processors implement the above-described method. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following detailed description, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:
[0066] FIG1A is a schematic diagram showing the color width capacity distribution at different positions on the chromaticity diagram.
[0067] FIG1B is a comparison diagram of the chromaticity diagram and the color width capacity distribution in the CIELAB color space.
[0068] FIG2 is a schematic diagram of a method for generating a color mapping table provided in some embodiments of the present disclosure.
[0069] FIG3A is a schematic diagram of preset processing steps provided in some embodiments of the present disclosure.
[0070] FIG3B is a schematic diagram of preset processing steps provided in other embodiments of the present disclosure.
[0071] FIG4 is a schematic diagram of a method for generating a color mapping table provided in some other embodiments of the present disclosure.
[0072] FIG5A is a flowchart of an optional implementation method of step S10 provided in some embodiments of the present disclosure.
[0073] FIG5B is a schematic diagram of a sampling point space provided in some embodiments of the present disclosure.
[0074] FIG6 is a schematic diagram of preset processing steps provided in other embodiments of the present disclosure.
[0075] FIG7 is a flowchart of a target search process provided in some embodiments of the present disclosure.
[0076] FIG8 is a schematic diagram of a color correction method provided in some embodiments of the present disclosure.
[0077] FIG9 is a schematic diagram showing a sampling cube divided into a plurality of tetrahedrons provided in some embodiments of the present disclosure.
[0078] FIG10 is a schematic diagram of a mapping point p in a tetrahedron.
[0079] FIG11 is a schematic diagram of a device for generating a color mapping table provided in some embodiments of the present disclosure.
[0080] FIG12 is a schematic diagram of a color correction device provided in some embodiments of the present disclosure.
[0081] FIG13 is a schematic diagram of a display device provided in some embodiments of the present disclosure. DETAILED DESCRIPTION
[0082] To enable those skilled in the art to better understand the technical solutions of the present disclosure, the color mapping table generation method and device, color correction method and device, display device, and computer-readable medium provided by the present disclosure are described in detail below with reference to the accompanying drawings.
[0083] Example embodiments will be described more fully hereinafter with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the scope of this disclosure to those skilled in the art.
[0084] The terms used herein are used only to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a," "an," and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements, and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or groups thereof is not excluded.
[0085] It will be understood that although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited to these terms. These terms are only used to distinguish one element from another. Therefore, without departing from the teachings of the present disclosure, the first element, first component, or first module discussed below may be referred to as the second element, second component, or second module.
[0086] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless expressly defined as such herein.
[0087] Before introducing the embodiments of the present disclosure, the color space involved and related concepts are first introduced.
[0088] CIE-1931 XYZ Color Space: The International Commission on Illumination (CIE) first defined a color space model in 1931 using purely mathematical methods. This CIE 1931 XYZ color space covers the full range of colors perceptible to the human eye and is independent of any specific physical implementation. When a color is represented in XYZ format, it will render consistently on any display that supports the XYZ standard, regardless of the display's specific physical properties. Because XYZ coordinates include information about the energy of the light source, their values are unlimited.
[0089] CIE-1931 xyY color space: From the CIE tristimulus values, three orthogonal quantities x, y, and z can be derived, namely:
[0090] x=X / (X+Y+Z), y=Y / (X+Y+Z), z=Z / (X+Y+Z)
[0091] The x and y components are used to measure the chromaticity of the color, while the brightness (luminance) of the color is designed to be represented by the Y component of the tristimulus value. This is the CIE xyY space.
[0092] The CIE-1931 xyY color space is defined based on the principle that for a given color, if its lightness is increased, the luminous flux of each primary color must also be increased proportionally, while maintaining the X:Y:Z ratio. This is the only way to match the color. Since chromaticity depends only on wavelength (hue) and purity, and not on total radiant energy, when calculating color chromaticity, X, Y, and Z can be normalized by total radiant energy (X+Y+Z). Equivalently, by considering only the X+Y+Z=1 cross-section, the color matching equation simplifies to x+y+z=1. Since z can be derived from x+y+z=1, color can be expressed using only x and y.
[0093] Color gamut: Color gamut refers to the total range of colors a color system can produce. In a narrow sense, color gamut refers specifically to the technical capabilities of a color display system (such as a monitor or printer). The CIE chromaticity diagram encompasses all colors visible to the human eye. This gamut is too large for a color display system to fully support. A practical system can often only support a subspace within the chromaticity diagram, typically defined by the xy values of three primary colors. These three primary colors form a triangle, defining the maximum range of colors a color system can produce.
[0094] Mathematically, the color gamut triangle contains an infinite number of color points. However, practical display systems are all digital, so a series of discrete points must be selected from the continuous color gamut according to certain rules to form the color gamut actually supported by the system. If the system uses 8 bits to represent colors, the color gamut contains 256 × 256 × 256 = 16,777,216 colors.
[0095] Monitors and commercial displays have a unique display color gamut upon manufacture. The goal of color calibration is to display the true color of the input signal using a display with this unique color gamut. Specifically, the input signal's color coordinates (x, y) are equal to the actual measured x, y values at the output. For the same input signal, the input signal's R, G, B values are converted through a standard conversion process to theoretical X, Y, Z values. The theoretical x, y values are then derived from these theoretical X, Y, Z values. Conversely, the input signal's R, G, B values are processed through a color mapping table to obtain calibrated R, G, B values. These calibrated R, G, B values are then used to derive the displayed X, Y, Z values. Finally, the displayed X, Y values are derived from the displayed X, Y, Z values. If the displayed x, y values match the theoretical x, y values, color calibration is complete. The standard conversion process used to convert the input signal's R, G, B values into theoretical X, Y, Z values involves two steps: the first involves a nonlinear transformation (EOTF) to convert the input signal's R, G, B values (nonlinear signals) into linear signals. The rules for this nonlinear transformation are specific to video display standards. The second step converts the linear R, G, B values into values in the XYZ space.
[0096] Color Width Capacity: Color width capacity varies at different locations on the chromaticity diagram. Figure 1A shows the distribution of color width capacity at different locations on the chromaticity diagram. In Figure 1A, the ellipse is magnified nearly 10 times its actual size for enhanced clarity. In Figure 1A, the color coordinates within the same ellipse differ, but the human eye cannot distinguish these differences. Colors with similar colors can be found at similar target values.
[0097] Perceptually Uniform Color Space: A color space is considered perceptually uniform if a unit change in color value at any location always corresponds to the same perceptual change. A perceptually uniform space is characterized by the same color tolerance everywhere, regardless of the specific color value. By this definition, the CIE-1931 xyY space is perceptually non-uniform. To standardize color calculations and comparisons, the CIE introduced a uniform color space. The CIE L*a*b*, also known as the CIELAB color space, has the primary advantage of better linearity between color distances, consistent with human perception, particularly for accurately describing darker colors. A minor drawback is that this linear relationship may vary when describing the yellow region, meaning the diameter of the color tolerance circle varies around yellow. Figure 1B compares the color tolerance distribution in a chromaticity diagram and the CIELAB color space. As shown in Figure 1B, the CIELAB color space is perceptually uniform.
[0098] The CIELAB color model is mathematically defined as:
[0099]
[0100] in,
[0101]
[0102]
[0103]
[0104] In the above formula, L* represents the lightness of the color, ranging from 0 to 100; a* and b* represent the chromaticity, ranging from -128 to 128, where a* represents the red-green axis (red + green -), and b* represents the yellow-blue axis (yellow + blue -). Xn, Yn, Zn represent the X, Y, and Z values of white light.
[0105] The present disclosure provides a method for generating a color mapping table, which is used to perform color correction on a display panel. FIG2 is a schematic diagram of a method for generating a color mapping table provided in some embodiments of the present disclosure. As shown in FIG2 , the method for generating a color mapping table includes:
[0106] Step S10: Establish a sampling point space according to first color coordinates of a plurality of sampling points in the first color space.
[0107] In some embodiments, the first color space can be any one of the HSV (hue, saturation, value) color space, the YUV (brightness, chroma) color space, the CMYK (cyan, magenta, yellow, black) color space, and the RGB (red, green, blue) color space.
[0108] In some embodiments, the sampling point space is a space defined by three coordinate axes, and the sampling line space includes multiple sampling points. For example, the first color space is an RGB color space, and the first color coordinate is (R j , G j , B j ), respectively representing the R value, G value, and B value of the sampling point in the first color space, the three coordinate axes of the sampling point space can be used to represent the R value, G value, and B value of the sampling point, respectively, or to represent the normalized R value, normalized G value, and normalized B value of the sampling point, respectively.
[0109] Step S20: performing a preset processing step on each sampling point to obtain the target color coordinates of each sampling point in the first color space, and generating a color mapping table according to the first color coordinates and the target color coordinates of each sampling point.
[0110] FIG3A is a schematic diagram of preset processing steps provided in some embodiments of the present disclosure. As shown in FIG3A , the preset processing steps for each sampling point include:
[0111] Step S20a: take the sampling point as the source sampling point and determine the target sampling point corresponding to the source sampling point.
[0112] The theoretical color coordinates and actual color coordinates of the source sampling point in the second color space, as well as the actual color coordinates of other sampling points in the second color space, can be obtained. The target sampling point is a sampling point whose actual color coordinates are close to the theoretical color coordinates of the source sampling point.
[0113] Step S20b: Process the target sampling point to obtain the target color coordinates.
[0114] In the embodiment of the present disclosure, for each sampling point in the sampling point space, a corresponding target sampling point is determined through a preset processing step, and the target sampling point is processed to obtain a target color coordinate. In this way, the first color coordinate and the target color coordinate of each sampling point are recorded in the generated color mapping table. When color correction is performed on a certain pixel using the color mapping table, one or more sampling points corresponding to the pixel can be determined based on the first color coordinate of the pixel and the first color coordinate of each sampling point in the color mapping table. Then, based on the target color coordinates of the one or more sampling points, the color data of the pixel after correction is determined.
[0115] FIG3B is a schematic diagram of preset processing steps provided in some other embodiments of the present disclosure. FIG3B is a specific implementation of FIG3A . As shown in FIG3B , the preset processing steps for each sampling point include steps S20a and S20b:
[0116] Step S20a: take the sampling point as the source sampling point and determine the target sampling point corresponding to the source sampling point. Step S20a may specifically include steps S21 and S22:
[0117] Step S21: Taking the sampling point as the source sampling point, and determining the theoretical color coordinates of the source sampling point in the second color space according to a standard conversion rule between the first color space and the second color space.
[0118] Step S22: Determine a target sampling point corresponding to the source sampling point based on the actual color coordinates of at least some of the sampling points in the sampling point space in the second color space and the theoretical color coordinates; wherein the actual color coordinates of each sampling point in the second color space are determined based on at least the display attribute information of the display panel and the first color coordinates of the sampling point.
[0119] In some embodiments, the target sampling point may be a sampling point whose actual color coordinates are close to the theoretical color coordinates. For example, the difference between the actual color coordinates of the target sampling point in the second color space and the theoretical color coordinates is less than a preset threshold. Alternatively, the difference between the actual color coordinates of the target sampling point in the second color space and the theoretical color coordinates is less than the difference between the actual color coordinates of other sampling points and the theoretical color coordinates.
[0120] In some embodiments, the display attribute information of the display panel is information that can reflect the physical characteristics of the display panel. In one example, the display attribute information may include the gamma curve of the display panel and the mapping relationship between the input color and the output color of the display panel. The mapping relationship can be expressed as a mapping relationship between linear RGB coordinates and XYZ coordinates. Based on the mapping relationship between the input color and the output color of the display panel and the first color coordinates of the sampling point, the color coordinates of the color actually displayed by the display panel in the XYZ space can be determined, and then the actual color coordinates of the target sampling point in the second color space can be obtained by conversion. The specific description is given below in conjunction with the mapping relationship between the input color and the output color of the display panel, and will not be repeated here.
[0121] Step S20b: Process the target sampling point to obtain the target color coordinates. Step S20b may specifically include steps S23 and S24.
[0122] Step S23 : performing a nonlinear transformation on the first color coordinate of the target sampling point according to the video display standard of the display panel to obtain the linear coordinate of the target sampling point.
[0123] In some embodiments, the first color coordinates of each sampling point in the first color space are non-linear coordinates. In step S23 , the non-linear coordinates may be converted into linear coordinates according to a non-linear conversion rule corresponding to the video display standard.
[0124] Step S24: Perform nonlinear transformation on the linear coordinates according to the display attribute information to obtain target color coordinates.
[0125] The gamma curve of the display panel may be used to perform nonlinear transformation on the linear coordinates.
[0126] In an embodiment of the present disclosure, for a source sampling point in the sampling point space, a target sampling point corresponding to the source sampling point is determined based on the actual color coordinates of at least some of the sampling points in the second color space and the theoretical color coordinates. Furthermore, a nonlinear transformation is performed on the first color coordinates of the target sampling point according to a video display standard to obtain linear coordinates. The linear coordinates are then nonlinearly transformed using display attribute information of a display panel to obtain the target color coordinates. In this case, when the display panel displays according to the target color coordinates, the color actually displayed by the display panel is close to or consistent with the color represented by the first color coordinates of the source sampling point. Therefore, the color mapping table obtained using the above method can better perform color correction.
[0127] In some embodiments, the first color space is an RGB color space and the second color space is a LAB color space. Since the LAB color space is a perceptually uniform color space, when the actual color coordinates of the target sampling point in the second color space are close to the theoretical color coordinates of the source sampling point in the second color space, the display panel displays the color according to the target color coordinates, and the displayed color is closer to the color represented by the source sampling point.
[0128] FIG4 is a schematic diagram of a method for generating a color mapping table provided in some other embodiments of the present disclosure. As shown in FIG4 , the method for generating a color mapping table includes step S01 , which is performed before step S20 , for example, before step S10 .
[0129] Step S01: Obtain display attribute information of a display panel. The display attribute information includes: a mapping relationship between color input and output of the display panel and a gamma curve of the display panel, wherein the mapping relationship represents: when the display panel displays test color data in response to the test color data, a relationship between a third color coordinate of a color actually displayed in a third color space and a linear coordinate of the test color data, wherein the linear coordinate of the test color data is obtained by performing a nonlinear transformation of the first color coordinate of the test color data in the first color space according to the gamma curve.
[0130] For example, the first color space is an RGB color space, and the third color space is an XYZ color space. The first color coordinates of the test color data in the first color space are denoted as (Ri, Gi, Bi), where Ri ranges from 0 to 255, Gi ranges from 0 to 255, and Bi ranges from 0 to 255, resulting in a total of 256*256*256 test color data. In step S01, each time the display panel displays a test color data, the color displayed by the display panel is captured, and the third color coordinates of the color displayed by the display panel in the third color space are obtained. In addition, the linear coordinates of the test color data are obtained based on the gamma curve of the display panel and the first color coordinates (Ri, Gi, Bi), thereby obtaining a mapping relationship between the third color coordinates and the linear coordinates of the test color data, that is, a mapping relationship between the XYZ coordinates and the linear RGB coordinates. When capturing the colors displayed by the display panel, a color analyzer (e.g., CA410) can be used for color capture.
[0131] Among them, the gamma curve of the display panel can be expressed as, Among them, y 输出 is the brightness displayed by the display panel, x 输入 is the input grayscale of the display panel. The input grayscale can range from 0 to 255. An input grayscale of 0 means that the display panel displays the color of Ri = 0, Gi = 0, and Bi = 0; an input grayscale of 1 means that the display panel displays the color of Ri = 1, Gi = 1, and Bi = 1; and so on. Based on the input grayscale and the brightness displayed by the display panel, a gamma curve can be fitted. The linear coordinates of the test color data are denoted as (Ri', Gi', Bi'), then Ri' = (Ri) 1 / γ ; Gi'=(Gi) 1 / γ ; Bi'=(Bi) 1 / γ .
[0132] It should be noted that the above example is based on an example in which the display color of the display panel is 8 bits. When the display color of the display panel is other bit numbers, the value ranges of Ri, Gi, and Bi are other ranges.
[0133] FIG5A is a flowchart of an optional implementation of step S10 provided in some embodiments of the present disclosure. As shown in FIG5A , step S10 includes:
[0134] S11. Establish a three-dimensional coordinate system, where the three-dimensional coordinate system includes a first coordinate axis extending along a first direction, a second coordinate axis extending along a second direction, and a third coordinate axis extending along a third direction.
[0135] S12. Arrange a plurality of sampling points at equal intervals along a first direction, a second direction, and a third direction in the sampling point space according to a preset number of sampling points; each eight adjacent sampling points serve as vertices to form a sampling cube, and all the sampling cubes constitute the sampling point space. The coordinates of the sampling points in the sampling point space are consistent with the first color coordinates of the sampling points. For example, the first color space is an RGB space, and the three coordinate axes of the three-dimensional coordinate system represent the R value, G value, and B value of the sampling points in the first color space, respectively.
[0136] Figure 5B is a schematic diagram of the sampling point space provided in some embodiments of the present disclosure. As shown in Figure 5B, each black dot represents a sampling point, wherein the multiple sampling points in the sampling point space are evenly distributed. It should be noted that the number of sampling points in Figure 5B is only an example, and the specific number can be set as needed. For example, in the sampling point space, eight points (0, 0, 0), (0, 255, 0), (255, 255, 0), (255, 0, 0), (0, 0, 255), (0, 255, 255), (255, 255, 255), (255, 0, 255) define a large cube. This cube is divided into 16 equal parts in three directions to obtain 16*16*16 sampling cubes. The vertices of the sampling cubes are sampling points, and there are a total of 17*17*17 sampling points.
[0137] FIG6 is a schematic diagram of the preset processing steps provided in some other embodiments of the present disclosure, wherein FIG6 is a specific implementation scheme of FIG4. As shown in FIG6, the preset processing steps for each sampling point include the following steps S21 to S24:
[0138] Step S21: Taking the sampling point as the source sampling point, and determining the theoretical color coordinates of the source sampling point in the second color space according to a standard conversion rule between the first color space and the second color space.
[0139] In some embodiments, according to the standard conversion rule between the first color space and the second color space, the process of determining the theoretical color coordinates of the source sampling point in the second color space may specifically include steps S21a to S21c:
[0140] Step S21a: converting the first color coordinates of the source sampling point in the first color space into linear coordinates according to the video display standard of the display panel.
[0141] For example, each video display standard corresponds to a nonlinear conversion rule for converting a first color coordinate in a first color space into a linear coordinate.
[0142] Among them, the optional video display standards of the display panel may include: BT2020, BT709, DCIP3, BT2100-HLG and BT2100-PQ.
[0143] For BT2020 and BT709, the nonlinear conversion rules of both are shown in the following formula (1-1):
[0144]
[0145]
[0146] For DCI-P3, the nonlinear conversion rule is as follows (1-2):
[0147] E=E' 2.6 (1-2)
[0148] For BT2100-HLG, its nonlinear conversion rule is shown in the following formula (1-3):
[0149] For 0≤E'≤1 / 2
[0150] For 1 / 2 <E'≤1
[0151] a=0.17883277,b=1-4a,c=0.5-a ln(4a) (1-3)
[0152] For BT2100-PQ, its nonlinear conversion rule is shown in the following equation (1-4):
[0153]
[0154] m1=2610 / 16384
[0155] m2=2523 / 4096×128
[0156] c1=3424 / 4096=c3-c2+1
[0157] c2=2413 / 4096×32
[0158] c3=2392 / 4096×32 (1-4)
[0159] In the formulas of the above nonlinear transformation rules, E' is a nonlinear coordinate, that is, a first color coordinate of the sampling point in the first color space, and E is a linear coordinate.
[0160] Step S21b: determining the color coordinates of the source sampling point in the third color space according to the linear coordinates of the source sampling point and the conversion rule between the first color space and the third color space.
[0161] In some embodiments, the third color space is an XYZ space. The conversion rule between the first color space and the third color space is expressed as follows (2-1):
[0162]
[0163] The linear coordinates of the source sampling point are (r, g, b), and the values of r, g, and b determine the proportional relationship between the three primary colors. The color coordinates of the source sampling point in the third color space are (X, Y, Z).
[0164] In formula (2-1), These are the color coordinates of the three primary colors defined in different video display standards. Their values are shown in Table 1 below:
[0165] Table 1:
[0166]
[0167] In addition, in formula (2-1), in, are the tristimulus values of the white point.
[0168] Step S21c: Determine the theoretical color coordinates of the source sampling point in the second color space according to the color coordinates of the source sampling point in the third color space and the conversion rule between the third color space and the second color space.
[0169] The third color space is XYZ space, and the second color space is LAB space. The conversion rules between the two are shown in equations (0-1) and (0-2) above. Based on equations (0-1) and (0-2), the color coordinates of the source sampling point in the second color space can be determined and used as the theoretical color coordinates.
[0170] Step S22: Determine a target sampling point corresponding to the source sampling point based on the actual color coordinates of at least some of the sampling points in the sampling point space in the second color space and the theoretical color coordinates. The actual color coordinates of each sampling point in the second color space are determined based on at least the display attribute information of the display panel and the first color coordinates of the sampling point.
[0171] The nonlinear first color coordinates of the sampling point in the first color space can be converted into linear coordinates according to the nonlinear conversion rule. Then, the actual color coordinates of the sampling point in the third color space are determined according to the mapping relationship between the input color and the output color of the display panel obtained in step S01. Thereafter, the actual color coordinates of the sampling point in the second color space are determined according to the conversion rule between the third color space and the second color space.
[0172] In some embodiments, step S22 may include at least one target search process. FIG7 is a flow chart of a target search process provided in some embodiments of the present disclosure. As shown in FIG7 , each target search process includes:
[0173] Step S22a: Determine a spherical search area with the first sampling point as the center and the first preset value as the radius.
[0174] The RGB coordinate values of a color with the same color coordinates in the color gamuts of different video standards will not differ significantly. The first preset value can be determined based on the difference in RGB coordinates of the color with the same color coordinates in different color gamuts. In some embodiments, the difference in RGB coordinates of the color with the same color coordinates in different color gamuts does not exceed the first preset value. In one example, the first preset value is less than or equal to 0.35*Max, where Max is the maximum value of the coordinate values of each dimension in the first color coordinates. For example, if the display panel displays 8-bit colors, the first preset value is less than or equal to 0.35*255.
[0175] Step S22b: Determine whether there is at least one sampling point in the spherical search area whose actual color coordinates in the second color space differ from the theoretical color coordinates by less than a preset threshold value. If so, execute step S22c. Otherwise, execute step S22d.
[0176] If the actual color coordinates of a sampling point in the second color space are marked as (L1, a1, b1) and the theoretical color coordinates are marked as (L2, a2, b2), then the coordinate difference between the two coordinates is Calculate according to the following formula (3-1):
[0177]
[0178] in,
[0179] That is, it is a quantitative indicator for evaluating the closeness of the colors represented by two coordinate points in the LAB space. When the threshold is greater than 1.5, the two colors can be distinguished by the naked eye. Therefore, in some embodiments of the present disclosure, the preset threshold is set to a value less than or equal to 1.5, so that the final color mapping table generated can restore more accurate colors when used for color correction. For example, the preset threshold is equal to 1.5.
[0180] Step S22c: taking one of the sampling points that meets the conditions in step S22b as the target sampling point.
[0181] In some embodiments, when it is determined in step S22b that there is a sampling point in the spherical search area that meets the conditions (that is, when the coordinate difference between the actual color coordinates of the sampling point in the second color space and the theoretical color coordinates is less than a preset threshold), the sampling point is used as the target sampling point; when it is determined in step S22b that multiple (for example, M) sampling points meet the conditions, the minimum coordinate difference is selected from the M coordinate differences corresponding to the M sampling points, and the sampling point corresponding to the minimum coordinate difference is used as the target sampling point.
[0182] Step S22d: determine whether the current process is the Nth target search process. If so, use the sampling point corresponding to the minimum coordinate difference obtained in the previous N target search processes as the target sampling point; if not, enter the next target search process.
[0183] Wherein, N is a preset integer greater than 1; the first sampling point in the first target search process is the source sampling point, and in each target search process after the first target search process, the first sampling point is the sampling point corresponding to the minimum coordinate difference obtained in the previous target search process.
[0184] The process of step S22 is described below with reference to a specific example. In one example, N is 3. The RGB coordinates of the source sampling point are (0, 0, 32), that is, the coordinates of the source sampling point in the sampling point space are (0, 0, 32). First, a first spherical search area is determined with the source sampling point as the center and a first preset value as the radius; for the source sampling point, the RGB coordinates of the source sampling point are converted to linear coordinates according to the above nonlinear conversion rule, and then the linear coordinates are converted to theoretical XYZ coordinates according to the above formula (2-1), and then the theoretical XYZ coordinates are converted to LAB coordinates, which are recorded as theoretical LAB coordinates, that is, theoretical color coordinates. For each sampling point in the first spherical search area, the RGB coordinates of each sampling point are converted to linear coordinates according to the above nonlinear conversion rule, and then the display XYZ coordinates of each sampling point are found according to the mapping relationship between the input and output of the display panel obtained in the above step S01 (the mapping relationship between linear RGB coordinates and XYZ coordinates), and then the display XYZ coordinates are converted to LAB coordinates, which are recorded as actual LAB coordinates, that is, actual color coordinates. Assume that in the first spherical search area, the difference △E between the actual LAB coordinates of the sampling point with coordinates (0,0,16) and the theoretical LAB coordinates of the source sampling point is less than the preset threshold, then the sampling point with coordinates (0,0,16) is used as the target sampling point. Assume that in the first spherical search area, the coordinate difference △E between the actual LAB coordinates of any sampling point and the theoretical LAB coordinates of the source sampling point is greater than the preset threshold, and compared with the △E corresponding to other sampling points, the △E corresponding to the sampling point with coordinates (0,0,16) is the smallest, then with (0,0,16) as the center and the first preset value as the radius, determine the second spherical search area for the second search, and assume that there is a sampling point in the second spherical search area, and the coordinate difference △E between the actual LAB coordinates of the sampling point and the theoretical LAB coordinates of the source sampling point is less than the preset threshold, then the sampling point is the target sampling point; assuming that the △E of each sampling point in the second spherical search area is greater than the preset threshold, then determine the third spherical search area and perform a third search, if the △E of each sampling point in the third spherical search area is greater than the preset threshold, then select the smallest △E from all △Es obtained in the three searches, and take the sampling point corresponding to the smallest △E as the target sampling point.
[0185] Continuing to refer to FIG6 , after the target sampling point is determined, the following steps S23 to S24 are continued:
[0186] Step S23 : performing a nonlinear transformation on the first color coordinate of the target sampling point according to the video display standard of the display panel to obtain the linear coordinate of the target sampling point.
[0187] The first color coordinate of the target sampling point is a nonlinear coordinate, and the nonlinear coordinate can be converted into a linear coordinate according to the nonlinear conversion rule mentioned above.
[0188] Step S24: performing nonlinear transformation on the linear coordinates according to the display attribute information to obtain target color coordinates.
[0189] In step S24 , the linear coordinates of the target sampling point are converted into nonlinear coordinates according to the gamma curve of the display panel, and the nonlinear coordinates are used as the target color coordinates.
[0190] For example, the linear coordinates of the target sampling point are denoted as (r, g, b), the target color coordinates are denoted as (r', g', b'), and the gamma curve of the display panel is denoted as Then, r'=r 1 / γ , g'=g 1 / γ , b'=b 1 / γ .
[0191] FIG8 is a schematic diagram of a color correction method provided in some embodiments of the present disclosure. As shown in FIG8 , the color correction method includes the following steps S100 to S400:
[0192] Step S100 : In response to original color data of a pixel, convert the original color data into first color coordinates in a first color space.
[0193] In step S100, the pixel belongs to a specific target image, or the pixel belongs to a target frame in a specific target video. In some embodiments, color correction is performed on each pixel of the target image or target frame.
[0194] Step S200: Map the first color coordinates of the original color data to the sampling point space to obtain the mapping points corresponding to the first color coordinates of the original color data in the sampling point space, and determine the first color coordinates of multiple reference points corresponding to the mapping coordinates in the first color space based on the mapping coordinates of the mapping points.
[0195] Among them, the first color coordinate of the original color data is mapped to the sampling point space, that is, the coordinate values of each dimension of the first color coordinate are mapped separately, and the mapping point corresponding to a single first color coordinate is unique; a single mapping point corresponds to multiple reference points, and thus subsequent correction is performed based on the interpolation algorithm.
[0196] The reference point is a sampling point in the sampling point space, and the first color coordinates of the reference point in the first color space are consistent with the coordinates of the reference point in the sampling point space.
[0197] Step S300: Determine the target color coordinates of each reference point according to the first color coordinates of each reference point and a color mapping table.
[0198] The color mapping table is generated by the color mapping table generation method in the above embodiment. The color mapping table records the first color coordinates and the target color coordinates of each sampling point in the above sampling point space in the first color space.
[0199] Step S400: Obtain corrected color data of the pixel through an interpolation algorithm according to the target color coordinates of each reference point.
[0200] As described above, the sampling point space includes multiple sampling cubes, each defined by eight sampling points as vertices. Furthermore, the sampling cube can be divided into multiple tetrahedrons. FIG9 is a schematic diagram illustrating a sampling cube divided into multiple tetrahedrons, as provided in some embodiments of the present disclosure. As shown in FIG9 , the eight vertices of the sampling cube are p0 to p7, and the sampling cube is divided into six tetrahedrons, each defined by four vertices of the sampling cube.
[0201] In some embodiments, in step S200, first color coordinates of a plurality of reference points corresponding to the mapped coordinates in the first color space are determined according to the mapped coordinates of the mapped points, which specifically includes the following steps S201-S202:
[0202] Step S201: Determine the tetrahedron where the mapping point is located, and use each vertex of the tetrahedron as a reference point.
[0203] Step S202: Taking the coordinates of the reference point in the sampling point space as the first color coordinates of the reference point.
[0204] In some embodiments, the above step S400 may specifically include: obtaining the corrected color data of the pixel using the following formula (4);
[0205]
[0206] Where p represents the mapping point, p0, p1, p2, and p3 represent the vertices of the tetrahedron where the mapping point is located; is the corrected color data; f(p0), f(p1), f(p2), and f(p3) are the target color coordinates of the four vertices of the tetrahedron respectively; (x0, y0, z0) are the coordinates of vertex p0 relative to the reference point; (x1, y1, z1) are the coordinates of vertex p1 relative to the reference point, (x2, y2, z2) are the coordinates of vertex p2 relative to the reference point, (x3, y3, z3) are the coordinates of vertex p3 relative to the reference point, and (x3, y3, z3) are the coordinates of vertex p3 relative to the reference point; (x, y, z) are the coordinates of the mapping point relative to the reference point.
[0207] Among them, the reference point is one of the vertices of the sampling cube where the mapping point is located. It can be understood that the three coordinate axes of the sampling point space are used to represent the R value, G value and B value of the sampling point respectively. The coordinates of each vertex of the tetrahedron in the sampling point space are consistent with the first color coordinates corresponding to the vertex in the first color space. Therefore, x0 is the difference between the R value of vertex p0 and the R value of the reference point; y0 is the difference between the G value of vertex p0 and the G value of the reference point, and z0 is the difference between the B value of vertex p0 and the B value of the reference point; similarly, x1 is the difference between the R value of vertex p1 and the R value of the reference point; y1 is the difference between the G value of vertex p1 and the G value of the reference point, and z1 is the difference between the B value of vertex p1 and the B value of the reference point; x2 is the difference between the R value of vertex p2 and the R value of the reference point; y2 is the difference between the R value of vertex p 2, which is the difference between the G value of the mapping point and the G value of the reference point; z2, which is the difference between the B value of the vertex p2 and the B value of the reference point; x3, which is the difference between the R value of the vertex p3 and the R value of the reference point; y3, which is the difference between the G value of the vertex p3 and the G value of the reference point, z3, which is the difference between the B value of the vertex p3 and the B value of the reference point; x, which is the difference between the R value of the mapping point p and the R value of the reference point; y, which is the difference between the G value of the mapping point p and the G value of the reference point, z, which is the difference between the B value of the mapping point p and the B value of the reference point.
[0208] The derivation process of formula (4) is as follows:
[0209] Figure 10 is a schematic diagram of a mapping point p in a tetrahedron. As shown in Figure 10, the extension line of the line connecting the mapping point p and the vertex p3 intersects the plane where p0, p1, and p2 are located at point p. 02 , vertex p2 and intersection point p 02 The extension line of the connecting line intersects the line connecting p0 and p1 at point p 01 , click p 01 and point p 02 The length of the connection and p 01 The ratio of the length of the line connecting to p2 is U 02 ; p0 and p 01The ratio of the length of the line connecting p0 and p1 to the length of the line connecting p0 and p1 is U 01 ; Mapping point p and point p 02 The length of the line connecting the points p 02 and point p 03 The ratio of the lengths is U 03 .
[0210] in,
[0211] From formula (4-1), we can get:
[0212] Among them, w i represents the combination coefficient,
[0213] Then we can get:
[0214] in, V is the volume of the tetrahedron defined by p0, p1, p2, and p3; V0 is the volume of the tetrahedron defined by p, p1, p2, and p3; V1 is the volume of the tetrahedron defined by p, p0, p2, and p3; V2 is the volume of the tetrahedron defined by p, p0, p1, and p3; and V3 is the volume of the tetrahedron defined by p, p0, p1, and p2.
[0215] According to the above formulas (4-1) to (4-3) and Figure 10, the mapping points are converted into linear combinations of endpoints, and the linear combination coefficients conform to the relationship of volume ratios. The calculation process satisfies the following linear equations:
[0216]
[0217] According to Cramer's rule, each combination coefficient w can be obtained i , as follows:
[0218]
[0219]
[0220]
[0221] Thus, the above formula (4) can be derived.
[0222] Compared with the cubic linear interpolation algorithm, the above interpolation method in the present disclosure is simple to operate and can obtain the target color coordinates more accurately and quickly.
[0223] The present disclosure also provides a device for generating a color mapping table, wherein the color mapping table is used to perform color calibration on a display panel. FIG11 is a schematic diagram of a device for generating a color mapping table provided in some embodiments of the present disclosure. As shown in FIG11 , the device includes a space establishment module 10 and a processing module 20.
[0224] The space establishing module 10 is configured to establish a sampling point space according to first color coordinates of a plurality of sampling points in the first color space.
[0225] The processing module 20 is configured to perform preset processing steps on each sampling point to obtain the target color coordinates of each sampling point in the first color space, and to generate the color mapping table based on the first color coordinates and the target color coordinates of each sampling point. The preset processing steps for each sampling point include: using the sampling point as a source sampling point, determining a target sampling point corresponding to the source sampling point, and processing the target sampling point to obtain the target color coordinates.
[0226] In some embodiments, the sampling point is used as a source sampling point, and determining a target sampling point corresponding to the source sampling point includes: determining theoretical color coordinates of the source sampling point in the second color space according to a standard conversion rule between the first color space and the second color space; the second color space is a perceptually uniform color space; determining the target sampling point corresponding to the source sampling point based on the actual color coordinates and theoretical color coordinates of at least some of the sampling points in the sampling point space in the second color space; wherein the actual color coordinates of each sampling point in the second color space are determined based at least on display attribute information of the display panel and the first color coordinates of the sampling point. Processing the target sampling point to obtain the target color coordinates may specifically include: performing a nonlinear transformation on the first color coordinates of the target sampling point according to the video display standard of the display panel to obtain linear coordinates of the target sampling point; and performing a nonlinear transformation on the linear coordinates based on the display attribute information to obtain the target color coordinates.
[0227] In some embodiments, when acquiring the target sampling point corresponding to the source sampling point, the processing module 20 may acquire the target sampling point through at least one target search process. The target search process is described above in detail and will not be repeated here.
[0228] In some embodiments, the first color space is an RGB space, and the second color space is a LAB space.
[0229] In some embodiments, the generating device further includes a testing module configured to obtain display attribute information of the display panel. The display attribute information includes: a mapping relationship between color input and output of the display panel and a gamma curve of the display panel, wherein the mapping relationship represents: when the display panel displays test color data in response to the test color data, a relationship between a third color coordinate of the color actually displayed in a third color space and a linear coordinate of the test color data, wherein the linear coordinate of the test color data is obtained by performing a nonlinear transformation of the first color coordinate of the test color data in the first color space according to the gamma curve. The third color space is an XYZ space.
[0230] FIG12 is a schematic diagram of a color correction device provided in some embodiments of the present disclosure. As shown in FIG12 , the color correction device includes: a conversion module 30 , a reference point acquisition module 40 , a target color determination module 50 , and an interpolation module 60 .
[0231] The conversion module 30 is configured to, in response to original color data of a pixel, convert the original color data into first color coordinates in the first color space.
[0232] The reference point acquisition module 40 is configured to map the first color coordinate of the original color data into a sampling point space, obtain a mapping point corresponding to the first color coordinate of the original color data in the sampling point space, and determine a plurality of reference points corresponding to the mapping coordinates based on the mapping coordinates of the mapping point.
[0233] The target color determination module 50 is configured to determine the target color coordinates of each reference point according to the color mapping table, wherein the color mapping table is generated by the above-mentioned generating device, and the color mapping table can be obtained in advance and stored in the color correction device.
[0234] The interpolation module 60 is configured to obtain the corrected color data of the pixel through an interpolation algorithm according to the target color coordinates of each reference point.
[0235] The process of obtaining the corrected color data through the interpolation algorithm has been described above and will not be repeated here.
[0236] The color correction device may be a Field Programmable Gate Array (FPGA).
[0237] FIG13 is a schematic diagram of a display device provided in some embodiments of the present disclosure. As shown in FIG13 , the display device includes:
[0238] One or more processors 901;
[0239] A memory 902 storing one or more programs, which, when executed by one or more processors, enables the one or more processors to implement the color mapping table generation method or color correction method in the above-mentioned embodiment;
[0240] One or more I / O interfaces 903 are connected between the processor and the memory and are configured to implement information exchange between the processor and the memory.
[0241] Among them, the processor 901 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 902 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read-write interface) 903 is connected between the processor 901 and the memory 902, and can realize information interaction between the processor 901 and the memory 902, including but not limited to a data bus (Bus), etc.
[0242] In some embodiments, the display device further includes a display panel, and the original color data corresponding to the image and video is transmitted to the display panel after correction; the display device can be a monitor, and color correction can be used to convert the input native screen color gamut into the target color gamut.
[0243] In some embodiments, the processor 901 , the memory 902 , and the I / O interface 903 are connected to each other via a bus, and further connected to other components of the computing device.
[0244] This embodiment also provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the color mapping table generation method or color correction method in the above embodiment is implemented. To avoid repeated description, the specific steps of the method are not repeated here.
[0245] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0246] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0247] It is understood that the above embodiments are merely exemplary embodiments for illustrating the principles of the present disclosure, and the present disclosure is not limited thereto. Those skilled in the art may make various modifications and improvements without departing from the spirit and substance of the present disclosure, and such modifications and improvements are also considered to be within the scope of protection of the present disclosure.
Claims
1. A method for generating a color mapping table, wherein the color mapping table is used to perform color correction on a display panel, the method comprising: Establishing a sampling point space according to first color coordinates of the plurality of sampling points in the first color space; Performing a preset processing step on each sampling point to obtain a target color coordinate of each sampling point in the first color space, and generating the color mapping table according to the first color coordinate and the target color coordinate of each sampling point; The preset processing steps for each sampling point include: Taking the sampling point as a source sampling point, determining a target sampling point corresponding to the source sampling point; The target sampling points are processed to obtain the target color coordinates.
2. The method according to claim 1, wherein taking the sampling point as a source sampling point and determining a target sampling point corresponding to the source sampling point comprises: Taking the sampling point as a source sampling point, and determining the theoretical color coordinates of the source sampling point in the second color space according to a standard conversion rule between the first color space and the second color space; determining a target sampling point corresponding to the source sampling point based on actual color coordinates of at least some of the sampling points in the sampling point space in the second color space and the theoretical color coordinates; wherein the actual color coordinates of the sampling point in the second color space are determined based on at least display attribute information of the display panel and the first color coordinates of the sampling point; The processing of the target sampling point to obtain the target color coordinates includes: performing a nonlinear transformation on the first color coordinate of the target sampling point according to a video display standard of the display panel to obtain a linear coordinate of the target sampling point; The linear coordinates are nonlinearly transformed according to the display attribute information to obtain the target color coordinates.
3. The method according to claim 2, wherein: Determining a target sampling point corresponding to the source sampling point based on actual color coordinates of at least some of the sampling points in the sampling point space in the second color space and the theoretical color coordinates specifically includes: performing at least one target search process, wherein each target search process includes: Determine a spherical search area with the first sampling point as the center and the first preset value as the radius; If a coordinate difference between an actual color coordinate of at least one sampling point in the spherical search area and the theoretical color coordinate in the second color space is less than a preset threshold, one of the at least one sampling point is used as the target sampling point; Otherwise, determine whether the current process is the Nth target search process. If so, use the sampling point corresponding to the minimum coordinate difference obtained in the previous N target search processes as the target sampling point; if not, enter the next target search process; Wherein, N is a preset integer greater than 1; the first sampling point in the first target search process is the source sampling point; in each target search process after the first one, the first sampling point is the sampling point corresponding to the minimum coordinate difference obtained in the previous target search process.
4. The method according to claim 3, wherein: Taking one of the at least one sampling point as the target sampling point specifically includes: The sampling point corresponding to the minimum coordinate difference among the at least one sampling point is used as the target sampling point.
5. The method according to claim 4, wherein The first preset value is greater than or equal to the difference between RGB coordinates of colors with the same color coordinate in different color gamuts.
6. The method according to any one of claims 1 to 5, wherein Before executing the preset processing steps for each sampling point, it also includes: Obtaining display attribute information of the display panel; the display attribute information includes: a mapping relationship between color input and output of the display panel and a gamma curve of the display panel, wherein the mapping relationship represents: when the display panel displays in response to test color data, a relationship between a third color coordinate of an actually displayed color in a third color space and a linear coordinate of the test color data, wherein the linear coordinate of the test color data is obtained by performing a nonlinear transformation on the first color coordinate of the test color data in the first color space according to the gamma curve.
7. The method according to claim 6, wherein: The first color space is an RGB space, the second color space is a LAB space, and the third color space is an XYZ space.
8. The method according to any one of claims 1 to 7, wherein Establishing a sampling point space according to first color coordinates of the plurality of sampling points in the first color space specifically includes: Establishing a three-dimensional coordinate system, the three-dimensional coordinate system including a first coordinate axis extending along a first direction, a second coordinate axis extending along a second direction, and a third coordinate axis extending along a third direction; According to a preset number of sampling points, a plurality of sampling points are equally spaced along the first direction, the second direction, and the third direction in the sampling point space; every eight adjacent sampling points serve as vertices to form a sampling cube, and all sampling cubes constitute the sampling point space; The coordinates of the sampling point in the sampling point space are consistent with the first color coordinates of the sampling point.
9. The method according to any one of claims 2 to 7, wherein Determining the theoretical color coordinates of the source sampling point in the second color space according to a standard conversion rule between the first color space and the second color space specifically includes: converting a first color coordinate of the source sampling point in the first color space into a linear coordinate according to a video display standard of the display panel; Determining the color coordinates of the source sampling point in the third color space according to the linear coordinates and a conversion rule between the first color space and the third color space; The theoretical color coordinates of the source sampling point in the second color space are determined according to the color coordinates of the source sampling point in the third color space and a conversion rule between the third color space and the second color space.
10. A color correction method, comprising: In response to raw color data of a pixel, converting the raw color data into first color coordinates in the first color space; Mapping the first color coordinate of the original color data to a sampling point space to obtain a mapping point corresponding to the first color coordinate of the original color data in the sampling point space, and determining, based on the mapping coordinates of the mapping point, first color coordinates of a plurality of reference points corresponding to the mapping coordinates in the first color space; Determining the target color coordinates of each of the reference points based on the first color coordinates of each of the reference points and a color mapping table; the color mapping table is generated using the method of any one of claims 1 to 7; According to the target color coordinates of each reference point, corrected color data of the pixel is obtained through an interpolation algorithm.
11. The method according to claim 10, wherein: The sampling point space includes a plurality of sampling cubes, each of which is defined by eight sampling points as vertices and is divided into a plurality of tetrahedrons; Determining, according to the mapping coordinates of the mapping points, first color coordinates of a plurality of reference points corresponding to the mapping coordinates in the first color space specifically includes: Determine the tetrahedron where the mapping point is located, and use each vertex of the tetrahedron as a reference point; The coordinates of the reference point in the sampling point space are used as the first color coordinates of the reference point.
12. The method according to claim 11, wherein Obtaining corrected color data of the pixel by an interpolation algorithm according to the target color coordinates of each reference point, including: Obtain the corrected color data of the pixel using the following formula; Wherein, p represents a mapping point, and p0, p1, p2, and p3 represent vertices of the tetrahedron where the mapping point is located. is the corrected color data; f(p0), f(p1), f(p2), and f(p3) are the target color coordinates of the four vertices of the tetrahedron respectively; (x0, y0, z0) are the coordinates of vertex p0 relative to the reference point; (x1, y1, z1) are the coordinates of vertex p1 relative to the reference point, (x2, y2, z2) are the coordinates of vertex p2 relative to the reference point, (x3, y3, z3) are the coordinates of vertex p3 relative to the reference point, and (x3, y3, z3) are the coordinates of vertex p3 relative to the reference point; (x, y, z) is the first color coordinate of the mapping point; wherein the reference point is one of the vertices of the sampling cube where the mapping point is located.
13. A device for generating a color mapping table, comprising: A space establishing module is configured to establish a sampling point space according to first color coordinates of a plurality of sampling points in the first color space; a processing module configured to perform a preset processing step on each sampling point to obtain a target color coordinate of each sampling point in the first color space, and generate the color mapping table according to the first color coordinate and the target color coordinate of each sampling point; The preset processing steps for each sampling point include: Taking the sampling point as a source sampling point, determining a target sampling point corresponding to the source sampling point; The target sampling points are processed to obtain the target color coordinates.
14. A color correction device, comprising: a conversion module configured to convert the original color data of the pixel into first color coordinates in the first color space in response to the original color data of the pixel; a reference point acquisition module configured to map the first color coordinate of the original color data into a sampling point space, obtain a mapping point corresponding to the first color coordinate of the original color data in the sampling point space, and determine, based on the mapping coordinates of the mapping point, first color coordinates of a plurality of reference points corresponding to the mapping coordinates in the first color space; a target color determination module configured to determine the target color coordinates of each of the reference points based on the first color coordinates of each of the reference points and a color mapping table; the color mapping table is generated by the generation device according to claim 13; The interpolation module is configured to obtain the corrected color data of the pixel through an interpolation algorithm according to the target color coordinates of each reference point.
15. A computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.
16. A display device comprising: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 12.
Citation Information
Cited By
Color value calibration method and device of display panel, equipment and medium
CN119418664A
