Color calibration method, device and electronic equipment

CN122199691BActive Publication Date: 2026-09-18BEIJING SMARTER EYE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610516773.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-04-20
Publication Date
2026-09-18
Estimated Expiration
2046-04-20

AI Technical Summary

Technical Problem

[0004]本发明的主要目的在于公开了一种颜色标定方法、装置及电子设备,以至少解决相关技术中的颜色标定方案,特征表达不足或模型复杂繁琐等问题

Benefits of technology

[0020] The color calibration method, apparatus, and electronic device provided by this invention construct a dual feature vector with linear basis and nonlinear enhancement, which improves the feature representation capability while adopting a simplified and efficient regularization solution mechanism to achieve a balance between high accuracy and ease of implementation. This can solve the problems of insufficient feature representation or complex and cumbersome models in related technologies. The technical solution provided by this application takes into account both feature representation capability and solution convenience, and can effectively improve the color calibration accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199691B_ABST
    Figure CN122199691B_ABST
Patent Text Reader

Abstract

The application discloses a color calibration method and device and electronic equipment, and the method comprises the following steps: extracting the RGB channel mean value of each color block for the current collected image; obtaining the linear basic feature based on the RGB channel mean value for each color block, and obtaining the nonlinear enhancement feature based on the linear basic feature; fusing the linear basic feature and the nonlinear enhancement feature to construct a multi-dimensional feature vector; establishing a linear mapping model of the multi-dimensional feature vector and the CIELAB color space, and calculating and obtaining part or all parameters of the linear mapping model through an adaptive regularization least square method. The technical scheme provided by the application considers the feature expression ability and the solving convenience, and can effectively improve the color calibration precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, and more specifically, to a color calibration method, apparatus, and electronic device. Background Technology

[0002] In machine vision applications, the RGB color space has inherent defects such as strong device correlation and non-uniform color gamut, making it impossible to directly achieve consistent color transmission across devices. Therefore, it is necessary to establish an accurate conversion relationship between the RGB color space and device-independent color spaces such as CIELAB through color calibration. This is the core prerequisite for color measurement and industrial color inspection.

[0003] In related technologies, existing color calibration schemes have the following intractable technical problems: Traditional third-order polynomial models rely on multi-dimensional RGB mixed feature vectors (including cross terms), which have a certain nonlinear fitting ability, but the model is complex, the parameter solution is cumbersome, and the cross terms lack clear physical meaning, which easily leads to overfitting; some simplified methods (such as linear regression and simple 6-dimensional feature mapping) reduce the solution complexity, but the feature expression ability is insufficient and the calibration error is large; when using SVD decomposition or ordinary least squares method to solve, there is generally a lack of adaptive anti-overfitting mechanism, which further amplifies the calibration error and makes it difficult to balance fitting accuracy and model stability. Summary of the Invention

[0004] The main objective of this invention is to disclose a color calibration method, apparatus, and electronic device to at least solve the problems of insufficient feature expression or complex and cumbersome models in related color calibration schemes.

[0005] According to one aspect of the present invention, a color calibration method is provided.

[0006] The color calibration method according to the present invention includes: for the currently acquired image, extracting the mean value of the RGB channels of each color block; for each color block, obtaining linear basic features based on the mean value of the RGB channels, and obtaining nonlinear enhanced features based on the linear basic features; fusing the linear basic features and the nonlinear enhanced features to construct a multidimensional feature vector; establishing a linear mapping model between the multidimensional feature vector and the CIELAB color space, and calculating some or all of the parameters of the linear mapping model using an adaptive regularized least squares method.

[0007] For the currently acquired image, the above extraction of the RGB channel mean of each color patch includes: The average RGB channel value of each color block is obtained using the following method:

[0008] in, This represents the total number of pixels in a single current color patch region. The first color block within the current color block The original grayscale value of the R channel of each pixel. The first color block within the current color block The original grayscale value of the G channel of each pixel. The first color block within the current color block The original grayscale value of the B channel of each pixel. This represents the average R channel value of the current color block. This represents the average G channel value of the current color block. The mean value of the B channel of the current color block.

[0009] The above-mentioned linear basic features obtained based on the RGB channel mean, and the non-linear enhanced features obtained based on the above-mentioned linear basic features, include: The RGB channel mean is normalized using the following method to obtain linear basic features. : , , ,in, The values ​​range from [0, 1]. Nonlinear enhancement features are obtained through the following methods. , , , , , : , , , , , ,in, This is the default minimum value.

[0010] The above-mentioned integration of linear basic features and nonlinear enhancement features constructs a multidimensional feature vector, including: linear fundamental features and nonlinear enhancement features , , , , , The features are fused to construct a 9-dimensional enhanced feature vector F: .

[0011] The above-mentioned linear mapping model between the multidimensional feature vectors and the CIELAB color space is established, and some or all of the parameters of the linear mapping model are obtained by calculating them using the adaptive regularized least squares method, including: The above multidimensional feature vectors are constructed by combining adaptive L2 regularization terms in the following manner. Linear mapping model to CIELAB color space: ,in, This is the output CIELAB color value vector. For bias vectors, Weight matrix; Construct the objective function based on the sum of squared calibration errors and the adaptive regularization term; Based on the objective function described above, obtain the weight matrix W and bias vector from all parameters of the linear mapping model described above. The analytical solution.

[0012] The objective function is as follows:

[0013] in, This represents the total number of color swatches. For the first The default standard CIELAB value for each color block. For adaptive regularization coefficients, ,in For feature vectors global variance For the first Predicted CIELAB values ​​for each color block. , for Weight matrix, each element Indicates the first The feature is related to the first The contribution weight of each CIELAB component.

[0014] The weight matrix is ​​obtained in the following way. Analytical solution: ; The bias vector is obtained in the following way. Analytical solution: ; in, This represents the total number of color swatches. for The feature matrix consists of a 9-dimensional feature vector for each color patch in each row. , for A standard CIELAB matrix, where each row corresponds to the standard CIELAB value of a color patch. for identity matrix for A vector consisting entirely of 1s For the first The standard CIELAB value vector of each color block For the first The 9-dimensional feature vector of each color block.

[0015] After establishing the linear mapping model between the multidimensional feature vector and the CIELAB color space, the method further includes: calculating the color difference value corresponding to the current color patch based on the default standard CIELAB value and the predicted CIELAB value, and verifying the color calibration accuracy based on the color difference value.

[0016] According to another aspect of the present invention, a color calibration device is provided.

[0017] The color calibration device according to the present invention includes: an extraction module for extracting the RGB channel mean of each color block in a currently acquired image; an acquisition module for acquiring linear basic features based on the RGB channel mean for each color block, and acquiring nonlinear enhanced features based on the linear basic features; a fusion construction module for fusing the linear basic features and the nonlinear enhanced features to construct a multidimensional feature vector; and an establishment module for establishing a linear mapping model between the multidimensional feature vector and the CIELAB color space, and calculating some or all parameters of the linear mapping model using an adaptive regularized least squares method.

[0018] According to another aspect of the present invention, an electronic device is provided.

[0019] The electronic device according to the present invention includes: a processor and a memory, wherein the memory is used to store executable instructions of the processor, wherein the processor is configured to perform the color calibration method described above by executing the executable instructions.

[0020] The color calibration method, apparatus, and electronic device provided by this invention construct a dual feature vector with linear basis and nonlinear enhancement, which improves the feature representation capability while adopting a simplified and efficient regularization solution mechanism to achieve a balance between high accuracy and ease of implementation. This can solve the problems of insufficient feature representation or complex and cumbersome models in related technologies. The technical solution provided by this application takes into account both feature representation capability and solution convenience, and can effectively improve the color calibration accuracy. Attached Figure Description

[0021] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0022] Figure 1 This is a flowchart of a color calibration method according to an embodiment of the present invention; Figure 2 This is a flowchart of a color calibration method according to a preferred embodiment of the present invention; Figure 3 This is a structural block diagram of a color calibration device according to an embodiment of the present invention; Figure 4 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0023] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] The specific implementation of the present invention will now be described in detail with reference to the accompanying drawings.

[0025] According to an embodiment of the present invention, a color calibration method is provided.

[0026] Figure 1 This is a flowchart of a color calibration method according to an embodiment of the present invention. Figure 1 As shown, the color calibration method includes: Step S101: For the currently acquired image, extract the average RGB channel value of each color block; Step S102: For each color block, obtain linear basic features based on the above RGB channel mean, and obtain non-linear enhanced features based on the above linear basic features; Step S103: Combine the above-mentioned linear basic features with the above-mentioned nonlinear enhanced features to construct a multidimensional feature vector; Step S104: Establish a linear mapping model between the above multidimensional feature vector and the CIELAB color space, and calculate some or all of the parameters of the above linear mapping model using the adaptive regularized least squares method.

[0027] Figure 1The color calibration method described above extracts the RGB channel mean values ​​of each color patch in the currently acquired image. For each color patch, linear basic features are obtained based on the RGB channel mean values, and nonlinear enhanced features are obtained based on these linear basic features. Then, the linear basic features and the nonlinear enhanced features are fused to construct a multidimensional feature vector. Finally, a linear mapping model between the multidimensional feature vector and the CIELAB color space is established, where some or all parameters of the linear mapping model are calculated using an adaptive regularized least squares method. By constructing a dual feature vector of linear basic and nonlinear enhanced features, this method improves feature representation capabilities while employing a simplified and efficient regularization solution mechanism, achieving a balance between high accuracy and ease of implementation. This solves the problems of insufficient feature representation or complex and cumbersome models in existing methods. This application balances feature representation capabilities and solution convenience, and can effectively improve color calibration accuracy.

[0028] In step S101 above, extracting the RGB channel mean of each color block in the currently acquired image can further include the following processing: The average RGB channel value of each color block is obtained using the following method:

[0029] in, This represents the total number of pixels in a single current color patch region. The first color block within the current color block The original grayscale value of the R channel of each pixel. The first color block within the current color block The original grayscale value of the G channel of each pixel. The first color block within the current color block The original grayscale value of the B channel of each pixel. This represents the average R channel value of the current color block. This represents the average G channel value of the current color block. The mean value of the B channel of the current color block.

[0030] In step S102 above, obtaining linear basic features based on the RGB channel mean and obtaining nonlinear enhanced features based on the linear basic features can further include the following processing: The RGB channel mean is normalized using the following method to obtain linear basic features. : , , ,in, The values ​​range from [0, 1]. Nonlinear enhancement features are obtained through the following methods. , , , , , : , , , , , ,in, This is the default minimum value.

[0031] In step S103 above, fusing the linear basic features and the nonlinear enhancement features to construct a multidimensional feature vector can further include the following processing: linear fundamental features and nonlinear enhancement features , , , , , The features are fused to construct a 9-dimensional enhanced feature vector F: .

[0032] In step S104 above, establishing a linear mapping model between the multidimensional feature vector and the CIELAB color space, and calculating some or all of the parameters of the linear mapping model using the adaptive regularized least squares method, may further include the following processing: (1) Combining the adaptive L2 regularization term, the linear mapping model from the above multidimensional feature vector F to the CIELAB color space is established in the following way: ,in, This is the output CIELAB color value vector. For bias vectors, The weight matrix, F, is a multi-dimensional feature vector (e.g., the 9-dimensional enhanced feature vector mentioned above). (2) Construct the objective function based on the sum of squared calibration errors and the adaptive regularization term; In the preferred implementation process, the above objective function It can be as follows:

[0033] in, This means finding an optimization variable that uses the weight matrix W and the bias vector b as optimization variables. The parameter that gets the minimum value This represents the total number of color swatches. For the first The default standard CIELAB value for each color block. For adaptive regularization coefficients, ,in For feature vectors global variance For the first Predicted CIELAB values ​​for each color block. , for Weight matrix, each element Indicates the first The feature is related to the first The contribution weight of each CIELAB component.

[0034] (3) Based on the above objective function, obtain the weight matrix W and bias vector from all parameters of the above linear mapping model. The analytical solution can be obtained directly. For example, by taking the partial derivatives of the objective function and setting them to zero, the analytical solution of the parameters can be obtained directly without iteration, thus avoiding the problem of low efficiency in iterative solutions in related techniques.

[0035] In the preferred implementation process, the weight matrix can be obtained in the following way. Analytical solution: ; In the preferred implementation process, the bias vector is obtained in the following way. Analytical solution: ; in, This represents the total number of color swatches. for The feature matrix consists of a 9-dimensional feature vector for each color patch in each row. , for A standard CIELAB matrix, where each row corresponds to the standard CIELAB value of a color patch. for identity matrix for A vector consisting entirely of 1s For the first The standard CIELAB value vector of each color block For the first The 9-dimensional feature vector of each color block.

[0036] After step S104 above, the following processing may also be included: calculate the color difference value corresponding to the current color block based on the default standard CIELAB value and the predicted CIELAB value, and verify the color calibration accuracy based on the color difference value.

[0037] For example, the CIE 1976 standard color difference formula can be used to verify calibration accuracy. This formula is a universal accuracy evaluation standard in the field of color metrology, and the specific formula is as follows:

[0038] in, For the first The color difference value of each color block The smaller the value, the higher the color calibration accuracy; To achieve the above formula: The calculated predicted CIELAB values ​​correspond one-to-one with the standard values. For the first The standard CIELAB value for each color block (in practice, this can be provided by the color chart manufacturer and conforms to the CIE 1976 standard).

[0039] The following combination Figure 2 The preferred embodiments described above are further described below.

[0040] Figure 2 This is a flowchart of a color calibration method according to a preferred embodiment of the present invention. Figure 2 As shown, the color calibration method includes: Step S201: Color card image acquisition and preprocessing.

[0041] Based on the premise of "uniform color blocks", specifically, a standard IT8.7 / 2 color chart image can be acquired under a D65 standard light source to avoid interference from ambient light. After acquisition, the average RGB channel value of each color block is extracted, as shown in the following formula: , ,

[0042] in, This represents the total number of pixels in a single color block area, and pixels at the edge of the color block need to be removed (to avoid edge blurring interference). For the first color block The original grayscale values ​​of the R, G, and B channels of each pixel (value range 0~255); This is the average value of the R, G, and B channels of the color block, used to characterize the true color intensity of each channel of the color block and avoid single-pixel noise interference.

[0043] Step S202: Channel-enhanced dual-feature construction.

[0044] For example, the independence of the RGB three channels can be preserved, redundant cross terms can be avoided, and a 9-dimensional enhanced feature vector can be constructed. To balance feature representation ability and model simplicity, the specific steps are as follows: (1) Linear basic feature construction: The mean values ​​of the RGB channels are normalized to preserve the linear relationship between channels and eliminate numerical scale differences. , ,

[0045] in, The values ​​are all in the range of [0,1], used to preserve the original linear correlation characteristics of the RGB channels, and serve as the basic dimension of the feature vector.

[0046] (2) Construction of composite nonlinear enhancement features: The dual transformation of square root and logarithm is used for collaborative optimization to specifically enhance the nonlinear expression capability of the channel and adapt to the nonlinear response characteristics of the imaging system. , ; , ; , ; in, The default minimum value (e.g., Values ​​can be retrieved ), used to avoid The problem that logarithmic operations are meaningless when approaching 0; square root transformation can enhance low-brightness areas ( The color discrimination of the image is improved. Logarithmic transformation can compensate for the nonlinear response deviation of the imaging device. The synergistic effect of the two transformations greatly enhances the ability of features to represent subtle differences in RGB colors.

[0047] (3) Feature vector integration: The linear basic features and nonlinear enhanced features are fused to form a 9-dimensional enhanced feature vector: ; Among them, the above-mentioned 9-dimensional feature vector not only retains the original linear characteristics of the RGB channels, but also fully explores the color change rules inside the channels through double nonlinear transformation. With no redundant feature dimensions, it effectively balances feature expression capability and model simplicity. Compared with the single transformation feature in related technologies, it significantly improves the representation accuracy.

[0048] Step S203: Construct a fast regularized mapping model.

[0049] Establish feature vectors The linear mapping model to the CIELAB color space introduces an adaptive L2 regularization term to dynamically balance fitting accuracy and overfitting risk. The model formula is as follows:

[0050] in, The output CIELAB color value vector ( This is the luminance component, with a value range of 0 to 100. For red and green components, the value range is -128 to 127; The values ​​are yellow and blue components, ranging from -128 to 127, conforming to the CIE 1976 standard. for Weight matrix, each element Indicates the first The feature is related to the first The contribution weights of each CIELAB component visually reflect the degree of influence of each feature. It is a bias vector used to compensate for the inherent offset between the imaging system and the color space conversion, thereby improving mapping accuracy; Among them, the adaptive L2 regularization constraint is: The regularization coefficient is dynamically adjusted according to the global variance of the feature, eliminating the need for manual parameter tuning and solving the problem of poor adaptability of fixed coefficients in related technologies.

[0051] The linear mapping model is simple, intuitive, and computationally inefficient, making it suitable for engineering applications. The adaptive regularization term can automatically adjust the constraint strength based on the feature distribution. Compared to fixed or no regularization designs in related technologies, it can more accurately balance fitting accuracy and model stability, avoiding overfitting or underfitting.

[0052] Step S204: Quickly solve the parameters of the linear mapping model.

[0053] Using the adaptive regularized least squares method, the weight matrix can be solved in one step. and bias vector This eliminates the need for iterative calculations, improving solution efficiency. The specific formula and steps are as follows: (1) Construction of objective function: With the goal of minimizing the sum of squared calibration errors + adaptive regularization term, the following objective function is constructed:

[0054] in, This refers to the total number of color swatches on the color chart (compatible with IT8.7 / 2 color chart). ); For the first The standard CIELAB value for each color block (the standard CIELAB value is the default value; specifically, it can be provided by the color chart manufacturer and conforms to the CIE 1976 standard). The adaptive regularization coefficient is calculated using the following formula: ,in For feature vectors The global variance is used to automatically balance the fitting error with the strength of the regularization constraint. For the first The predicted CIELAB value for each color block is obtained from the formula above: Calculated.

[0055] (2) Solution: By taking the partial derivatives of the objective function and setting them to zero, the analytical solution of the parameters is obtained directly without iteration, thus avoiding the problem of low efficiency in iterative solutions in related techniques. Specifically, the parameters and as follows:

[0056]

[0057] in, for Feature matrix (each row corresponds to a 9-dimensional feature vector of a color patch) The dimensions strictly match the feature vector dimensions; for A standard CIELAB matrix (each row corresponds to the standard CIELAB value of a color block), with dimensions matching the output CIELAB vector; for The identity matrix is ​​matched with the eigendimensional dimension of the characteristic matrix to ensure that the matrix is ​​invertible; for An all-one vector ensures dimensionality compatibility for matrix operations; For the first The standard CIELAB value vector of each color block For the first The 9-dimensional feature vector of each color block.

[0058] Therefore, the fast solution for model parameters provided in this application can calculate all the parameters of the above linear mapping model in one step without iterative calculation. The solution process is simple and clear with low computational load. At the same time, the adaptive regularization coefficient improves the parameter estimation accuracy, effectively avoids overfitting, and balances efficiency and accuracy.

[0059] Step S205: Verify calibration results.

[0060] For example, the calibration accuracy can be verified using the following standard color difference formula:

[0061] in: For the first The color difference value of each color block The smaller the value, the higher the calibration accuracy; when At that time, the human eye cannot distinguish color differences, thus meeting the requirements for high-precision calibration; To pass the formula: The calculated predicted CIELAB values ​​correspond one-to-one with the standard values. Therefore, using the aforementioned standard color difference formula to verify the calibration results makes the evaluation more objective and reliable, and facilitates quantitative comparison with calibration accuracy schemes in related technologies.

[0062] According to an embodiment of the present invention, a color calibration device is provided.

[0063] Figure 3 This is a structural block diagram of a color calibration device according to an embodiment of the present invention. Figure 3 As shown, the color calibration device includes: an extraction module 30, used to extract the RGB channel mean of each color block in the currently acquired image; an acquisition module 32, used to acquire linear basic features based on the RGB channel mean for each color block, and acquire nonlinear enhanced features based on the linear basic features; a fusion construction module 34, used to fuse the linear basic features and the nonlinear enhanced features to construct a multidimensional feature vector; and an establishment module 36, used to establish a linear mapping model between the multidimensional feature vector and the CIELAB color space, and to calculate some or all of the parameters of the linear mapping model using an adaptive regularized least squares method.

[0064] Module 36 is further used for: By incorporating an adaptive L2 regularization term, a linear mapping model from the multidimensional feature vector F to the CIELAB color space is established in the following manner: ,in, This is the output CIELAB color value vector. For bias vectors, The weight matrix, F, is the aforementioned multidimensional feature vector; Construct the objective function based on the sum of squared calibration errors and the adaptive regularization term; Based on the objective function, obtain the weight matrix W and the bias vector from all parameters of the linear mapping model. The analytical solution.

[0065] Figure 3The color calibration device shown comprises an extraction module 30 that extracts the average RGB channel values ​​of each color patch in the currently acquired image; an acquisition module 32 that, for each color patch, obtains linear basic features based on the RGB channel average values ​​and nonlinear enhanced features based on the linear basic features; a fusion construction module 34 that then fuses the linear basic features and the nonlinear enhanced features to construct a multidimensional feature vector; and a modeling module 36 that establishes a linear mapping model between the multidimensional feature vector and the CIELAB color space, wherein some or all parameters of the linear mapping model are calculated using an adaptive regularized least squares method. By constructing a dual feature vector consisting of linear basic and nonlinear enhanced features, this approach enhances feature representation capabilities while employing a simplified and efficient regularization solution mechanism, achieving a balance between high accuracy and ease of implementation. This addresses the problems of insufficient feature representation or complex and cumbersome models in existing methods. This application balances feature representation capabilities with ease of solution and effectively improves color calibration accuracy.

[0066] It should be noted that the aforementioned color calibration device can be referred to accordingly. Figures 1 to 2 The relevant descriptions and effects in the illustrated embodiments are for understanding purposes only and will not be repeated here.

[0067] According to embodiments of the present invention, an electronic device is also provided.

[0068] Figure 4 This is a structural block diagram of an electronic device according to a preferred embodiment of the present invention. Figure 4 As shown, the electronic device according to the present invention includes: a memory 42 and a processor 44, wherein the memory 42 is used to store computer execution instructions of the processor 44; and the processor 44 is configured to execute the color calibration method described above by executing the executable instructions.

[0069] Processor 44 can be a central processing unit (CPU). Processor 44 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.

[0070] The memory 42, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the color calibration method in this embodiment of the invention. The processor executes various functional applications and data processing by running the non-transitory software programs, instructions, and modules stored in the memory.

[0071] The memory 42 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor, etc. Furthermore, the memory may include high-speed random access memory and non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 42 may optionally include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0072] One or more of the above modules are stored in the memory 42, and when executed by the processor 44, they perform the following: Figure 1 The color calibration method in the embodiments.

[0073] For specific details regarding the aforementioned electronic devices, please refer to the relevant references. Figures 1 to 2 The relevant descriptions and effects in the illustrated embodiments are for understanding purposes only and will not be repeated here.

[0074] In summary, the embodiments provided by this invention offer a high-precision color calibration method and apparatus based on channel-enhanced dual features and fast regularization optimization. By constructing a dual feature vector with "linear basis and nonlinear enhancement," the method improves feature representation capabilities while employing a simplified and efficient regularization solution mechanism, achieving a balance between high precision and ease of implementation. This addresses the problems of insufficient feature representation or complex and cumbersome models in existing methods. Specifically, the channel-enhanced dual feature vector construction retains the original linear characteristics of the RGB channels while fully exploring the color change patterns within the channels through dual nonlinear transformations. It eliminates redundant feature dimensions, effectively balancing feature representation capabilities and model simplicity. The regularization coefficients are dynamically adjusted according to the global variance of the features, eliminating the need for manual parameter tuning and resolving the problem of poor adaptability of fixed coefficients in related technologies. An adaptive regularized least squares method is used to solve the weight matrix in a single step. and bias vector It requires no iterative calculations, the solution process is simple and clear with low computational load, and the adaptive regularization coefficient improves the accuracy of parameter estimation, effectively avoids overfitting, and balances efficiency and accuracy. It is also widely applicable to scenarios with stringent requirements for calibration accuracy and engineering feasibility, such as industrial inspection, color reproduction, and image acquisition.

[0075] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. A color calibration method, characterized in that, include: For the currently acquired image, extract the average RGB channel value of each color block; For each color patch, a linear basic feature is obtained based on the RGB channel mean, and a non-linear enhanced feature is obtained based on the linear basic feature. The linear basic feature is obtained by normalizing the RGB channel mean in the following manner. : , , ,in, The values ​​all range from [0, 1]. This represents the average R channel value of the current color block. This represents the average G channel value of the current color block. The mean of the B channel of the current color patch is used to obtain non-linear enhancement features in the following way. , , , , , : , , , , , ,in, This is the default minimum value; By fusing the linear basic features and the nonlinear enhanced features, a multidimensional feature vector is constructed, wherein the linear basic features are... and nonlinear enhancement features , , , , , The features are fused to construct a 9-dimensional enhanced feature vector F: ; Establish a linear mapping model between the multidimensional feature vector and the CIELAB color space, and calculate some or all parameters of the linear mapping model using an adaptive regularized least squares method. This step further includes: The multidimensional feature vector is constructed by incorporating an adaptive L2 regularization term in the following manner. Linear mapping model to CIELAB color space: ,in, This is the output CIELAB color value vector. For bias vectors, The weight matrix, F, is the multidimensional feature vector; Based on the sum of squared calibration errors and the adaptive regularization term, construct the objective function. ,in, ,in, This represents the total number of color swatches. For the first The default standard CIELAB value for each color block. For adaptive regularization coefficients, ,in For feature vectors global variance For the first Predicted CIELAB values ​​for each color block. , for Weight matrix, each element Indicates the first The feature is related to the first The contribution weight of each CIELAB component; Based on the objective function, obtain the weight matrix W and the bias vector from all parameters of the linear mapping model. The analytical solution is obtained by finding the weight matrix in the following way. Analytical solution: The bias vector is obtained in the following way. Analytical solution: ,in, This represents the total number of color swatches. for The feature matrix consists of a 9-dimensional feature vector for each color patch in each row. , for A standard CIELAB matrix, where each row corresponds to the standard CIELAB value of a color patch. for identity matrix for A vector consisting entirely of 1s For the first The standard CIELAB value vector of each color block For the first The 9-dimensional feature vector of each color block.

2. The method according to claim 1, characterized in that, For the currently acquired image, the average RGB channel values ​​of each color block are extracted as follows: The average RGB channel value of each color block is obtained using the following method: in, This represents the total number of pixels in a single current color patch region. The first color block within the current color block The original grayscale value of the R channel of each pixel. The first color block within the current color block The original grayscale value of the G channel of each pixel. The first color block within the current color block The original grayscale value of the B channel of each pixel. This represents the average R channel value of the current color block. This represents the average G channel value of the current color block. The mean value of the B channel of the current color block.

3. The method according to claim 1 or 2, characterized in that, After establishing the linear mapping model between the multidimensional feature vectors and the CIELAB color space, the method further includes: Based on the default standard CIELAB value and the predicted CIELAB value corresponding to the current color block, calculate the color difference value corresponding to the color block, and verify the color calibration accuracy based on the color difference value.

4. A color calibration device, characterized in that, include: The extraction module is used to extract the average RGB channel value of each color block in the currently acquired image; The acquisition module is used to obtain linear basic features based on the RGB channel mean for each color patch, and to obtain non-linear enhanced features based on the linear basic features. The acquisition module further normalizes the RGB channel mean in the following manner to obtain the linear basic features. : , , ,in, The values ​​are all in the range [0, 1]. This represents the average R channel value of the current color block. This represents the average G channel value of the current color block. The mean of the B channel of the current color patch is used to obtain non-linear enhancement features in the following way. , , , , , : , , , , , ,in, This is the default minimum value; A fusion construction module is used to fuse the linear basic features and the nonlinear enhanced features to construct a multidimensional feature vector. The fusion construction module is further used to combine the linear basic features... and nonlinear enhancement features , , , , , The features are fused to construct a 9-dimensional enhanced feature vector F: ; A module is established to create a linear mapping model between the multidimensional feature vector and the CIELAB color space, and to calculate some or all of the parameters of the linear mapping model using an adaptive regularized least squares method. The module is further configured to: The multidimensional feature vector is constructed by incorporating an adaptive L2 regularization term in the following manner. Linear mapping model to CIELAB color space: ,in, This is the output CIELAB color value vector. For bias vectors, Weight matrix, The multidimensional feature vector; Based on the sum of squared calibration errors and the adaptive regularization term, construct the objective function. ,in, ,in, This represents the total number of color swatches. For the first The default standard CIELAB value for each color block. For adaptive regularization coefficients, ,in For feature vectors global variance For the first Predicted CIELAB values ​​for each color block. , for Weight matrix, each element Indicates the first The feature is related to the first The contribution weight of each CIELAB component; Based on the objective function, obtain the weight matrix W and the bias vector from all parameters of the linear mapping model. The analytical solution is obtained by finding the weight matrix in the following way. Analytical solution: The bias vector is obtained in the following way. Analytical solution: ,in, This represents the total number of color swatches. for The feature matrix consists of a 9-dimensional feature vector for each color patch in each row. , for A standard CIELAB matrix, where each row corresponds to the standard CIELAB value of a color patch. for identity matrix for A vector consisting entirely of 1s For the first The standard CIELAB value vector of each color block For the first The 9-dimensional feature vector of each color block.

5. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store executable instructions of the processor, wherein the processor is configured to perform the color calibration method of any one of claims 1 to 3 by executing the executable instructions.

Citation Information

Patent Citations

  • Imaging system color information calibration method

    CN104933706A

  • Color data calibration method for camera module

    CN106023238A