Color processing method and device, equipment, storage medium and program product
By obtaining the first pixel value of a node within the native color gamut of the display device and performing multi-dimensional processing using a conversion function and a preset conversion matrix, the problem of inaccurate color conversion in existing technologies is solved, achieving higher color processing accuracy and consistency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2024-10-29
- Publication Date
- 2026-05-01
AI Technical Summary
Existing color processing methods cannot accurately improve the accuracy of color conversion when there are personalized displays or hardware defects in the display device.
By obtaining the first pixel value of a node within the native color gamut of the display device, multi-dimensional processing is performed using a transformation function and a preset transformation matrix to obtain a more accurate second pixel value, which is then converted to coordinate values in a preset color space to improve the accuracy of color processing.
It improves the accuracy of color space conversion in display devices, ensuring the accuracy and consistency of color processing, especially in the presence of hardware defects or complex color processing requirements.
Smart Images

Figure CN121963653A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of display technology, and in particular to a color processing method, apparatus, device, storage medium, and program product. Background Technology
[0002] Color processing in display devices can provide users with accurate or personalized display effects. Current color processing uses a single color transformation matrix to map pixels from one color space to another, ensuring that the display effect of the mapped pixels matches the user's needs.
[0003] When the color processing for personalized displays is complex, or when the display device has hardware defects, the current color conversion matrix cannot improve the accuracy of color processing. Summary of the Invention
[0004] To overcome the problems in related technologies, this disclosure provides a color processing method, apparatus, device, storage medium, and program product, thereby accurately evaluating the color distribution of the native color gamut of a display device and improving the accuracy of node conversion from the native color gamut of the display device to a preset color space.
[0005] According to a first aspect of the present disclosure, a color processing method is provided, comprising:
[0006] Get the first pixel value of the node within the native color gamut of the display device;
[0007] The first pixel value of the node in the native color gamut is transformed based on the transformation function to obtain the second pixel value of the node in the native color gamut; wherein the degree of matching between the color composition indicated by the second pixel value and the node is higher than the degree of matching between the color composition indicated by the first pixel value and the node.
[0008] The second pixel value of the node in the native color gamut is transformed based on the preset transformation matrix to obtain the coordinate value of the second pixel value of the node in the native color gamut in the preset color space.
[0009] The preset conversion matrix is a conversion matrix that converts nodes within the native color gamut from their original color space to the preset color space.
[0010] In some embodiments, the method further includes:
[0011] The test device determines the first pixel values of at least two first sample nodes in the native color gamut of the test device, and the coordinate values of each first sample node in the preset color space; wherein the test device is of the same type as the display device.
[0012] The first pixel value of each first sample node is processed based on the transformation function to obtain the second pixel value of each first sample node;
[0013] The preset transformation matrix is determined based on the second pixel value of each of the first sample nodes and the coordinate value of each of the first sample nodes.
[0014] In some embodiments, determining the preset transformation matrix based on the second pixel value of each of the first sample nodes and the coordinate value of each of the first sample nodes includes:
[0015] A first matrix is constructed based on the second pixel value of each of the first sample nodes, and a second matrix is constructed based on the coordinate value of each of the first sample nodes;
[0016] The preset transformation matrix is determined based on the inverse of the first matrix and the second matrix.
[0017] In some embodiments, the conversion function is at least two types;
[0018] The step of processing the first pixel value of each first sample node based on the transformation function to obtain the second pixel value of each first sample node includes:
[0019] The first pixel value of the first sample node is transformed based on at least two types of transformation functions to obtain at least two second pixel values of the first sample node; wherein, the second pixel values of the first sample node are different.
[0020] The construction of the first matrix based on the second pixel values of each of the first sample nodes includes:
[0021] A third matrix is constructed based on the at least two second pixel values of the first sample node;
[0022] The first matrix is constructed based on each of the third matrices.
[0023] In some embodiments, processing the first pixel value of each first sample node based on the transformation function to obtain the second pixel value of each first sample node includes:
[0024] The first pixel value of each of the first sample nodes is normalized to obtain the third pixel value of each of the first sample nodes.
[0025] The third pixel value of each of the first sample nodes is processed based on the transformation function to obtain the second pixel value of each of the first sample nodes.
[0026] In some embodiments, the method further includes:
[0027] Determine the distribution information of each node in the native color gamut of the test device;
[0028] The nodes whose distribution information meets the preset conditions are determined as the first sample nodes.
[0029] In some embodiments, the method further includes:
[0030] Determine the first pixel value of the second sample node in the native color gamut of the test device, and the coordinate value of the second sample node in the preset color space;
[0031] Based on the coordinates of the second sample node and the preset transformation matrix, the fourth pixel value of the second sample node is determined;
[0032] Based on the transformation function, the first pixel value of the second sample node is transformed to determine the second pixel value of the second sample node;
[0033] The transformation function is adjusted based on the offset between the fourth pixel value of the second sample node and the second pixel value of the second sample node.
[0034] According to a second aspect of the present disclosure, a color processing apparatus is provided, comprising:
[0035] The acquisition module is configured to acquire the first pixel value of a node within the native color gamut of the display device.
[0036] The first processing module is configured to perform a transformation process on the first pixel value of the node in the native color gamut based on a transformation function to obtain the second pixel value of the node in the native color gamut; wherein the degree of matching between the color composition indicated by the second pixel value and the node is higher than the degree of matching between the color composition indicated by the first pixel value and the node.
[0037] The second processing module performs a transformation process on the second pixel value of the node in the native color gamut based on a preset transformation matrix to obtain the coordinate value of the second pixel value of the node in the native color gamut in a preset color space.
[0038] The preset conversion matrix is a conversion matrix that converts nodes within the native color gamut from their original color space to the preset color space.
[0039] In some embodiments, the apparatus further includes:
[0040] The first determining module is configured to determine the first pixel values of at least two first sample nodes in the native color gamut of the test device, and the coordinate values of each first sample node in the preset color space; wherein the test device is of the same type as the display device;
[0041] The third processing module is configured to process the first pixel value of each first sample node based on the transformation function to obtain the second pixel value of each first sample node.
[0042] The fourth processing module is configured to determine the preset transformation matrix based on the second pixel value of each of the first sample nodes and the coordinate value of each of the first sample nodes.
[0043] In some embodiments, the fourth processing module is specifically configured as follows:
[0044] A first matrix is constructed based on the second pixel value of each of the first sample nodes, and a second matrix is constructed based on the coordinate value of each of the first sample nodes;
[0045] The preset transformation matrix is determined based on the inverse of the first matrix and the second matrix.
[0046] In some embodiments, the conversion function is at least two types;
[0047] The third processing module is specifically configured as follows:
[0048] The first pixel value of the first sample node is transformed based on at least two types of transformation functions to obtain at least two second pixel values of the first sample node; wherein, the second pixel values of the first sample node are different.
[0049] The fourth processing module is further configured as follows:
[0050] A third matrix is constructed based on the at least two second pixel values of the first sample node;
[0051] The first matrix is constructed based on each of the third matrices.
[0052] In some embodiments, the third processing module is specifically configured as follows:
[0053] The first pixel value of each of the first sample nodes is normalized to obtain the third pixel value of each of the first sample nodes.
[0054] The third pixel value of each of the first sample nodes is processed based on the transformation function to obtain the second pixel value of each of the first sample nodes.
[0055] In some embodiments, the apparatus further includes:
[0056] The second determining module is configured to determine the distribution information of each node in the native color gamut of the test device;
[0057] The execution module is configured to identify nodes whose distribution information meets preset conditions as the first sample nodes.
[0058] In some embodiments, the apparatus further includes:
[0059] The third determining module is configured to determine the first pixel value of the second sample node in the native color gamut of the test device, and the coordinate value of the second sample node in the preset color space;
[0060] The fourth determining module is configured to determine the fourth pixel value of the second sample node based on the coordinate value of the second sample node and the preset transformation matrix;
[0061] The fifth determining module performs a transformation process on the first pixel value of the second sample node based on the transformation function to determine the second pixel value of the second sample node;
[0062] The adjustment module is configured to adjust the transformation function based on the offset between the fourth pixel value of the second sample node and the second pixel value of the second sample node.
[0063] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0064] processor;
[0065] Memory used to store computer programs or instructions;
[0066] The processor executes the computer program or instructions to implement the steps in any of the color processing methods in the first aspect described above.
[0067] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, comprising:
[0068] When the computer program or instructions in the storage medium are executed by a processor, the steps in any of the color processing methods in the first aspect described above are implemented.
[0069] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions, which, when executed by a processor, implement the steps of any of the color processing methods in the first aspect described above.
[0070] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0071] In this embodiment, the first pixel value of a node within the native color gamut of the display device is first obtained; then, the first pixel value of the node within the native color gamut is converted using a conversion function to obtain the second pixel value of the node within the native color gamut; and finally, the second pixel value of the node within the native color gamut is converted using a preset conversion matrix to obtain the coordinates of the second pixel value of the node within the native color gamut in a preset color space. Thus, the second pixel value obtained through the conversion function can more accurately indicate the color composition of the node, thereby accurately assessing the color distribution of the native color gamut of the display device, improving the accuracy of converting nodes within the native color gamut of the display device from their original color space to the preset color space, and thus ensuring the accuracy of subsequent color processing.
[0072] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0073] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0074] Figure 1 This is a flowchart illustrating a color processing method according to an exemplary embodiment. Figure 1 .
[0075] Figure 2 This is a flowchart illustrating a color processing method according to an exemplary embodiment. Figure 2 .
[0076] Figure 3 This is a flowchart illustrating a color processing method according to an exemplary embodiment. Figure 3 .
[0077] Figure 4 This is a schematic diagram of a chromaticity map according to an exemplary embodiment.
[0078] Figure 5 This is a block diagram illustrating a color processing apparatus according to an exemplary embodiment.
[0079] Figure 6 This is a structural block diagram of an electronic device 600 according to an exemplary embodiment. Detailed Implementation
[0080] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0081] Figure 1 This is a flowchart illustrating a color processing method according to an exemplary embodiment. Figure 1 ,like Figure 1 As shown, this color processing method mainly includes the following steps:
[0082] In step 101, the first pixel value of the node within the native color gamut of the display device is obtained;
[0083] In step 102, the first pixel value of the node in the native color gamut is transformed based on the transformation function to obtain the second pixel value of the node in the native color gamut; wherein, the degree of matching between the color composition and the node indicated by the second pixel value is higher than the degree of matching between the color composition and the node indicated by the first pixel value.
[0084] In step 103, the second pixel value of the node in the native color gamut is transformed based on the preset transformation matrix to obtain the coordinate value of the second pixel value of the node in the native color gamut in the preset color space.
[0085] The preset transformation matrix is a transformation matrix that transforms nodes within the native color gamut from their original color space to the preset color space.
[0086] It should be noted that the color processing method proposed in this disclosure can be applied to electronic devices. Here, electronic devices can include terminal devices, such as mobile terminals or fixed terminals. Mobile terminals can include mobile phones, tablets, laptops, wearable electronic devices, etc. Fixed terminals can include desktop computers, smart TVs, in-vehicle systems, etc. In some other embodiments, the color processing method can also be applied to applications installed on electronic devices.
[0087] In other embodiments, the color processing method in this disclosure can be configured in a color processing device, which can be located in an electronic device; this disclosure does not limit this. It should be noted that the execution entity in this disclosure can be the central processing unit (CPU) in the electronic device in hardware, and related background services in the electronic device in software; this is not limited.
[0088] In some embodiments, the pixel value represents the intensity value of the three color channels (Red, Green, and Blue) for each pixel in the image. The value of each color channel can be represented by an 8-bit binary number, meaning that the value of each channel varies between 0 and 255, where 0 indicates that the color channel has no intensity and 255 indicates that the color channel has reached its maximum intensity.
[0089] In some embodiments, a 3x3 color transformation matrix (also known as a linear transformation matrix) is a commonly used tool in image processing to convert values in the RGB color space to a new color space for color correction. After color correction, related color processing such as brightness correction, color gamut mapping, or color temperature mapping can be achieved.
[0090] Here, the RGB color space is closely related to the display screen; different displays will produce different color effects when displaying the same RGB values. The XYZ color space, on the other hand, is a standard color space independent of the display screen. When performing color gamut mapping (such as color gamut compression and tone compression), the XYZ color space acts as an intermediary, facilitating the conversion between different color gamuts. By converting RGB values to XYZ values, color gamut matching and compression are easier, thus ensuring the consistency and accuracy of color output across different displays.
[0091] For example, the conversion formula for converting pixels in an image from the RGB color space to the XYZ color space can be as follows:
[0092]
[0093] In formula (1), Represents the coordinate values in the XYZ color space. Represents the color conversion matrix. This represents the pixel value in the RGB color space.
[0094] In some embodiments, during the manufacturing process of the display, the arrangement of the RGB pixels, the circuit design, and the driving method all affect the stability of the pixel current. Simultaneously, factors such as the physical distance between pixels, insulation performance, and the matching degree of the driving circuits can also lead to mutual current interference. Furthermore, the RGB pixels generate current during operation, and this current is affected by the currents of other pixels during transmission, causing interference. Changes in current can lead to voltage fluctuations, thereby affecting the brightness and color performance of the pixels.
[0095] The color conversion method described above only considers the linear combination of the three dimensions of RGB to obtain the value of the new color space. Therefore, when there is mutual interference between the currents of the three pixels of RGB in the display device, color conversion using a single RGB value will result in inaccurate color representation values in the new color space.
[0096] In this embodiment of the disclosure, considering that a single RGB value cannot accurately describe the color composition of nodes in the native color gamut of the display device, a conversion function is pre-set so that the conversion function can convert a single RGB value to obtain more dimensional or more complex RGB representations. Thus, even when there is mutual interference between the currents of the three RGB pixels in the display device, the color composition of nodes in the native color gamut of the display device can be accurately described, thereby improving the accuracy of color conversion.
[0097] Here, color composition includes color details, such as hue, which represents the basic characteristics of a color, saturation, which represents the vividness of a color, and lightness, which represents the brightness of a color.
[0098] As can be understood, a display device is a device that converts electronic signals into visual images or tactile information. The native color gamut of a display device refers to the range and variety of colors it can display without color calibration or adjustment, and is related to the richness and accuracy of the colors it can present.
[0099] Meanwhile, the native color gamut of a display device is represented on a chromaticity diagram by a triangular area formed by connecting three points: red, green, and blue. The larger the triangular area, the wider the native color gamut.
[0100] In some embodiments, the color space in which the native color gamut of the display device resides is the RGB color space, which can be any one of the sRGB color gamut, Display-P3 color gamut, or AdobeRGB color gamut.
[0101] Here, a node is any color point within the native color gamut of the display device. A node is formed by combining the intensity values of the red, green, and blue color channels; therefore, the first pixel value of a node is its RGB value.
[0102] In some embodiments, the process of obtaining the RGB values of nodes within the native color gamut of a display device includes: ensuring stable lighting in the measurement environment; aligning an optical instrument with a node in the native color gamut of the display device and activating the optical instrument to analyze the light emitted from the screen of the test device and output spectral distribution data; then, using processing software or algorithms, matching the spectral distribution data with a known spectral database to find the closest spectral curve; and performing color space conversion based on the matched spectral curve and the RGB spectral characteristics of the display device's screen to calculate the RGB values of the node. Here, the optical instrument includes, but is not limited to, a spectrophotometer or a color analyzer.
[0103] Understandably, after obtaining the first pixel value of a node, a transformation function can be used to transform the first pixel value to obtain the second pixel value. Since the second pixel value can more accurately describe the color composition of the node, the degree of matching between the color composition indicated by the second pixel value and the node is higher than the degree of matching between the color composition indicated by the first pixel value and the node.
[0104] Here, the transformation function can consist of one or more functions, which can be linear functions, such as linear functions of the first degree; or nonlinear functions, such as power functions. This disclosure does not limit the specific functions.
[0105] For example, the transformation function can be represented as follows:
[0106]
[0107] In formulas (2)-(4), R i G represents the intensity value of the red channel of the first sample point. i B represents the intensity value of the green channel for the first sample point. i This represents the intensity value of the blue channel for the first sample point.
[0108] In some embodiments, considering that RGB values are easily affected by changes in lighting conditions, causing display devices to present different RGB values for the same node under different lighting conditions, normalizing the RGB values of nodes can reduce the impact of lighting conditions and improve the reliability and stability of the RGB values. Simultaneously, normalizing the RGB values of nodes can scale them to a relatively small scale, reducing the computational load of color conversion. Therefore, after obtaining the RGB values of a node, they can be normalized to obtain a target RGB value, and then converted using a conversion function to obtain a second pixel value that accurately indicates the color composition of the sample point.
[0109] In some embodiments, if the transformation function consists of multiple different functions, transforming the first pixel value of a node based on the transformation function can yield multiple second pixel values for the node. Here, the different second pixel values of the node are different.
[0110] It should be noted that, in order to perform color correction on the display device, after obtaining the second pixel value of the node, the second pixel value of the node is transformed based on the preset transformation matrix. This can obtain the coordinate value of the second pixel value of the node in the original color gamut in the preset color space, which is convenient for subsequent color processing.
[0111] Here, the default color space is XYZ. The default conversion matrix can also be understood as a color conversion matrix, but because the second pixel value is a polynomial or complex representation of RGB, the default conversion matrix is expanded from a 3x3 color conversion matrix to an Nx3 color conversion matrix or a 3xN color conversion matrix.
[0112] In some embodiments, the preset conversion matrix can be obtained by testing the display device before it leaves the factory, or it can be obtained by testing other display devices of the same type as the display device. This disclosure does not limit this.
[0113] For example, taking the testing of a display device as an example, the process involves obtaining the first pixel value of different sample nodes in the native color gamut of the display device, as well as the coordinate values of each sample node in a preset color space. The first pixel value of each sample node is then processed using a transformation function to obtain its second pixel value. Based on the second pixel value and coordinate values of each sample node, a preset transformation matrix is derived. Finally, based on the obtained preset transformation matrix, the coordinate values of other nodes in the native color gamut of the display device, excluding the sample nodes, are obtained in the preset color space. In this way, by measuring the coordinate values of a small subset of sample nodes, the color distribution of the display device's native color gamut can be evaluated, and the accuracy of color conversion can be improved.
[0114] Figure 2 This is a flowchart illustrating a color processing method according to an exemplary embodiment. Figure 2 ,like Figure 2 As shown, the color processing method includes:
[0115] In step 201, the first pixel value is determined.
[0116] In step 202, the first pixel value is converted based on the color conversion matrix.
[0117] In step 203, the coordinate values are determined.
[0118] After determining the first pixel value (RGB value) of a node within the native color gamut of the display device, the first pixel value is transformed based on a color transformation matrix to obtain the coordinates of the node's first pixel value in the XYZ color space. Here, the color transformation matrix is a 3x3 matrix. When users have personalized display needs, complex color processing is involved, and a 3x3 color transformation matrix cannot accurately perform color transformations, thus failing to meet user requirements. Furthermore, if the display device has hardware defects, the first pixel value may not accurately indicate the color composition of the node, also leading to inaccurate color transformation.
[0119] Figure 3 This is a flowchart illustrating a color processing method according to an exemplary embodiment. Figure 3 ,like Figure 3 As shown, the color processing method includes:
[0120] In step 301, the first pixel value is determined.
[0121] In step 302, the first pixel value is transformed based on the transformation function to obtain the second pixel value.
[0122] In step 303, the second pixel value is transformed based on a preset transformation matrix.
[0123] In step 304, the coordinate values are determined.
[0124] After obtaining the first pixel value (RGB value) of a node within the native color gamut of the display device, the first pixel value is transformed using a transformation function to obtain the second pixel value of the node. This second pixel value is then transformed using a preset transformation matrix to obtain the coordinates of the second pixel value in the XYZ color space. The preset transformation matrix here is an Nx3 or 3xN matrix. Because the second pixel value used for color conversion is obtained through complex function processing, the color composition indicated by the second pixel value matches the node more accurately, meaning it can more accurately describe the color details of the node. Therefore, even in complex color processing procedures or when the display device has hardware defects, accurate color conversion can still be performed, providing users with a superior display effect.
[0125] In this embodiment, the first pixel value of a node within the native color gamut of the display device is first obtained; then, the first pixel value of the node within the native color gamut is converted using a conversion function to obtain the second pixel value of the node within the native color gamut; and finally, the second pixel value of the node within the native color gamut is converted using a preset conversion matrix to obtain the coordinates of the second pixel value of the node within the native color gamut in a preset color space. Thus, the second pixel value obtained through the conversion function can more accurately indicate the color composition of the node, thereby accurately assessing the color distribution of the native color gamut of the display device, improving the accuracy of converting nodes within the native color gamut of the display device from their original color space to the preset color space, and thus ensuring the accuracy of subsequent color processing.
[0126] In some embodiments, the method further includes:
[0127] Determine the first pixel values of at least two first sample nodes in the native color gamut of the test device, and the coordinate values of each first sample node in the preset color space; wherein the test device and the display device are of the same type;
[0128] The first pixel value of each first sample node is processed based on the transformation function to obtain the second pixel value of each first sample node;
[0129] Based on the second pixel value and coordinate value of each first sample node, a preset transformation matrix is determined.
[0130] It should be noted that display devices of the same type have similar native color gamuts. Actual tests can be conducted on test devices of the same type as the display devices to obtain a preset conversion matrix for the test devices to convert from the color space of the native color gamut to the preset color space. The preset conversion matrix can then be applied to the display devices, thereby improving the convenience and accuracy of color conversion on the display devices.
[0131] Here, the color space of the display device's native color gamut and the test device's native color gamut are the same. For example, if the display device's native color gamut is sRGB, the test device's native color gamut is also sRGB.
[0132] It is understandable that the preset transformation matrix transforms the nodes in the native color gamut of the test device from their original color space to the preset color space. It can actually measure the first pixel value of the first sample node in the native color gamut of the test device and the coordinate value of the first sample node in the preset color space, and then obtain the preset transformation matrix.
[0133] Here, the first sample node is any color point in the native color gamut of the test device. To improve the accuracy of determining the preset transformation matrix, the number of first sample nodes is at least two.
[0134] In some embodiments, after selecting a first sample node from the native color gamut of the test device, ensuring stable lighting in the measurement environment, aligning the optical instrument with the first sample node, and activating the optical instrument, the light emitted from the screen of the test device is analyzed, and spectral distribution data is output. Then, through processing software or algorithms, the spectral distribution data is matched with a known spectral database to find the closest spectral curve. Based on the matched spectral curve and the RGB spectral characteristics of the screen of the test device, color space conversion is performed, and the first pixel value and RGB value of the first sample node are calculated.
[0135] In some embodiments, the measurement parameters of the optical instrument are set according to the display characteristics and measurement requirements of the test equipment, such as the measurement wavelength range and sampling interval; then the optical instrument is aligned with the screen of the test equipment to ensure that the test area of the optical instrument is consistent with the screen of the test equipment; the optical instrument is started, the first sample point in the native color gamut of the screen is scanned, and the spectral distribution of the first sample point is measured; finally, the tristimulus XYZ coordinate value of the first sample point is calculated by product integration using the relative spectral power distribution of the standard observer and the light source, as well as the spectral reflectance or transmittance of the first sample point.
[0136] Here, after obtaining the first pixel value of the first sample node, the first pixel value is transformed by a transformation function, so that the first pixel value undergoes a complex function mapping to obtain a second pixel value that can accurately describe the color composition of the first sample node.
[0137] It is understandable that after obtaining the second pixel value and coordinate value of different first sample nodes, the preset transformation matrix for converting the first sample node from its color space to the preset color space can be derived in reverse based on the second pixel value and coordinate value of each first sample node.
[0138] Specifically, for each first sample node, a system of equations is established to represent the mapping relationship between the second pixel value and the coordinate value. This system of equations is then solved using the least squares method or numerical optimization method to obtain a preset transformation matrix. For example, the second pixel values and XYZ coordinate values of multiple first sample nodes are substituted into the system of equations, and the preset transformation matrix that minimizes the overall error of the system of equations is found.
[0139] In some embodiments, to improve the accuracy of determining the preset transformation matrix, the first pixel value and coordinate value (measured value) of the third sample node can be measured, and the first pixel value of the third sample node can be transformed based on the transformation function to obtain the second pixel value of the third sample node; then, the second pixel value of the third sample node can be transformed based on the preset transformation matrix to obtain the coordinate value (calculated value) of the third sample node; finally, the accuracy of the preset transformation matrix is verified based on the difference between the measured coordinate value and the calculated coordinate value. Here, the third sample node is any node other than the first sample node in the native color gamut of the test device.
[0140] In this embodiment of the disclosure, by measuring the pixel values and coordinate values of a small number of first sample nodes, a preset conversion matrix can be accurately obtained to convert the test device from the color space of the native color gamut to the preset color space. Since display devices of the same type have similar native color gamuts, the obtained preset conversion matrix can be applied to display devices of the same type, thereby improving the accuracy and convenience of color conversion for display devices of the same type.
[0141] In some embodiments, a preset transformation matrix is determined based on the second pixel value of each first sample node and the coordinate value of each first sample node, including:
[0142] A first matrix is constructed based on the second pixel value of each first sample node, and a second matrix is constructed based on the coordinate value of each first sample node;
[0143] The preset transformation matrix is determined based on the inverse matrix of the first matrix and the second matrix.
[0144] It is understandable that the second pixel value of the first sample node is obtained by mapping the second pixel value of the first sample node through a complex transformation function, and the second pixel value is an RGB polynomial or a complex RGB representation. In order to facilitate the calculation of the preset transformation function, a first matrix can be constructed based on the second pixel value of each first sample node, and a second matrix can be constructed based on the coordinate value of each first sample node.
[0145] For example, the first matrix can be as follows:
[0146]
[0147] In formula (5), K represents the first matrix, and n represents the number of the first sample nodes. This represents the second pixel value of the first sample node.
[0148] here, This is just one form of the transformation function; the transformation function can also be in the form of formula (3) or (4) above.
[0149] The second matrix can be as follows:
[0150]
[0151] In formula (6), P represents the first matrix, and n represents the number of the first sample nodes. This represents the coordinates of the first sample node.
[0152] Here, the calculation of the preset transformation matrix can be performed as follows:
[0153] P = M·K (7);
[0154] In formula (7), M represents the preset transformation matrix.
[0155] Therefore, in order to calculate the preset transformation matrix, we can first determine the inverse matrix of the first matrix, and then determine the preset transformation matrix based on the inverse matrix of the first matrix and the second matrix.
[0156] Substituting formulas (5) and (6) into formula (7), the formula for calculating the preset transformation matrix can be as follows:
[0157]
[0158] In this embodiment of the disclosure, a first matrix is constructed based on the second pixel value of each first sample node, and a second matrix is constructed based on the coordinate value of each first sample node; and a preset transformation matrix is determined based on the inverse matrix of the first matrix and the second matrix, thereby improving the accuracy of determining the preset transformation matrix.
[0159] In some embodiments, the conversion function is at least two types;
[0160] The first pixel value of each first sample node is processed based on the transformation function to obtain the second pixel value of each first sample node, including:
[0161] The first pixel value of the first sample node is transformed using at least two types of transformation functions to obtain at least two second pixel values of the first sample node; wherein the second pixel values of the first sample node are different.
[0162] A first matrix is constructed based on the second pixel values of each first sample node, including:
[0163] Construct a third matrix based on at least two second pixel values of the first sample node;
[0164] The first matrix is constructed based on each third matrix.
[0165] It should be noted that, in order to more accurately indicate the color composition of the first sample node, multiple different types of transformation functions can be preset so that the first pixel value of the first sample node is transformed by the multiple different types of transformation functions respectively, thereby obtaining at least two second pixel values of the first sample node, that is, obtaining a more dimensional RGB polynomial of the first sample node, thus improving the richness of the color composition of the first sample node.
[0166] Here, the types of transformation functions are different, and the second pixel values obtained based on the transformation functions are different. Therefore, the second pixel values of a first sample node are different.
[0167] To facilitate the calculation of the preset transformation matrix, a third matrix can be constructed after obtaining the second pixel values of each of the first sample nodes.
[0168] For example, taking the processing of the first pixel value of the first sample node by two different transformation functions, the first transformation function is y1 = ax1 + b. The intensity value of each color channel in the first pixel value of the first sample node is taken as x1 and substituted into the first transformation function to obtain the corresponding y1; the second transformation function is y2 = x2. 3 The intensity values of each color channel in the first pixel value of the first sample node are taken as x2 and substituted into the first transformation function to obtain the corresponding y2; then, based on each y1 and each y2, a third matrix is constructed.
[0169] It is understandable that after obtaining the third matrix corresponding to different first sample nodes, a first matrix can be constructed based on each third matrix, and a preset transformation matrix can be determined based on the inverse matrix of the first matrix and the second matrix.
[0170] In this embodiment of the disclosure, the first pixel value of the first sample node is transformed by at least two types of transformation functions to obtain at least two second pixel values of the first sample node, so that the color composition of the first sample point is indicated by second pixel values with more dimensions, thereby more accurately describing the color details of the first sample point; then a third matrix is constructed based on the at least two second pixel values of the first sample node; a first matrix is constructed based on each third matrix to improve the accuracy of the first matrix, thereby improving the accuracy of determining the preset transformation matrix.
[0171] In some embodiments, the first pixel value of each first sample node is processed based on a transformation function to obtain the second pixel value of each first sample node, including:
[0172] The first pixel value of each first sample node is normalized to obtain the third pixel value of each first sample node.
[0173] The third pixel value of each first sample node is processed based on the transformation function to obtain the second pixel value of each first sample node.
[0174] It is understandable that since the first pixel values of different first sample nodes differ greatly, it is not conducive to improving the accuracy of the preset transformation matrix. Therefore, the first pixel values of each first sample node can be normalized to obtain the third pixel values of each first sample node, so as to reduce the contrast between different first sample nodes.
[0175] Here, normalization is the process of scaling the scale of the first pixel value of each first sample node to a uniform range, such as between 0 and 1.
[0176] In some embodiments, after obtaining the first pixel value of the first sample node, the intensity value of each color channel is divided by the maximum intensity value of the corresponding channel (255 for an 8-bit image) to obtain the target intensity value of each color channel after normalization; based on each target intensity value, the third pixel value of the first sample node is obtained.
[0177] In other embodiments, after obtaining the first pixel value of the first sample node, a total intensity value is obtained based on the sum of the intensity values of each color channel. The intensity value of each color channel is divided by the total intensity value to obtain the target intensity value of each color channel after normalization. Based on each target intensity value, the third pixel value of the first sample node is obtained.
[0178] Here, after obtaining the third pixel value of the first sample node, the third pixel value of the first sample node is transformed based on the transformation function to obtain the second pixel value of the first sample node, and then the preset transformation matrix is further determined.
[0179] In this embodiment of the disclosure, the third pixel value of each first sample node is obtained by normalizing the first pixel value of each first sample node. On the one hand, this can reduce the color difference between different first sample nodes, thereby improving the accuracy of determining the preset transformation matrix; on the other hand, it reduces the amount of computation of the preset transformation matrix and shortens the time for determining the preset transformation matrix.
[0180] In some embodiments, the method further includes:
[0181] Determine the distribution information of each node in the native color gamut of the test equipment;
[0182] Nodes whose distribution information meets the preset conditions are identified as the first sample nodes.
[0183] Understandably, since the first sample node is the sampling point for determining the preset transformation matrix, the preset transformation matrix determined based on the first sample node will be more accurate when the selected first sample node can better reflect the color distribution of the native color gamut. Therefore, preset conditions can be set first, and then nodes that satisfy the distribution information satisfying the preset conditions can be determined as the first sample node.
[0184] In some embodiments, the chromaticity map corresponding to the native color gamut of the test device is first obtained; the positions of the three standard primary colors (i.e., red, green and blue) are determined on the chromaticity map, and the positions of the three primary colors are connected to form a triangle; and the distribution information of each node is obtained by analyzing the position of each node within the triangle.
[0185] Here, the distribution information represents the distance between each node's location and the center of the triangle, and / or the distance between each node's location and any vertex of the triangle. The closer a node's location is to a vertex of the triangle, the more primary color components the corresponding vertex indicates in the node's color composition; the closer a node's location is to the center of the triangle, the more its color composition is the result of a uniform mixture of the three primary colors, meaning the node's color is grayscale or close to white.
[0186] Here, the preset conditions include, but are not limited to, positions close to the center of the triangle, or positions close to any vertex of the triangle.
[0187] In some embodiments, to further improve the accuracy of determining the preset transformation matrix, the region formed by each first sample point matches the range corresponding to the triangle. For example, each selected first sample point is at least a node located at the three vertices of the triangle and a node located at the center of the triangle, so that the region formed by each first sample node matches the native color gamut of the test device, thereby improving the accuracy of evaluating the color distribution of the test device.
[0188] For example, Figure 4 This is a schematic diagram of a chromaticity map according to an exemplary embodiment, such as... Figure 4 As shown, the triangular region in the chromaticity diagram represents the color range of the test device's native color gamut within the chromaticity diagram, and the circular dots within the triangular region are the selected first sample points. The regions formed by these first sample points match the triangle and are evenly distributed within it, thus improving the accuracy of the evaluation of the test device's color distribution.
[0189] In this embodiment of the disclosure, nodes whose distribution information meets preset conditions are determined as first sample nodes, so that the determined first sample nodes can reflect the color distribution of the native color gamut, thereby improving the accuracy of determining the preset transformation matrix and enabling each node in the native color gamut of the test device to accurately perform color transformation.
[0190] In some embodiments, the method further includes:
[0191] Determine the first pixel value of the second sample node in the native color gamut of the test device, and the coordinate value of the second sample node in the preset color space;
[0192] Based on the coordinates of the second sample node and the preset transformation matrix, determine the fourth pixel value of the second sample node;
[0193] The first pixel value of the second sample node is transformed based on the transformation function to determine the second pixel value of the second sample node.
[0194] The transformation function is adjusted based on the offset between the fourth pixel value of the second sample node and the second pixel value of the second sample node.
[0195] It should be noted that the purpose of the conversion function is to convert the first pixel value to obtain an accurate indication of the color composition of the first sample node in the native color gamut of the test device. Since the conversion function is preset, it can be verified, thereby improving the accuracy of describing the color distribution of the native color gamut of the test device.
[0196] It is understood that, based on the first pixel value of the second sample node in the native color gamut of the test device, the coordinate value of the second sample node in the preset color space, and the preset transformation matrix, the accuracy of the transformation function can be further determined. Here, the second sample node is any node in the native color gamut of the test device other than the first sample node, and the number of second sample nodes can be arbitrarily set; this embodiment of the present disclosure does not limit this.
[0197] It is understandable that, based on the coordinates of the second sample node and the preset transformation matrix, the color composition indicated by the fourth pixel value of the second sample node is the actual color composition of the second sample point; based on the transformation function, the first pixel value of the second sample node is transformed, and the color composition indicated by the second pixel value of the second sample node is the predicted color composition of the second sample point. Therefore, based on the offset between the fourth pixel value and the second pixel value, the accuracy of the preset function can be verified and the transformation function can be optimized.
[0198] In some embodiments, an offset threshold is preset. If the offset between the fourth pixel value of the second sample node and the second pixel value of the second sample node is less than or equal to the offset threshold, it is determined that the conversion function can accurately describe the color distribution of the native color gamut of the test device, and the conversion function can be maintained. If the offset between the fourth pixel value of the second sample node and the second pixel value of the second sample node is greater than the offset threshold, it is determined that the conversion function cannot accurately describe the color distribution of the native color gamut of the test device, and the conversion function can be optimized.
[0199] In some embodiments, in order to improve the accuracy of the optimized conversion function, multiple second sample nodes can be measured to obtain the first pixel value of different second sample nodes and the coordinate value of each second sample node in a preset color space. Based on the coordinate value of each second sample node, a fourth matrix is constructed. The fourth matrix and the preset conversion matrix are substituted into the above formula (7) to obtain a fifth matrix, where the fifth matrix indicates the fourth pixel value of each second sample node. Then, the first pixel value of each second sample node is converted based on the conversion function to determine the second pixel value of each second sample node. Finally, the conversion function is adjusted based on the offset between the second pixel value and the fourth pixel value of each sample node.
[0200] In this embodiment, the first pixel value and coordinate value of the second sample node are measured, and the coordinate value is transformed based on a preset transformation matrix to obtain the fourth pixel value; the first pixel value is transformed based on a transformation function to obtain the second pixel value; the accuracy of the transformation function is verified based on the fourth pixel value and the second pixel value, and the transformation function is optimized so that the second pixel value obtained after processing by the optimized transformation function can indicate richer color details of the node; since display devices of the same type have similar native color gamuts, the obtained transformation function can be applied to display devices of the same type, thereby improving the accuracy and convenience of color conversion for display devices of the same type.
[0201] Figure 5 This is a block diagram illustrating a color processing apparatus according to an exemplary embodiment, such as... Figure 5 As shown, the color processing device 500 includes:
[0202] The acquisition module 501 is configured to acquire the first pixel value of a node within the native color gamut of the display device.
[0203] The first processing module 502 is configured to perform a conversion process on the first pixel value of the node in the native color gamut based on a conversion function to obtain the second pixel value of the node in the native color gamut; wherein the degree of matching between the color composition indicated by the second pixel value and the node is higher than the degree of matching between the color composition indicated by the first pixel value and the node.
[0204] The second processing module 503 performs a transformation process on the second pixel value of the node in the native color gamut based on a preset transformation matrix to obtain the coordinate value of the second pixel value of the node in the native color gamut in a preset color space.
[0205] The preset conversion matrix is a conversion matrix that converts nodes within the native color gamut from their original color space to the preset color space.
[0206] In some embodiments, the device 500 further includes:
[0207] The first determining module is configured to determine the first pixel values of at least two first sample nodes in the native color gamut of the test device, and the coordinate values of each first sample node in the preset color space; wherein the test device is of the same type as the display device;
[0208] The third processing module is configured to process the first pixel value of each first sample node based on the transformation function to obtain the second pixel value of each first sample node.
[0209] The fourth processing module is configured to determine the preset transformation matrix based on the second pixel value of each of the first sample nodes and the coordinate value of each of the first sample nodes.
[0210] In some embodiments, the fourth processing module is specifically configured as follows:
[0211] A first matrix is constructed based on the second pixel value of each of the first sample nodes, and a second matrix is constructed based on the coordinate value of each of the first sample nodes;
[0212] The preset transformation matrix is determined based on the inverse of the first matrix and the second matrix.
[0213] In some embodiments, the conversion function is at least two types;
[0214] The third processing module is specifically configured as follows:
[0215] The first pixel value of the first sample node is transformed based on at least two types of transformation functions to obtain at least two second pixel values of the first sample node; wherein, the second pixel values of the first sample node are different.
[0216] The fourth processing module is further configured as follows:
[0217] A third matrix is constructed based on the at least two second pixel values of the first sample node;
[0218] The first matrix is constructed based on each of the third matrices.
[0219] In some embodiments, the third processing module is specifically configured as follows:
[0220] The first pixel value of each of the first sample nodes is normalized to obtain the third pixel value of each of the first sample nodes.
[0221] The third pixel value of each of the first sample nodes is processed based on the transformation function to obtain the second pixel value of each of the first sample nodes.
[0222] In some embodiments, the device 500 further includes:
[0223] The second determining module is configured to determine the distribution information of each node in the native color gamut of the test device;
[0224] The execution module is configured to identify nodes whose distribution information meets preset conditions as the first sample nodes.
[0225] In some embodiments, the device 500 further includes:
[0226] The third determining module is configured to determine the first pixel value of the second sample node in the native color gamut of the test device, and the coordinate value of the second sample node in the preset color space;
[0227] The fourth determining module is configured to determine the fourth pixel value of the second sample node based on the coordinate value of the second sample node and the preset transformation matrix;
[0228] The fifth determining module performs a transformation process on the first pixel value of the second sample node based on the transformation function to determine the second pixel value of the second sample node;
[0229] The adjustment module is configured to adjust the transformation function based on the offset between the fourth pixel value of the second sample node and the second pixel value of the second sample node.
[0230] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0231] Figure 6This is a structural block diagram illustrating an electronic device 600 according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0232] Reference Figure 6 The electronic device 600 may include one or more of the following components: processing component 602, memory 604, power supply component 606, multimedia component 608, audio component 610, input / output (I / O) interface 612, sensor component 614, and communication component 616.
[0233] Processing component 602 typically controls the overall operation of electronic device 600, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.
[0234] Memory 604 is configured to store various types of data to support the operation of electronic device 600. Examples of such data include at least one of the following: instructions for any application or method operating on electronic device 600, contact data, phonebook data, messages, pictures, and videos. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0235] Power supply component 606 provides power to various components of electronic device 600. Power supply component 606 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 600.
[0236] Multimedia component 608 includes a screen that provides an output interface between electronic device 600 and user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen may be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When electronic device 600 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0237] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when electronic device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.
[0238] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0239] Sensor assembly 614 includes one or more sensors for providing state assessments of various aspects of electronic device 600. For example, sensor assembly 614 may detect the on / off state of electronic device 600, the relative positioning of components such as the display and keypad of electronic device 600, changes in position of electronic device 600 or one of its components, the presence or absence of user contact with electronic device 600, orientation or acceleration / deceleration of electronic device 600, and temperature changes of electronic device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.
[0240] Communication component 616 is configured to facilitate wired or wireless communication between electronic device 600 and other devices. Electronic device 600 can access wireless networks based on communication standards, such as Wi-Fi, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, UWB technology, Bluetooth (BT) technology, and other technologies.
[0241] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.
[0242] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including executable instructions or a computer program, which can be executed by a processor 620 of an electronic device 600 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0243] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform any of the color processing methods described in the embodiments of this disclosure. For example, the color processing method includes:
[0244] Get the first pixel value of the node within the native color gamut of the display device;
[0245] The first pixel value of a node within the native color gamut is transformed using a transformation function to obtain the second pixel value of the node within the native color gamut; wherein, the degree of matching between the color composition and the node indicated by the second pixel value is higher than the degree of matching between the color composition and the node indicated by the first pixel value.
[0246] The second pixel value of the node in the native color gamut is transformed based on the preset transformation matrix to obtain the coordinate value of the second pixel value of the node in the native color gamut in the preset color space.
[0247] The preset transformation matrix is a transformation matrix that transforms nodes within the native color gamut from their original color space to the preset color space.
[0248] This disclosure provides a computer program product comprising a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform any of the color processing methods described above in this disclosure.
[0249] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0250] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A color processing method, characterized in that, The method includes: Get the first pixel value of the node within the native color gamut of the display device; The first pixel value of the node in the native color gamut is transformed based on the transformation function to obtain the second pixel value of the node in the native color gamut; wherein the degree of matching between the color composition indicated by the second pixel value and the node is higher than the degree of matching between the color composition indicated by the first pixel value and the node. The second pixel value of the node in the native color gamut is transformed based on the preset transformation matrix to obtain the coordinate value of the second pixel value of the node in the native color gamut in the preset color space. The preset conversion matrix is a conversion matrix that converts nodes within the native color gamut from their original color space to the preset color space.
2. The method according to claim 1, characterized in that, The method further includes: The test device determines the first pixel values of at least two first sample nodes in the native color gamut of the test device, and the coordinate values of each first sample node in the preset color space; wherein the test device is of the same type as the display device. The first pixel value of each first sample node is processed based on the transformation function to obtain the second pixel value of each first sample node; The preset transformation matrix is determined based on the second pixel value of each of the first sample nodes and the coordinate value of each of the first sample nodes.
3. The method according to claim 2, characterized in that, Determining the preset transformation matrix based on the second pixel value of each of the first sample nodes and the coordinate value of each of the first sample nodes includes: A first matrix is constructed based on the second pixel value of each of the first sample nodes, and a second matrix is constructed based on the coordinate value of each of the first sample nodes; The preset transformation matrix is determined based on the inverse of the first matrix and the second matrix.
4. The method according to claim 3, characterized in that, The conversion function is of at least two types; The step of processing the first pixel value of each first sample node based on the transformation function to obtain the second pixel value of each first sample node includes: The first pixel value of the first sample node is transformed based on at least two types of transformation functions to obtain at least two second pixel values of the first sample node; wherein, the second pixel values of the first sample node are different. The construction of the first matrix based on the second pixel values of each of the first sample nodes includes: A third matrix is constructed based on the at least two second pixel values of the first sample node; The first matrix is constructed based on each of the third matrices.
5. The method according to any one of claims 2 to 4, characterized in that, The step of processing the first pixel value of each first sample node based on the transformation function to obtain the second pixel value of each first sample node includes: The first pixel value of each of the first sample nodes is normalized to obtain the third pixel value of each of the first sample nodes. The third pixel value of each of the first sample nodes is processed based on the transformation function to obtain the second pixel value of each of the first sample nodes.
6. The method according to any one of claims 2 to 4, characterized in that, The method further includes: Determine the distribution information of each node in the native color gamut of the test device; The nodes whose distribution information meets the preset conditions are determined as the first sample nodes.
7. The method according to any one of claims 2 to 4, characterized in that, The method further includes: Determine the first pixel value of the second sample node in the native color gamut of the test device, and the coordinate value of the second sample node in the preset color space; Based on the coordinates of the second sample node and the preset transformation matrix, the fourth pixel value of the second sample node is determined; Based on the transformation function, the first pixel value of the second sample node is transformed to determine the second pixel value of the second sample node; The transformation function is adjusted based on the offset between the fourth pixel value of the second sample node and the second pixel value of the second sample node.
8. A color processing device, characterized in that, The device includes: The acquisition module is configured to acquire the first pixel value of a node within the native color gamut of the display device. The first processing module is configured to perform a transformation process on the first pixel value of the node in the native color gamut based on a transformation function to obtain the second pixel value of the node in the native color gamut; wherein the degree of matching between the color composition indicated by the second pixel value and the node is higher than the degree of matching between the color composition indicated by the first pixel value and the node. The second processing module performs a transformation process on the second pixel value of the node in the native color gamut based on a preset transformation matrix to obtain the coordinate value of the second pixel value of the node in the native color gamut in a preset color space. The preset conversion matrix is a conversion matrix that converts nodes within the native color gamut from their original color space to the preset color space.
9. An electronic device, characterized in that, include: processor; Memory used to store computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing a computer program or instructions, characterized in that, When the computer program or instructions in the storage medium are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.