Lookup Table Generation Method, Device, and Computer Equipment for Color Conversion
By establishing a mapping relationship model between color channel data and color signal combination, and generating a target lookup table, the problem of low accuracy of traditional color conversion models is solved, and a higher precision color conversion is achieved.
Patent Information
- Application Number
- CN202410748692.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2044-06-11
AI Technical Summary
The traditional color conversion model is based on the assumptions of channel independence and color product constancy. However, there is a crosstalk effect and color product changes in the display, resulting in low color conversion accuracy.
By obtaining signal binding point information and target color gamut information, collecting color channel data corresponding to color signal combinations in the target space, calculating color data deviations, and establishing a mapping relationship model between color channel data and color signal combinations, and finally generating a target lookup table to record the mapping relationship between color signal combinations and color channel data.
It improves the accuracy of color conversion, effectively avoids data deviations caused by crosstalk and other problems, and enhances the applicability of color conversion.
Smart Images

Figure CN118762627B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular, to a method, device, computer device, storage medium, and computer program product for generating a lookup table for color conversion. Background Art
[0002] The display panel has the characteristic of a wide color gamut. When it is necessary to support some standard color gamuts, it is necessary to debug and calibrate the original colors. Channel independence and chromaticity constancy are only ideal states. Due to limitations in aspects such as the color rendering principle or process, there will inevitably be a certain degree of channel crosstalk or chromaticity change in the display device. The traditional color conversion model is designed based on the assumptions of channel independence and chromaticity constancy. However, there is often a crosstalk effect between the three channels of the display, and the assumption of chromaticity constancy does not hold either, resulting in poor performance and weak applicability of the traditional model.
[0003] For example, in the display unit, the anodes of the three channels are shared, as well as the cathodes, HTL (Hole Transport Layer), etc., resulting in the channel current leaking to other channels through the HTL, that is, the crosstalk effect occurs, and the channel independence is affected. Furthermore, the color space conversion between RGB->XYZ is not a strictly linear relationship, and the modeling accuracy of the traditional GOG (Gain-Offset-Gain Model) model is insufficient. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a method, device, computer device, computer-readable storage medium, and computer program product for generating a lookup table for color conversion that can improve the accuracy of color conversion.
[0005] In a first aspect, the present application provides a method for generating a lookup table for color conversion, including:
[0006] Obtaining first signal binding point information and target color gamut information, and collecting color channel data corresponding to multiple color signal combinations in the target space according to the first signal binding point information;
[0007] Obtaining reference color data, and calculating the color data deviation according to the color channel data and the reference color data;
[0008] Establishing a mapping relationship model between the color channel data and the color signal combination according to the color data deviation;
[0009] Generating a target lookup table according to the target color gamut information and the mapping relationship model, where the target lookup table is used to record the mapping relationship between the color signal combination of the target color gamut and the color channel data.
[0010] In one embodiment, before calculating the color data deviation according to the color channel data and the reference color data, the method further includes:
[0011] Dividing the target space into a plurality of target sub-spaces according to the first signal binding point information;
[0012] Determining the color channel data and the reference color data corresponding to the target sub-space;
[0013] Calculating the color data deviation according to the color channel data and the reference color data includes:
[0014] For each target sub-space, calculating the color data deviation according to the color channel data and the reference color data corresponding to the target sub-space;
[0015] Establishing a mapping relationship model between the color channel data and the color signal combination according to the color data deviation includes:
[0016] Establishing a mapping relationship model between the color channel data and the color signal combination according to multiple sets of the color data deviation.
[0017] In one embodiment, for each target sub-space, calculating the color data deviation according to the color channel data and the reference color data corresponding to the target sub-space includes:
[0018] For each target sub-space, calculating the actual color data corresponding to the color channel data according to the single-color signal data and the mixed-color signal data in the color channel data;
[0019] Calculating the color data deviation between the actual color data and the reference color data.
[0020] In one embodiment, establishing a mapping relationship model between the color channel data and the color signal combination according to multiple sets of the color data deviation includes:
[0021] Calculating the crosstalk component coefficient according to multiple sets of the color data deviation;
[0022] Establishing a mapping relationship model between the color channel data and the color signal combination according to the crosstalk component coefficient.
[0023] In one embodiment, generating a target look-up table according to the target color gamut information and the mapping relationship model includes:
[0024] Calculate target color data corresponding to multiple color signal combinations according to the target color gamut information and the mapping relationship model, where the target color data refers to the actual color channel data in the target color gamut;
[0025] Collect multiple groups of the target color data to obtain a color data set;
[0026] Generate a target lookup table according to the color data set.
[0027] In one embodiment, the generating a target lookup table according to the color data set includes:
[0028] Obtain second signal binding point information, and determine multiple color signal combinations and corresponding color channel data in the target lookup table according to the second signal binding point information;
[0029] For each color signal combination, calculate the reference color data corresponding to the target color gamut according to the color channel data;
[0030] According to the reference color data, select corresponding target color data in the color data set, where the deviation between the selected target color data and the reference color data is the smallest;
[0031] Determine a mapping value corresponding to the color channel data according to the selected target color data, and write the mapping value and the color channel data into the target lookup table correspondingly.
[0032] In a second aspect, the present application also provides a lookup table generation device for color conversion, including:
[0033] An information acquisition module, configured to acquire first signal binding point information and target color gamut information, and collect color channel data corresponding to multiple color signal combinations in the target space according to the first signal binding point information;
[0034] A deviation calculation module, configured to acquire reference color data, and calculate a color data deviation according to the color channel data and the reference color data;
[0035] A model establishment module, configured to establish a mapping relationship model between the color channel data and the color signal combination according to the color data deviation;
[0036] A lookup table generation module, configured to generate a target lookup table according to the target color gamut information and the mapping relationship model, where the target lookup table is used to record the mapping relationship between the color signal combination and the color channel data of the target color gamut.
[0037] In a third aspect, the present application further provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0038] Obtain first signal binding point information and target color gamut information, and collect color channel data corresponding to multiple color signal combinations in the target space according to the first signal binding point information;
[0039] Obtain reference color data, and calculate a color data deviation according to the color channel data and the reference color data;
[0040] Establish a mapping relationship model between the color channel data and the color signal combination according to the color data deviation;
[0041] Generate a target look-up table according to the target color gamut information and the mapping relationship model, where the target look-up table is used to record the mapping relationship between the color signal combination of the target color gamut and the color channel data.
[0042] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0043] Obtain first signal binding point information and target color gamut information, and collect color channel data corresponding to multiple color signal combinations in the target space according to the first signal binding point information;
[0044] Obtain reference color data, and calculate a color data deviation according to the color channel data and the reference color data;
[0045] Establish a mapping relationship model between the color channel data and the color signal combination according to the color data deviation;
[0046] Generate a target look-up table according to the target color gamut information and the mapping relationship model, where the target look-up table is used to record the mapping relationship between the color signal combination of the target color gamut and the color channel data.
[0047] In a fifth aspect, the present application further provides a computer program product, including a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0048] Obtain first signal binding point information and target color gamut information, and collect color channel data corresponding to multiple color signal combinations in the target space according to the first signal binding point information;
[0049] Obtain reference color data, and calculate a color data deviation according to the color channel data and the reference color data;
[0050] Establish a mapping relationship model between the color channel data and the combination of color signals according to the color data deviation;
[0051] Generate a target look-up table according to the target color gamut information and the mapping relationship model, where the target look-up table is used to record the mapping relationship between the combination of color signals in the target color gamut and the color channel data.
[0052] The above-mentioned look-up table generation method, device, computer device, storage medium and computer program product for color conversion obtain the first signal binding point information and the target color gamut information, collect the actual color channel data corresponding to multiple combinations of color signals in the target space according to the first signal binding point information, and then calculate according to the color channel data and the obtained reference color data to obtain the color data deviation between the two. Thus, a mapping relationship model between the color channel data and the combination of color signals is established according to the color data deviation. Finally, a target look-up table is generated according to the target color gamut information and the mapping relationship model. The target look-up table is used to record the mapping relationship between the combination of color signals in the target color gamut and the color channel data. The mapping value of the color channel data in the target look-up table is obtained by fully considering the color data deviation. Therefore, the mapping relationship between different color signal values in the target color gamut and the actual conversion value after color conversion can be obtained through the target look-up table, and the conversion result of the color data can more accurately avoid data deviation problems such as crosstalk, improving the color conversion accuracy. Description of the Drawings
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to these drawings.
[0054] Figure 1 It is an application environment diagram of the look-up table generation method for color conversion in an embodiment;
[0055] Figure 2 It is a flow chart of the look-up table generation method for color conversion in an embodiment;
[0056] Figure 3 It is a flow chart of step S204 of the look-up table generation method for color conversion in an embodiment;
[0057] Figure 4 It is a flow chart of step S208 of the look-up table generation method for color conversion in an embodiment;
[0058] Figure 5 It is a schematic flowchart of step S406 of a lookup table generation method for color conversion in an embodiment;
[0059] Figure 6 It is a structural block diagram of an apparatus for a lookup table generation method for color conversion in an embodiment;
[0060] Figure 7 It is an internal structure diagram of a computer device in an embodiment;
[0061] Figure 8 It is an internal structure diagram of a computer device in another embodiment. Detailed implementation manners
[0062] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0063] The lookup table generation method for color conversion provided by the embodiments of the present application can be applied to an Figure 1 application environment as shown. Among them, the terminal 102 communicates with the server 104 through a network. The terminal 102 can be used to obtain first signal binding point information, target color gamut information, and second signal binding point information, and can also be used to collect color channel data in the target space, etc. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or can be placed in the cloud or other network servers. The data storage system can be used to store data such as first signal binding point information, second signal binding point information, color channel data, and reference color data. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0064] In an exemplary embodiment, as Figure 2 shown, a lookup table generation method for color conversion is provided. Taking the system composed of the terminal 102 and the server 104 in Figure 1 as an example for description, it includes the following steps S202 to step S208. Among them:
[0065] Step S202, obtain first signal binding point information and target color gamut information, and collect color channel data corresponding to multiple color signal combinations in the target space according to the first signal binding point information.
[0066] Among them, the first signal binding point information may include data such as the number of binding points and binding point parameters, which is used to characterize the binding point setting situation in the target space. The color channel data is the data collected under actual conditions corresponding to the color signal combination determined according to the first signal binding point information. Among them, the color channel data may be the tristimulus values corresponding to each color signal combination.
[0067] Exemplarily, in different embodiments, the more the number of binding points in the first signal binding point information, the more accurate the mapping relationship model established based on the data collected thereby, but at the same time, the complexity of data collection and data calculation will also increase. The operator can determine the number of binding points according to actual needs and input it through the terminal 102, so as to send it to the server 104 for use.
[0068] Exemplarily, the server 104 needs to obtain the difference between the combined signal and the sum of the monochromatic signals. Therefore, it is necessary to collect the monochromatic signals and the color channel data (such as tristimulus value data XYZ) of the combined signal: for example, if the monochromatic signals are (1, 0, 0), (0, 1, 0), (0, 0, 1), then the corresponding combined signal is (1, 1, 1); if the monochromatic signals are (0.1, 0, 0), (0, 0.25, 0), (0, 0, 0.3), then the corresponding combined signal is (0.1, 0.25, 0.3). The first signal binding point information obtained by the server 104 can be (0, 0.25, 0.5, 1.0), and the number of its binding points is 4. Subsequently, it is only necessary to collect the color channel data corresponding to a total of 64 groups of color signal combinations in the target space. Further, in this step, the terminal 102 can directly collect the RGB data in the target space according to the usage situation, or can collect the tristimulus value data XYZ in the target space.
[0069] Among them, RGB (red, green, blue) and XYZ are two different color spaces used to describe colors. The RGB color space is an additive color model, usually used in displays, cameras and other electronic devices. It is based on three color components: red (R), green (G) and blue (B). By combining these three colors in different degrees, various colors can be presented. In the RGB model, colors are represented by the intensities of these three colors, and the intensity of each color is usually represented by 8 bits (0 - 255). Therefore, an RGB color is represented by three 8 - bit values (or called a 24 - bit color). The tristimulus value XYZ color space is a three - dimensional color space based on human vision and is a device - independent color space used to describe all colors visible to the human eye. The colors in the XYZ model are represented by three components, namely X, Y and Z. Among them, Y represents brightness, while X and Z represent chromaticity. The definition of the XYZ color space is based on color matching experiments conducted on a large number of observers.
[0070] Step S204: Obtain reference color data, and calculate the color data deviation based on the color channel data and the reference color data.
[0071] Among them, the reference color data refers to the reference data when there is no deviation caused by colorimetric non-constancy and crosstalk between channels, that is, the ideal color data, which can be the ideal tristimulus values. The color data deviation is used to characterize the deviation amount caused by colorimetric non-constancy and crosstalk between channels.
[0072] Exemplarily, the above-mentioned ideal tristimulus values can be the sum of the tristimulus values of monochromatic displays of each channel. Among the signals collected in the above step S202, there are monochromatic signals and mixed-color signals. The server 104 can use the monochromatic signal data to calculate the ideal tristimulus values corresponding to the mixed-color signals.
[0073] Exemplarily, before step S204, the server 104 can divide the target space into multiple target sub-spaces according to the first signal binding point information, and determine the color channel data and reference color data corresponding to the target sub-spaces. The server 104 can divide the space into (N - 1) 3 sub-spaces according to the number N of signal binding points (for example, N = 4 above), and divide it into 27 sub-spaces in 3 dimensions. Next, the server 104 can calculate the color data deviation for each target sub-space according to the color channel data and reference color data corresponding to the target sub-space.
[0074] Step S206: Establish a mapping relationship model between the color channel data and the color signal combination according to the color data deviation.
[0075] Among them, the mapping relationship model is used for the conversion between the color channel data (RGB) and the reference color data (XYZ).
[0076] Exemplarily, the server 104 can establish a mapping relationship model between the color channel data and the color signal combination according to multiple groups of color data deviations. The server 104 can calculate the crosstalk component coefficients according to multiple groups of color data deviations, and establish a mapping relationship model between the color channel data and the color signal combination according to the crosstalk component coefficients. The server 104 determines the crosstalk component coefficient matrix M s , and establish the relationship between the color channel data and the color signal combination. Among them, the deviation components include single, two, and three channels, which have different weights for the tristimulus values, and corresponding conversion relationships can be established as the mapping relationship model.
[0077] Step S208: Generate a target look-up table according to the target gamut information and the mapping relationship model.
[0078] Among them, the target lookup table is used to record the mapping relationship between the color signal combinations in the target color gamut and the color channel data.
[0079] Among them, the target color gamut information can be the color conversion coefficient of the target color gamut. Exemplarily, the server 104 can obtain the mapping relationship table between multiple sets of color signal combination signal values and their actual color channel data according to the mapping relationship model obtained in the above steps and the target color gamut information.
[0080] Furthermore, the specific acquisition method of the target lookup table can be:
[0081] First, the server 104 can obtain the tristimulus values (XYZ values) corresponding to multiple color signal combination values according to the mapping relationship model between the color signal combinations and the actual color channel data established in the above steps, so as to establish a resource pool. The resource pool contains the XYZ values corresponding to each color signal combination value. Subsequently, for a set of color signal combination values RGB, the server 104 can obtain the corresponding target tristimulus values according to the target color gamut information. Next, the server 104 can select the tristimulus value with the smallest error from the resource pool with the target tristimulus value of the above color signal combination value RGB'. Finally, the selected tristimulus value is used as the actual color channel data corresponding to the above color signal combination, combined into a set of mapping relationships, and recorded in the above target lookup table.
[0082] Furthermore, the server 104 can record the RGB of the above color signal combination and the selected RGB' as a set of mapping relationships.
[0083] Exemplarily, the RGB of the above color signal combination is (255, 255, 255). According to the color conversion coefficient of the target color gamut, the corresponding color coordinates in the target color gamut are (0.3127, 0.329), while the actual display color coordinates are (0.3055, 0.3211). Then, the above target lookup table can be used for conversion, and it is found that (255, 250, 248) can display the color coordinates (0.3127, 0.329). Then, the corresponding mapping relationship in the target lookup table is (255, 255, 255) -> (255, 250, 248).
[0084] In the above method for generating a lookup table for color conversion, by obtaining the first signal binding point information and the target color gamut information, collecting the actual color channel data corresponding to multiple color signal combinations in the target space according to the first signal binding point information, and then calculating based on the color channel data and the obtained reference color data to obtain the color data deviation between the two, thereby establishing a mapping relationship model between the color channel data and the color signal combination according to the color data deviation, and finally generating a target lookup table according to the target color gamut information and the mapping relationship model. The target lookup table is used to record the mapping relationship between the color signal combinations in the target color gamut and the color channel data. The color channel data mapping values in the target lookup table are obtained by fully considering the color data deviation. Therefore, the mapping relationship between different color signal values in the target color gamut and the actual conversion values after color conversion can be obtained through the target lookup table, and the conversion result of the color data can more accurately avoid data deviations such as crosstalk, improving the color conversion accuracy.
[0085] Compared with the solutions such as using color calibration software with higher precision in the related art, the above method centrally considers the influencing factors of color data deviation, regards the crosstalk effect as a black box, and conducts unified modeling. Therefore, there is no need to consider the actual physical structure model of the device, and the requirement for sampling data is greatly reduced. Within a hundred test charts, the complexity of modeling and calibration is greatly reduced. In addition, this solution considers the crosstalk between channels, also considers the non-constancy of chromaticity, and considering the influence of chromaticity constancy, adds characteristic factors related to chromaticity constancy, and the model accuracy is also greatly improved.
[0086] In an exemplary embodiment, as Figure 3 shown, the step S204 of calculating the color data deviation according to the color channel data and the reference color data corresponding to each target subspace includes steps S302 to S304. Among them:
[0087] Step S302, for each target subspace, calculate the actual color data corresponding to the color channel data according to the monochromatic signal data and the mixed color signal data in the color channel data.
[0088] Exemplarily, the server 104 can calculate the actual color data according to the sum of the single-channel signal data.
[0089] Exemplarily, determined by sampling two points on the boundary of each subspace according to the following formula, the server 104 can calculate the tristimulus values by calculating the parameters in the gamma coding, where T represents X / Y / Z,
[0090] T = a × C γ
[0091]
[0092] Among them, the calculation formulas for the three stimulus values X, Y, and Z are as follows:
[0093] For the R channel:
[0094]
[0095] For the G channel:
[0096]
[0097] For the B channel:
[0098]
[0099] Among them, the signal value after C normalization can be gray scale 255, C = 1.0; gray scale 128, C = 0.5, etc.
[0100] Among them, T = a × C γ is the GOG model for converting signal values to three stimulus values.
[0101] a is the gain value and γ is the gamma value. T = a × C γ After taking the logarithm on both sides of the formula, it becomes log(T) = log(a) + γ * log(C), showing a linear relationship. Therefore, the correlation coefficient can be obtained using two points. C1, C2 and T1, T2 can directly select the signal data values of two adjacent binding points, and then calculate a and γ in the region between the signals of the two binding points. For example, the calculation of the GOG model parameters between (0.5, 1.0) in the R channel is C2 = R2 = 1.0, C1 = R1 = 0.5; at this time, taking X as an example, the corresponding T1, T2 are T1 = XR2 = 0.8, T2 = XR1 = 0.6. The above data in the current example are all assumed values and can also be measured by a colorimeter during actual operation.
[0102] Step S304, calculate the color data deviation between the actual color data and the reference color data.
[0103] Exemplarily, calculate the difference between the actual color data and the reference color data as the color data deviation, that is, the deviation component P:
[0104]
[0105] Furthermore, the corresponding conversion relationship established in the above steps is used as the mapping relationship model:
[0106]
[0107] Next, use the least squares method to solve the matrix, and M can be obtained by calculation. sAmong them, an, bn, and cn respectively represent the weighting coefficients between signals: an represents the conversion coefficient corresponding to X; bn represents the conversion coefficient corresponding to Y; cn represents the conversion coefficient corresponding to Z.
[0108] In an exemplary embodiment, as Figure 4 shown, step S208 includes steps S402 to S406. Among them:
[0109] Step S402, calculate the target color data corresponding to multiple color signal combinations according to the target color gamut information and the mapping relationship model.
[0110] Among them, the target color data refers to the actual color channel data in the target color gamut, that is, the actual tristimulus values to be displayed.
[0111] Exemplarily, the server 104 can use M in the mapping relationship model s to calculate the target color data corresponding to multiple color signal combinations, and simulate the color channel data corresponding to these color signal combinations by establishing a model to obtain the corresponding XYZ conversion values, thereby obtaining multiple target color data.
[0112] Step S404, collect multiple groups of target color data to obtain a color data set.
[0113] Exemplarily, the server 104 can set the reference tristimulus values as XYZ0:
[0114]
[0115] Among them, the deviation component:
[0116] a RX and γ RX represent the GOG model parameters corresponding to the X stimulus value of the R channel;
[0117] a RY and γ RY represent the GOG model parameters corresponding to the Y stimulus value of the R channel;
[0118] a RZ and γ RZ represent the GOG model parameters corresponding to the Z stimulus value of the R channel; the same applies to the RGB channels. RGB is the normalized signal value.
[0119]
[0120] The actual tristimulus values are XYZ,
[0121]
[0122] Step S406: Generate a target lookup table according to the color data set.
[0123] Exemplarily, the server 104 may write the mapping relationship between the target color data and the original color channel data into the target lookup table.
[0124] In an exemplary embodiment, as Figure 5 shown, step S406 includes steps S502 to S508. Among them:
[0125] Step S502: Obtain the second signal binding point information, and determine multiple color signal combinations and corresponding color channel data in the target lookup table according to the second signal binding point information.
[0126] Among them, the second signal binding point information may include data such as the number of binding points and binding point parameters, which is used to characterize the binding point setting situation in the target lookup table.
[0127] Exemplarily. In different embodiments, the second signal binding point information may be the same as the first signal binding point information, or may be different from or not completely the same as the first signal binding point information. The more the number of binding points in the second signal binding point information, the more comprehensive and perfect the target lookup table calculated according to it, but at the same time, the complexity of data calculation will also increase. The operator can determine the number of binding points according to actual needs and input it through the terminal 102, and then send it to the server 104 for use.
[0128] Exemplarily, the second signal binding point information may be set to [0, 40, 80, 120, 160, 200, 240, 255], and the corresponding number of color signal combinations is 8×8×8 = 512.
[0129] Step S504: For each color signal combination, calculate the reference color data corresponding to the target color gamut according to the color channel data.
[0130] For each color gamut, there is a corresponding standard tristimulus value XYZ for each color signal combination value. Among them, the reference color data refers to the standard tristimulus value data that the color signal combination value in the target color gamut should correspond to.
[0131] Exemplarily, the conversion relationship from the target color gamut RGB to XYZ is as follows, and the server 104 may determine its corresponding target tristimulus value as the reference color data:
[0132]
[0133] Among them, Cof is the conversion coefficient between the signal value and the tristimulus value. For the standard color gamut, cof is preset and determined, such as the sRGB color gamut and the AdobeRGB color gamut:
[0134]
[0135] Step S506: Select corresponding target color data from the color data set according to the reference color data, where the selected target color data has the smallest deviation from the reference color data.
[0136] Exemplarily, the server 104 can use the least mean square error method to search for the target color data RGB' with the smallest deviation value from the color data set according to the reference color data. The color data set contains a total of 255 3 signal combinations and their corresponding tristimulus values XYZ. Each group of RGB corresponds to an XYZ. For example, the tristimulus value corresponding to RGB(0.5, 0.6, 0.7) is XYZ(0.5, 0.6, 0.7).
[0137] Step S508: Determine the mapping value corresponding to the color channel data according to the selected target color data, and write the mapping value and the color channel data into the target look-up table correspondingly.
[0138] Exemplarily, for a signal value combination RGB, the server 104 can convert it to the target color gamut according to the requirements, and according to the conversion coefficient
[0139] cof dst for calculation to obtain the target XYZ dst value. Subsequently, the server 104 finds in the color data set which group of tristimulus values XYZ has the smallest error with XYZ dst and then determines the corresponding RGB signal combination, which is the RGB' signal to be mapped. Finally, the server 104 can repeat the above steps to establish a look-up table for the mapping relationship from RGB to R'G'B', and obtain the target look-up table.
[0140] In another exemplary embodiment, the server 104 needs to obtain the difference between the combined signal and the sum of the monochromatic signals. Therefore, it is necessary to collect the color channel data of the monochromatic signals and the combined signal. The first signal binding point information obtained by the server 104 can be (0, 0.25, 0.5, 1.0), and the number of its binding points is 4. Subsequently, the color channel data corresponding to a total of 64 groups of color signal combinations in the target space are collected respectively. The server 104 divides the target space into multiple target sub-spaces according to the first signal binding point information, determines the color channel data and reference color data corresponding to the target sub-spaces, and divides the space into (N - 1) 3 sub-spaces according to the number of signal binding points N (for example, N = 4 above), and divides it into 27 sub-spaces in 3 dimensions. Next, the server 104 can target each target sub-space.
[0141] Next, for each target subspace, the server 104 calculates the actual color data corresponding to the color channel data based on the monochromatic signal data and the mixed color signal data in the color channel data, and calculates the color data deviation between the actual color data and the reference color data. The server 104 calculates the crosstalk component coefficient according to multiple sets of color data deviations, and determines the crosstalk component coefficient matrix M s , establishes the relationship between the color channel data and the reference color data. The determined deviation components include single, two, and three channels, which have different weights for the tristimulus values, and corresponding conversion relationships can be established as the mapping relationship model.
[0142] Subsequently, the server 104 uses M in the mapping relationship model s to calculate the target color data corresponding to multiple color signal combinations, calibrates the deviation of the color channel data corresponding to these color signal combinations one by one to obtain multiple target color data, and then sorts and aggregates the target color data according to the numerical size of the original color channel data to obtain the color data set.
[0143] Finally, the server 104 sets the second signal binding point information as [0, 40, 80, 120, 160, 200, 240, 255], and there are a total of 8×8×8 = 512 corresponding color signal combinations. For each color signal combination, the server 104 calculates the reference color data corresponding to the target color gamut according to the color channel data. According to the reference color data, using the least mean square error method, the target color data RGB′ with the smallest deviation value is searched from the color data set. For a signal value combination RGB, the server 104 calculates according to the target color gamut to which it is required to be converted and the RGB-to-XYZ conversion coefficient cof dst to obtain the target XYZ dst value. Subsequently, the server 104 finds in the color data set which set of tristimulus values XYZ has the smallest error with XYZ dst , and then determines the corresponding RGB signal combination, which is the RGB’ signal to be mapped. Finally, the server 104 can repeat the above steps to establish a mapping relationship lookup table from RGB to R′G′B′ and obtain the target lookup table.
[0144] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the indications of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0145] Based on the same inventive concept, an embodiment of the present application also provides a lookup table generation device for color conversion for implementing the above-mentioned lookup table generation method for color conversion. The implementation solutions provided by this device to solve problems are similar to the implementation solutions described in the above method. Therefore, the specific limitations in one or more embodiments of the lookup table generation device for color conversion provided below can refer to the limitations on the lookup table generation method for color conversion in the above text, and will not be repeated here.
[0146] In an exemplary embodiment, as Figure 6 shown, a lookup table generation device for color conversion is provided, including: an information acquisition module 602, a deviation calculation module 604, a model establishment module 606, and a lookup table generation module 608, where:
[0147] The information acquisition module 602 is configured to acquire first signal binding point information and target color gamut information, and collect color channel data corresponding to multiple color signal combinations in the target space according to the first signal binding point information;
[0148] The deviation calculation module 604 is configured to acquire reference color data, and calculate the color data deviation according to the color channel data and the reference color data;
[0149] The model establishment module 606 is configured to establish a mapping relationship model between the color channel data and the color signal combination according to the color data deviation;
[0150] The lookup table generation module 608 is configured to generate a target lookup table according to the target color gamut information and the mapping relationship model, where the target lookup table is used to record the mapping relationship between the color signal combination of the target color gamut and the color channel data.
[0151] In one of the embodiments, the device further includes:
[0152] A space division module, configured to divide a target space into multiple target sub-spaces according to first signal binding point information;
[0153] A data analysis module, configured to determine color channel data and reference color data corresponding to the target sub-spaces;
[0154] The deviation calculation module 604 is further configured to calculate a color data deviation for each target sub-space according to the color channel data and the reference color data corresponding to the target sub-space;
[0155] The model establishment module 606 is further configured to establish a mapping relationship model between the color channel data and the color signal combination according to multiple groups of color data deviations.
[0156] In one embodiment, the deviation calculation module 604 is further configured to calculate, for each target sub-space, the actual color data corresponding to the color channel data according to the single-color signal data and the mixed-color signal data in the color channel data; calculate the color data deviation between the actual color data and the reference color data.
[0157] In one embodiment, the model establishment module 606 is further configured to calculate a crosstalk component coefficient according to multiple groups of color data deviations; establish a mapping relationship model between the color channel data and the color signal combination according to the crosstalk component coefficient.
[0158] In one embodiment, the look-up table generation module 608 includes:
[0159] A data calculation unit, configured to calculate target color data corresponding to multiple color signal combinations according to the target color gamut information and the mapping relationship model, where the target color data refers to the actual color channel data in the target color gamut;
[0160] A data collection unit, configured to collect multiple groups of target color data to obtain a color data set;
[0161] A look-up table generation unit, configured to generate a target look-up table according to the color data set.
[0162] In one embodiment, the look-up table generation unit includes:
[0163] An information acquisition sub-unit, configured to acquire second signal binding point information, and determine multiple color signal combinations and corresponding color channel data in the target look-up table according to the second signal binding point information;
[0164] A data calculation sub-unit, configured to calculate, for each color signal combination, the reference color data corresponding to the target color gamut according to the color channel data;
[0165] A data selection subunit, configured to select corresponding target color data from a set of color data according to reference color data, where the deviation between the selected target color data and the reference color data is the smallest;
[0166] A lookup table generation subunit, configured to determine a mapping value corresponding to color channel data according to the selected target color data, and write the mapping value and the color channel data into a target lookup table correspondingly.
[0167] Each module in the above lookup table generation device for color conversion can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in the processor of the computer device in the form of hardware or be independent of it, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0168] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 7 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as first signal binding point information, second signal binding point information, color channel data, and reference color data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for generating a lookup table for color conversion.
[0169] In an exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 8As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a method for generating a lookup table for color conversion. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0170] Those skilled in the art can understand that Figure 8 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0171] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented: obtaining first signal binding point information and target color gamut information, and collecting color channel data corresponding to multiple color signal combinations in the target space according to the first signal binding point information; obtaining reference color data, and calculating the color data deviation according to the color channel data and the reference color data; establishing a mapping relationship model between the color channel data and the color signal combination according to the color data deviation; generating a target lookup table according to the target color gamut information and the mapping relationship model, where the target lookup table is used to record the mapping relationship between the color signal combination of the target color gamut and the color channel data.
[0172] In one embodiment, when the processor executes the computer program, the following steps are further implemented: dividing the target space into a plurality of target sub-spaces according to the first signal binding point information; determining the color channel data and the reference color data corresponding to the target sub-spaces; for each target sub-space, calculating the color data deviation according to the color channel data and the reference color data corresponding to the target sub-space; establishing a mapping relationship model between the color channel data and the color signal combination according to multiple sets of color data deviations.
[0173] In one embodiment, when the processor executes the computer program, the following steps are further implemented: for each target sub-space, calculating the actual color data corresponding to the color channel data according to the monochromatic signal data and the mixed color signal data in the color channel data; calculating the color data deviation between the actual color data and the reference color data.
[0174] In one embodiment, when the processor executes the computer program, the following steps are further implemented: calculating the crosstalk component coefficient according to multiple sets of color data deviations; establishing a mapping relationship model between the color channel data and the color signal combination according to the crosstalk component coefficient.
[0175] In one embodiment, when the processor executes the computer program, the following steps are further implemented: calculating the target color data corresponding to multiple color signal combinations according to the target color gamut information and the mapping relationship model, wherein the target color data refers to the actual color channel data in the target color gamut; collecting multiple sets of target color data to obtain a color data set; generating a target look-up table according to the color data set.
[0176] In one embodiment, when the processor executes the computer program, the following steps are further implemented: obtaining the second signal binding point information, and determining multiple color signal combinations and the corresponding color channel data in the target look-up table according to the second signal binding point information; for each color signal combination, calculating the reference color data corresponding to the target color gamut according to the color channel data; selecting the corresponding target color data in the color data set according to the reference color data, wherein the deviation between the selected target color data and the reference color data is the smallest; determining the mapping value corresponding to the color channel data according to the selected target color data, and writing the mapping value and the color channel data into the target look-up table correspondingly.
[0177] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining first signal binding point information and target color gamut information, and collecting color channel data corresponding to a plurality of color signal combinations in a target space according to the first signal binding point information; obtaining reference color data, and calculating a color data deviation according to the color channel data and the reference color data; establishing a mapping relationship model between the color channel data and the color signal combination according to the color data deviation; generating a target lookup table according to the target color gamut information and the mapping relationship model, where the target lookup table is used to record the mapping relationship between the color signal combination of the target color gamut and the color channel data.
[0178] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: dividing the target space into a plurality of target sub-spaces according to the first signal binding point information; determining the color channel data and the reference color data corresponding to the target sub-spaces; for each target sub-space, calculating a color data deviation according to the color channel data and the reference color data corresponding to the target sub-space; establishing a mapping relationship model between the color channel data and the color signal combination according to multiple sets of color data deviations.
[0179] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: for each target sub-space, calculating the actual color data corresponding to the color channel data according to the monochromatic signal data and the mixed color signal data in the color channel data; calculating the color data deviation between the actual color data and the reference color data.
[0180] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: calculating a crosstalk component coefficient according to multiple sets of color data deviations; establishing a mapping relationship model between the color channel data and the color signal combination according to the crosstalk component coefficient.
[0181] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: calculating target color data corresponding to a plurality of color signal combinations according to the target color gamut information and the mapping relationship model, where the target color data refers to the actual color channel data in the target color gamut; collecting multiple sets of target color data to obtain a color data set; generating a target lookup table according to the color data set.
[0182] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining second signal binding point information, and determining a plurality of color signal combinations and corresponding color channel data in a target look-up table according to the second signal binding point information; for each color signal combination, calculating reference color data corresponding to a target color gamut according to the color channel data; according to the reference color data, selecting corresponding target color data from a color data set, wherein the deviation between the selected target color data and the reference color data is the smallest; determining a mapping value corresponding to the color channel data according to the selected target color data, and writing the mapping value and the color channel data into the target look-up table correspondingly.
[0183] In one embodiment, a computer program product is provided, including a computer program, which when executed by a processor, implements the following steps: obtaining first signal binding point information and target color gamut information, and collecting color channel data corresponding to a plurality of color signal combinations in a target space according to the first signal binding point information; obtaining reference color data, and calculating a color data deviation according to the color channel data and the reference color data; establishing a mapping relationship model between the color channel data and the color signal combination according to the color data deviation; generating a target look-up table according to the target color gamut information and the mapping relationship model, wherein the target look-up table is used to record the mapping relationship between the color signal combination of the target color gamut and the color channel data.
[0184] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: dividing the target space into a plurality of target sub-spaces according to the first signal binding point information; determining the color channel data and the reference color data corresponding to the target sub-spaces; for each target sub-space, calculating a color data deviation according to the color channel data and the reference color data corresponding to the target sub-space; establishing a mapping relationship model between the color channel data and the color signal combination according to multiple sets of color data deviations.
[0185] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: for each target sub-space, calculating actual color data corresponding to the color channel data according to the monochromatic signal data and the mixed color signal data in the color channel data; calculating a color data deviation between the actual color data and the reference color data.
[0186] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: calculating a crosstalk component coefficient according to multiple sets of color data deviations; establishing a mapping relationship model between the color channel data and the color signal combination according to the crosstalk component coefficient.
[0187] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: calculating target color data corresponding to multiple color signal combinations according to target color gamut information and a mapping relationship model, where the target color data refers to actual color channel data in the target color gamut; collecting multiple groups of target color data to obtain a color data set; and generating a target look-up table according to the color data set.
[0188] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining second signal binding point information, and determining multiple color signal combinations and corresponding color channel data in the target look-up table according to the second signal binding point information; for each color signal combination, calculating reference color data corresponding to the target color gamut according to the color channel data; selecting corresponding target color data from the color data set according to the reference color data, where the deviation between the selected target color data and the reference color data is the smallest; determining a mapping value corresponding to the color channel data according to the selected target color data, and writing the mapping value and the color channel data into the target look-up table in a corresponding manner.
[0189] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0190] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0191] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A method for generating a lookup table for color conversion, characterized in that: The method comprises: Acquire first signal binding point information and target color gamut information, and collect color channel data corresponding to multiple color signal combinations in the target space according to the first signal binding point information; Obtain reference color data; Dividing the target space into a plurality of target subspaces according to the first signal binding point information; Determine the color channel data and the reference color data corresponding to the target subspace; For each of the target subspaces, calculating a color data deviation according to the color channel data corresponding to the target subspace and the reference color data; Establishing a mapping relationship model between the color channel data and the color signal combination according to the plurality of groups of color data deviations; A target lookup table is generated according to the target color gamut information and the mapping relationship model, wherein the target lookup table is used to record the mapping relationship between the color signal combination of the target color gamut and the color channel data.
2. The method according to claim 1, characterized in that The step of calculating the color data deviation for each target subspace according to the color channel data corresponding to the target subspace and the reference color data includes: For each of the target subspaces, calculating actual color data corresponding to the color channel data according to the monochrome signal data and the mixed color signal data in the color channel data; A color data deviation between the actual color data and the reference color data is calculated.
3. The method according to claim 2, characterized in that The step of establishing a mapping relationship model between the color channel data and the color signal combination according to the plurality of groups of color data deviations includes: Calculating crosstalk component coefficients according to the plurality of sets of color data deviations; A mapping relationship model between the color channel data and the color signal combination is established according to the crosstalk component coefficient.
4. The method according to claim 1, characterized in that: The generating a target lookup table according to the target color gamut information and the mapping relationship model includes: Calculating target color data corresponding to a plurality of color signal combinations according to the target color gamut information and the mapping relationship model, wherein the target color data refers to the actual color channel data in the target color gamut; Gathering multiple groups of target color data to obtain a color data set; A target lookup table is generated based on the color data set.
5. The method according to claim 4, characterized in that The step of generating a target lookup table according to the color data set comprises: Acquire second signal binding point information, and determine multiple color signal combinations and corresponding color channel data in a target lookup table according to the second signal binding point information; For each color signal combination, calculating the reference color data corresponding to the target color gamut according to the color channel data; According to the reference color data, selecting corresponding target color data from the color data set, wherein the selected target color data has the smallest deviation from the reference color data; A mapping value corresponding to the color channel data is determined according to the selected target color data, and the mapping value and the color channel data are written into the target lookup table in correspondence.
6. A lookup table generation device for color conversion, characterized in that: The device comprises: An information acquisition module, used to acquire first signal binding point information and target color gamut information, and collect color channel data corresponding to a plurality of color signal combinations in a target space according to the first signal binding point information; a deviation calculation module, configured to divide the target space into a plurality of target subspaces according to the first signal binding point information; determine the color channel data and reference color data corresponding to the target subspace; and calculate the color data deviation for each target subspace according to the color channel data corresponding to the target subspace and the reference color data; A model building module, used to build a mapping relationship model between the color channel data and the color signal combination according to the plurality of groups of color data deviations; A lookup table generation module is used to generate a target lookup table according to the target color gamut information and the mapping relationship model, wherein the target lookup table is used to record the mapping relationship between the color signal combination of the target color gamut and the color channel data.
7. The device according to claim 6, characterized in that The deviation calculation module is also used to calculate the actual color data corresponding to the color channel data according to the monochrome signal data and the mixed color signal data in the color channel data for each target subspace; A color data deviation between the actual color data and the reference color data is calculated.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Object display method and device and color lookup table generation method and device
CN115294945A