CN113923429B - Color correction method based on color card - Google Patents

Color correction method based on color card Download PDF

Info

Publication number
CN113923429B
CN113923429B CN202111535771.7A CN202111535771A CN113923429B CN 113923429 B CN113923429 B CN 113923429B CN 202111535771 A CN202111535771 A CN 202111535771A CN 113923429 B CN113923429 B CN 113923429B
Authority
CN
China
Prior art keywords
color
brightness
value
matching
matrix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111535771.7A
Other languages
Chinese (zh)
Other versions
CN113923429A (en
Inventor
王毅
张思勤
袁霞
温序铭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Sobey Digital Technology Co Ltd
Original Assignee
Chengdu Sobey Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Sobey Digital Technology Co Ltd filed Critical Chengdu Sobey Digital Technology Co Ltd
Priority to CN202111535771.7A priority Critical patent/CN113923429B/en
Publication of CN113923429A publication Critical patent/CN113923429A/en
Application granted granted Critical
Publication of CN113923429B publication Critical patent/CN113923429B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/646Circuits for processing colour signals for image enhancement, e.g. vertical detail restoration, cross-colour elimination, contour correction, chrominance trapping filters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/67Circuits for processing colour signals for matrixing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/77Circuits for processing the brightness signal and the chrominance signal relative to each other, e.g. adjusting the phase of the brightness signal relative to the colour signal, correcting differential gain or differential phase

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a color correction method based on a color chip, belonging to the technical field of image color correction and comprising the following steps: the method comprises the steps of extracting a color value of a linearized color chart from an image to be corrected containing the color chart, matching the brightness of the extracted color value of the linearized color chart to the brightness of a standard color chart through brightness matching to obtain a color value after the brightness matching, calculating a color correction matrix by using the color value after the brightness matching, and calculating the corrected image by using the color correction matrix. The invention solves the overexposure problem of image correction, and can improve the adaptability and robustness of the image color correction algorithm by applying the invention.

Description

Color correction method based on color card
Technical Field
The invention relates to the technical field of image color correction, in particular to a color correction method based on a color chip.
Background
Color correction techniques have played a role in color reproduction of color images since the invention of color photography. Due to the manufacturing process of the input-output device and different parameter settings, the channel response of the input-output device has nonlinear distortion, and color correction is needed. Color correction has been used in many industries, such as television production, gaming, photography, engineering, chemistry, medicine, and the like.
The most common and effective color correction is a correction method based on a standard color chart, which is used for detecting the color restoration capability of an image shot by a lens and detecting the deviation between a sample standard color and the image shot by the lens. Most of the current color correction methods perform correction by calculating a color correction matrix. The traditional correction based on the standard color chart comprises methods such as polynomial fitting, a neural network, a support vector machine and the like, wherein the simplest and most common method is the polynomial fitting, and the method of the polynomial fitting is mostly based on a least square method, so the polynomial fitting based on the least square method is used for initializing the color correction matrix. And calculating a color correction matrix according to the extracted color matrix and the color matrix of the standard color card by a formula of a least square method.
The result obtained by the least square algorithm can reach a local optimal solution on a color distance, but the spatial distance on the color value cannot accord with the discrimination of human eyes on the color difference due to the nonlinearity of the human eyes on the color recognition, and the color with larger difference is seen by human eyes, and the difference of RGB is possibly very small in fact. Therefore, the correction matrix obtained by the least square method needs to be optimized, and the difference between the corrected color and the true color in the visual observation is minimized by using the color difference calculation formula conforming to the standard of human eyes as the distance function.
The method can realize color correction based on the standard color card to obtain a better correction effect, but the algorithm has certain problems. Because the brightness is changed while the color is corrected by the algorithm, the color value of the color card is close to the standard color value, and the brightness is corrected, when the difference between the brightness of the color card and the standard brightness is large during shooting, the calculated correction matrix can cause the brightness of the corrected image to change greatly, and the overexposure phenomenon is easy to generate.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, provides a color correction method based on a color card, solves the problem of overexposure of image correction, and can improve the adaptability and robustness of an image color correction algorithm by applying the color correction method.
The purpose of the invention is realized by the following scheme:
a color correction method based on color chips comprises the following steps: the method comprises the steps of extracting a color value of a linearized color chart from an image to be corrected containing the color chart, matching the brightness of the extracted color value of the linearized color chart to the brightness of a standard color chart through brightness matching to obtain a color value after the brightness matching, calculating a color correction matrix by using the color value after the brightness matching, and calculating the corrected image by using the color correction matrix.
Further, the matching the extracted brightness of the linearized color target color value to the standard color target brightness by brightness matching includes the sub-steps of:
and matching the extracted brightness of the color value of the linearized color chart to the brightness of the standard color chart by calculating a brightness matching coefficient.
Further, the calculating the luminance matching coefficients comprises the sub-steps of:
when the ratio of image brightness to color card brightness is at the threshold value
Figure 629945DEST_PATH_IMAGE001
And
Figure 350777DEST_PATH_IMAGE002
in the meantime, the following calculation formula of the brightness matching coefficient is designed:
Figure 516179DEST_PATH_IMAGE003
whereinMIn order to match the coefficients for the luminance,
Figure 574019DEST_PATH_IMAGE004
is the average value of the brightness of the image,
Figure 406846DEST_PATH_IMAGE005
the average value of the brightness of the color card is,
Figure 173945DEST_PATH_IMAGE006
is the brightness of a standard color card,
Figure 826643DEST_PATH_IMAGE007
is a brightness threshold; subscriptBRepresents brightness;
at a ratio of image brightness to color chip brightness greater than
Figure 852237DEST_PATH_IMAGE001
Or less than
Figure 8411DEST_PATH_IMAGE002
Time, brightness matching coefficientMFormula for calculationComprises the following steps:
Figure 336625DEST_PATH_IMAGE008
finally, the brightness is matched with the coefficientMMultiplying the color value matrix of the color card to obtain a color value after brightness matching;
Figure 351985DEST_PATH_IMAGE009
wherein
Figure 791057DEST_PATH_IMAGE010
In the form of a matrix of color values of a color chip,Cis the color value after brightness matching.
Further, the threshold value
Figure 457530DEST_PATH_IMAGE007
=0.25,
Figure 956645DEST_PATH_IMAGE001
=9,
Figure 318356DEST_PATH_IMAGE002
=0.6。
Further, the calculating the color correction matrix using the luminance matched color values comprises the sub-steps of: calculating an initial CCM matrix by using a matrix calculation formula of a least square method using a color value after luminance matching and a standard color matrixM ccm The calculation formula is as follows:
Figure 436485DEST_PATH_IMAGE011
wherein
Figure 567252DEST_PATH_IMAGE012
For the color matrix to be corrected after brightness matching,
Figure 361901DEST_PATH_IMAGE013
is a standard color chip color matrix.
Further, the initial CCM matrix obtained by calculation is subjected to calculationM ccm And optimizing to obtain a color correction matrix.
Further, the optimization adopts a Nelder-Mead algorithm, a CIEDE 2000 color difference calculation function is used as an optimization time-distance function, and the formula is as follows:
Figure 476488DEST_PATH_IMAGE014
wherein the content of the first and second substances,
Figure 991783DEST_PATH_IMAGE015
in order to be a color difference,
Figure 383581DEST_PATH_IMAGE016
to correct the rotation function of the blue region, a parameter factor
Figure 958919DEST_PATH_IMAGE017
Figure 685435DEST_PATH_IMAGE018
Figure 270000DEST_PATH_IMAGE019
Are correction coefficients related to the use conditions, which are factors affecting the feeling of poor coloration,
Figure 375359DEST_PATH_IMAGE020
Figure 262544DEST_PATH_IMAGE021
Figure 820564DEST_PATH_IMAGE022
Figure 333454DEST_PATH_IMAGE023
respectively representing lightness difference, chroma difference and hue difference;
Figure 558899DEST_PATH_IMAGE024
Figure 476040DEST_PATH_IMAGE025
Figure 927881DEST_PATH_IMAGE026
all are weight functions calculated from the mean values of lightness, chroma and hue.
Further, the calculating a corrected image using a color correction matrix includes the sub-steps of: after the image to be corrected is linearized, the RGB value of each pixel in the image is multiplied by the correction matrix, and the color correction of the full image is completed.
The invention has the beneficial effects that:
the embodiment of the invention can correct the color of the image and correct the color of the shooting equipment, so that the colors shot by different shooting equipment are more consistent.
The embodiment of the invention is based on the improvement of the existing color chart color correction algorithm, and purposefully improves the influence of the algorithm on the brightness when correcting the color, thereby avoiding the overexposure phenomenon possibly generated by the influence of the algorithm on the brightness when correcting the color, enabling the algorithm to normally correct different exposure images, and improving the adaptability and the robustness of the image correction algorithm by the method of the embodiment of the invention.
Drawings
In order 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 described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of a method according to an embodiment of the present invention.
Detailed Description
All features disclosed in all embodiments in this specification, or all methods or process steps implicitly disclosed, may be combined and/or expanded, or substituted, in any way, except for mutually exclusive features and/or steps.
The technical concept, operation principle, efficacy and operation of the present invention will be further described in detail with reference to fig. 1.
The invention at least solves the following technical problems: in the traditional algorithm, when the brightness difference between the color card and the surrounding environment is large, overexposure is easy to generate after correction. The design concept of the invention is as follows: the original method is improved aiming at the technical problem, and a method for matching the brightness of the color card with the brightness of the standard color card is provided to solve the problem that the image is overexposed due to the brightness change after correction caused by the brightness difference between the color card and the standard color card. Meanwhile, the brightness matching degree is controlled, so that the brightness of the image with small exposure can be normally corrected. Through improvement, the adaptability to different exposure images during correction is improved, and the application of the algorithm is more robust.
In a specific application, the invention provides an improved color correction scheme for a color chart, which comprises the following steps: the input is an image to be corrected containing a color card, and the output is a color correction matrix and a corrected image. The specific technical concept is as follows: since the traditional algorithm corrects the brightness while correcting the color. Therefore, when the luminance of the color chart is small, the luminance of the entire image is increased by the calculated correction matrix, and overexposure is likely to occur. Therefore, the invention adds the matching calculation of the brightness of the color card to improve the original algorithm.
While another technical problem is encountered in the specific implementation: extreme cases of extreme differences in color chips and ambient brightness. In order to avoid the extreme case of great difference between the color card and the ambient brightness, the method of the invention firstly needs to set a judgment step. In one embodiment, the ratio of the image luminance mean value to the color chart luminance mean value
Figure 854248DEST_PATH_IMAGE027
Within the empirical threshold of 0.6 to 9, different luminance match coefficient values will be calculated for different ambient luminances, when the match coefficient calculation formula is:
Figure 58834DEST_PATH_IMAGE003
whereinMIn order to match the coefficients for the luminance,
Figure 412454DEST_PATH_IMAGE004
is the average value of the brightness of the image,
Figure 86012DEST_PATH_IMAGE005
the average value of the brightness of the color card is,
Figure 550492DEST_PATH_IMAGE006
is the brightness of a standard color card,
Figure 484950DEST_PATH_IMAGE007
is a set brightness threshold. Through the problem analysis, scheme adjustment and verification of the invention, the method can obtain
Figure 134106DEST_PATH_IMAGE007
The case of =0.25 is reasonable. When the average brightness of the image is in different intervals, different matching coefficients are calculated, so that the overexposure condition can be avoided during correction of the algorithm, and the brightness correction effect can be kept.
When the ratio of the image brightness mean value to the color card brightness is not within 0.6 to 9 of the empirical threshold, it indicates that the color card and the environment brightness have a large difference, and at this time, the ratio of the image brightness mean value to the color card brightness is not within 0.6 to 9 of the empirical thresholdMThe calculation formula of (2) is as follows:
Figure 419594DEST_PATH_IMAGE008
in this case, since the luminance correction is likely to adversely affect the image, the luminance of the color chart is completely matched with the luminance of the standard color chart, and the luminance of the image before and after the arithmetic correction is almost unchanged.
Finally, multiplying the color value matrix of the color card by the color matching coefficientMObtaining the color value of the color card after brightness matching:
Figure 563130DEST_PATH_IMAGE009
wherein
Figure 352095DEST_PATH_IMAGE028
In the form of a matrix of color values of a color chip,Cis the color value after brightness matching.
The method of the invention sets a threshold value for the image brightness, so that the method can protect the image from overexposure under different brightness conditions and can correct the brightness to a certain degree.
In specific implementation, the method comprises the following steps:
the first step is as follows: the captured image may have a non-linear relationship with brightness due to a mechanism of a capturing device or in order to adapt to a habit of a human eye, and the like, and it is necessary to linearize image pixel data using a corresponding conversion formula according to a color space used at the time of capturing.
The second step is that: in order to avoid the problem of overexposure when the original method corrects the image, the method of the invention adds a step of brightness matching calculation for the color card before calculating the initial Color Correction Matrix (CCM). In the implementation, a scheme is provided for the luminance matching of the color chart, but not limited thereto, as long as the calculation of the luminance matching of the color chart belongs to the technical idea of the present invention. Optionally, the method of the present invention provides the following specific embodiment: and calculating the image brightness mean value, the standard color card brightness and the image color card brightness, calculating a brightness matching coefficient according to the image brightness mean value range, and multiplying the extracted color card color value by the coefficient to obtain a matched color matrix for subsequent calculation.
The third step: and calculating an initial CCM matrix by using the color value matrix after brightness matching and the standard color matrix through a matrix calculation formula of a least square method.
The fourth step: and optimizing the CCM matrix by using an optimization algorithm and taking a standard color difference calculation formula as a distance function, so that the color correction result of the matrix can accord with the evaluation of human eyes on color difference.
The fifth step: and (3) linearizing the image to be corrected, and multiplying the RGB value of each pixel in the image by the correction matrix to finish the color correction of the full image.
Example 1: a color correction method based on color chips comprises the following steps: the method comprises the steps of extracting a color value of a linearized color chart from an image to be corrected containing the color chart, matching the brightness of the extracted color value of the linearized color chart to the brightness of a standard color chart through brightness matching to obtain a color value after the brightness matching, calculating a color correction matrix by using the color value after the brightness matching, and calculating the corrected image by using the color correction matrix.
Example 2: on the basis of the embodiment 1, the matching the extracted brightness of the color value of the linearized color card to the brightness of the standard color card through brightness matching includes the sub-steps of: and matching the extracted brightness of the color value of the linearized color chart to the brightness of the standard color chart by calculating a brightness matching coefficient.
Example 3: on the basis of embodiment 2, the calculating the luminance matching coefficients includes the sub-steps of: when the ratio of image brightness to color card brightness is at the threshold value
Figure 313097DEST_PATH_IMAGE001
And
Figure 679357DEST_PATH_IMAGE002
in the meantime, the following calculation formula of the brightness matching coefficient is designed:
Figure 751218DEST_PATH_IMAGE003
whereinMIn order to match the coefficients for the luminance,
Figure 801213DEST_PATH_IMAGE004
is the average value of the brightness of the image,
Figure 667538DEST_PATH_IMAGE005
the average value of the brightness of the color card is,
Figure 662039DEST_PATH_IMAGE006
is the brightness of a standard color card,
Figure 396646DEST_PATH_IMAGE007
is a brightness threshold; subscript B represents brightness;
at a ratio of image brightness to color chip brightness greater than
Figure 160202DEST_PATH_IMAGE001
Or less than
Figure 72795DEST_PATH_IMAGE002
Time, brightness matching coefficientMThe calculation formula is as follows:
Figure 820171DEST_PATH_IMAGE008
finally, the brightness is matched with the coefficientMMultiplying the color value matrix of the color card to obtain a color value after brightness matching;
Figure 968256DEST_PATH_IMAGE009
wherein
Figure 976532DEST_PATH_IMAGE028
In the form of a matrix of color values of a color chip,Cis the color value after brightness matching.
Example 4: on the basis of example 3, the threshold value
Figure 184659DEST_PATH_IMAGE007
=0.25,
Figure 29118DEST_PATH_IMAGE001
=9,
Figure 980894DEST_PATH_IMAGE002
=0.6。
Example 5: on the basis of any of embodiments 1 to 4, the calculating a color correction matrix using the color values after the luminance matching includes the substeps of: using luminance matched color values and standard color matrixCalculating initial CCM matrix by using matrix calculation formula of over least square methodM ccm The calculation formula is as follows:
Figure 109256DEST_PATH_IMAGE011
wherein
Figure 222705DEST_PATH_IMAGE012
For the color matrix to be corrected after brightness matching,
Figure 679094DEST_PATH_IMAGE013
is a standard color chip color matrix.
Example 6: on the basis of the embodiment 5, the initial CCM matrix obtained by calculation is subjected toM ccm And optimizing to obtain a color correction matrix.
Example 7: on the basis of the embodiment 6, the optimization adopts a Nelder-Mead algorithm, and a CIEDE 2000 color difference calculation function is used as an optimization time-distance function, and the formula is as follows:
Figure 44348DEST_PATH_IMAGE014
wherein the content of the first and second substances,
Figure 902582DEST_PATH_IMAGE015
in order to be a color difference,
Figure 842725DEST_PATH_IMAGE016
to correct the rotation function of the blue region, a parameter factor
Figure 520831DEST_PATH_IMAGE017
Figure 814409DEST_PATH_IMAGE029
Figure 402517DEST_PATH_IMAGE019
Is dependent on the conditions of useCorrection coefficients, which are factors affecting the feeling of poor coloration,
Figure 123348DEST_PATH_IMAGE020
Figure 678963DEST_PATH_IMAGE030
Figure 510653DEST_PATH_IMAGE022
Figure 77901DEST_PATH_IMAGE023
respectively representing lightness difference, chroma difference and hue difference;
Figure 110579DEST_PATH_IMAGE024
Figure 763277DEST_PATH_IMAGE025
Figure 523291DEST_PATH_IMAGE026
all are weight functions calculated from the mean values of lightness, chroma and hue.
Example 8: on the basis of embodiment 1, the calculating a corrected image using a color correction matrix includes the sub-steps of: after the image to be corrected is linearized, the RGB value of each pixel in the image is multiplied by the correction matrix, and the color correction of the full image is completed.
Example 9: on the basis of embodiment 3, as shown in fig. 1, this embodiment further provides an improved color correction method, including the following steps:
the first step is as follows: extracting color values of color cards in the image to be corrected and creating an Nx 3 RGB color matrix, wherein N is the number of the colors of the color cards.
The second step is that: and matching the brightness of the color value of the color card, and matching the extracted brightness of the linearized color card to the brightness of the standard color card by calculating a brightness matching coefficient.
When the difference between the image brightness and the color card brightness is small, the brightness matching coefficient calculation formula is as follows:
Figure 945045DEST_PATH_IMAGE003
whereinMIn order to match the coefficients for the luminance,
Figure 273259DEST_PATH_IMAGE004
is the average value of the brightness of the image,
Figure 288619DEST_PATH_IMAGE005
the average value of the brightness of the color card is,
Figure 727691DEST_PATH_IMAGE006
is the brightness of a standard color card,
Figure 394164DEST_PATH_IMAGE007
is a set brightness threshold.
When the difference between the image brightness and the color card brightness is large, the brightness matching coefficient calculation formula is as follows:
Figure 893279DEST_PATH_IMAGE008
finally, the original color value matrix and the brightness matching coefficientMAnd (actually playing the role of a correction coefficient) are multiplied to obtain the color value after brightness matching.
Figure 395935DEST_PATH_IMAGE008
Wherein
Figure 107539DEST_PATH_IMAGE028
In the form of a matrix of color values of a color chip,Cis the color value after brightness matching.
The third step: computing initial CCM matrix using least squares
Figure 769465DEST_PATH_IMAGE031
If it is desired to obtain
Figure 298535DEST_PATH_IMAGE032
Established optimum
Figure 413122DEST_PATH_IMAGE033
. Then according to the least square method, the formula for CCM is:
Figure 928417DEST_PATH_IMAGE034
wherein
Figure 320215DEST_PATH_IMAGE012
For the color matrix to be corrected after brightness matching,
Figure 161132DEST_PATH_IMAGE013
is a standard color chip color matrix.
The fourth step: since human eyes distinguish colors non-linearly, in order to enable the result to achieve the optimal effect on visual observation, the CCM matrix obtained in the last step needs to be optimized, the optimization method uses a Nelder-Mead algorithm, a function is not needed to be conducted, and the function can be converged to a local minimum value quickly, and a CIEDE 2000 color difference calculation function is used as an optimization time-distance function. The formula is as follows:
Figure 622069DEST_PATH_IMAGE014
parameter factor
Figure 206634DEST_PATH_IMAGE017
Figure 452939DEST_PATH_IMAGE029
Figure 199178DEST_PATH_IMAGE019
Are correction coefficients related to use conditions, which are factors affecting the feeling of poor coloration, as is the general caseUnder the condition of
Figure 22778DEST_PATH_IMAGE020
Figure 535667DEST_PATH_IMAGE035
Figure 495533DEST_PATH_IMAGE022
Figure 553619DEST_PATH_IMAGE023
Respectively, lightness difference, chroma difference and hue difference.
Figure 130094DEST_PATH_IMAGE024
Figure 790882DEST_PATH_IMAGE025
Figure 995468DEST_PATH_IMAGE026
All are weight functions calculated from the mean values of lightness, chroma and hue.
The fifth step: and correcting the image to be corrected by using the correction matrix calculated by the improved algorithm to enable the color of the image to be closer to the real color observed by human eyes.
Embodiment 9 provides a color correction method with high robustness, which performs a certain degree of matching on the luminance difference between the color of the color chart and the standard value, controls the degree of correction on the luminance, and has a good visual effect of the final correction result, thereby solving the defect that the conventional algorithm is easy to overexpose during correction. The method specifically improves the influence of the algorithm on the brightness when the color is corrected, avoids the overexposure phenomenon possibly generated by the influence of the algorithm on the brightness when the color is corrected, enables the algorithm to normally correct different exposure images, and improves the adaptability and the robustness of the algorithm.
The functionality of the present invention, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium, and all or part of the steps of the method according to the embodiments of the present invention are executed in a computer device (which may be a personal computer, a server, or a network device) and corresponding software. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, or an optical disk, exist in a read-only Memory (RAM), a Random Access Memory (RAM), and the like, for performing a test or actual data in a program implementation.

Claims (6)

1. A color correction method based on a color chip is characterized by comprising the following steps:
extracting a color value of a linearized color chart from an image to be corrected containing the color chart, matching the brightness of the extracted color value of the linearized color chart to the brightness of a standard color chart through brightness matching to obtain a color value after the brightness matching, calculating a color correction matrix by using the color value after the brightness matching, and calculating the corrected image by using the color correction matrix; the matching of the extracted brightness of the linearized color chip color value to the standard color chip brightness through brightness matching comprises the substeps of:
matching the extracted brightness of the color value of the linearized color chart to the brightness of the standard color chart by calculating a brightness matching coefficient; the calculating the luminance matching coefficients comprises the sub-steps of:
when the difference between the image brightness and the color card brightness is smaller than the set ratio value, the ratio value is at the threshold value
Figure DEST_PATH_IMAGE001
And
Figure DEST_PATH_IMAGE002
in the meantime, the following calculation formula of the brightness matching coefficient is designed:
Figure DEST_PATH_IMAGE003
whereinMIn order to match the coefficients for the luminance,
Figure DEST_PATH_IMAGE004
is the average value of the brightness of the image,
Figure DEST_PATH_IMAGE005
the average value of the brightness of the color card is,
Figure DEST_PATH_IMAGE006
is the brightness of a standard color card,
Figure DEST_PATH_IMAGE007
is a brightness threshold; subscript B represents brightness;
at a ratio of image brightness to color chip brightness greater than
Figure 73925DEST_PATH_IMAGE001
Or less than
Figure 302650DEST_PATH_IMAGE002
Time, brightness matching coefficientMThe calculation formula is as follows:
Figure DEST_PATH_IMAGE008
finally, the brightness is matched with the coefficientMMultiplying the color value matrix of the color card to obtain a color value after brightness matching;
Figure DEST_PATH_IMAGE009
wherein
Figure DEST_PATH_IMAGE010
In the form of a matrix of color values of a color chip,Cis brightnessThe matched color value.
2. The method of claim 1, wherein the threshold value is set to a value that is less than a threshold value
Figure 20070DEST_PATH_IMAGE007
=0.25,
Figure 884121DEST_PATH_IMAGE001
=9,
Figure 278587DEST_PATH_IMAGE002
=0.6。
3. The method of any of claims 1-2, wherein the computing the color correction matrix using the luminance-matched color values comprises the sub-steps of: calculating an initial CCM matrix by using a matrix calculation formula of a least square method using a color value after luminance matching and a standard color matrixM ccm The calculation formula is as follows:
Figure DEST_PATH_IMAGE011
wherein
Figure DEST_PATH_IMAGE012
For the color matrix to be corrected after brightness matching,
Figure DEST_PATH_IMAGE013
is a standard color chip color matrix.
4. The method of claim 3, wherein the initial CCM matrix is calculatedM ccm And optimizing to obtain a color correction matrix.
5. The method of claim 4, wherein the optimization uses a Nelder-Mead algorithm using a CIEDE 2000 color difference calculation function as an optimization time-distance function, and the formula is:
Figure DEST_PATH_IMAGE014
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE015
in order to be a color difference,
Figure DEST_PATH_IMAGE016
to correct the rotation function of the blue region, a parameter factor
Figure DEST_PATH_IMAGE017
Figure DEST_PATH_IMAGE018
Figure DEST_PATH_IMAGE019
Are correction coefficients related to the use conditions, which are factors affecting the feeling of poor coloration,
Figure DEST_PATH_IMAGE020
Figure DEST_PATH_IMAGE021
Figure DEST_PATH_IMAGE022
Figure DEST_PATH_IMAGE023
respectively representing lightness difference, chroma difference and hue difference;
Figure DEST_PATH_IMAGE024
Figure DEST_PATH_IMAGE025
Figure DEST_PATH_IMAGE026
all are weight functions calculated from the mean values of lightness, chroma and hue.
6. The method of color chip based color correction according to claim 1, wherein said calculating a corrected image using a color correction matrix comprises the sub-steps of: after the image to be corrected is linearized, the RGB value of each pixel in the image is multiplied by the correction matrix, and the color correction of the full image is completed.
CN202111535771.7A 2021-12-16 2021-12-16 Color correction method based on color card Active CN113923429B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111535771.7A CN113923429B (en) 2021-12-16 2021-12-16 Color correction method based on color card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111535771.7A CN113923429B (en) 2021-12-16 2021-12-16 Color correction method based on color card

Publications (2)

Publication Number Publication Date
CN113923429A CN113923429A (en) 2022-01-11
CN113923429B true CN113923429B (en) 2022-04-12

Family

ID=79248913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111535771.7A Active CN113923429B (en) 2021-12-16 2021-12-16 Color correction method based on color card

Country Status (1)

Country Link
CN (1) CN113923429B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106530361A (en) * 2016-11-16 2017-03-22 上海市东方医院 Color correction method for color face image
JP6487515B1 (en) * 2017-10-13 2019-03-20 大日精化工業株式会社 Molded product set, computer color matching system, database, and molded product set manufacturing method
CN110830778A (en) * 2018-08-14 2020-02-21 杭州海康威视数字技术股份有限公司 Imaging device color correction method, imaging device color correction device, electronic device and storage medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621701B (en) * 2009-01-04 2010-12-08 四川川大智胜软件股份有限公司 Correcting method of multiple projector display wall colors of arbitrary smooth curve screens independent of geometric correction
CN102244790A (en) * 2011-06-27 2011-11-16 展讯通信(上海)有限公司 Device and method for adaptively adjusting supporting parameters of image signal processor
CN103905803B (en) * 2014-03-18 2016-05-04 中国科学院国家天文台 A kind of color calibration method of image and device
CN104217409B (en) * 2014-09-30 2017-04-05 南京汇川工业视觉技术开发有限公司 A kind of image color correction method based on simulated annealing optimization algorithm
US10311060B2 (en) * 2017-06-06 2019-06-04 Espial Group Inc. Glyph management in texture atlases
CN107730471A (en) * 2017-10-26 2018-02-23 北京农业智能装备技术研究中心 A kind of leaf image color antidote and device for rice shoot Growing state survey
CN108600723A (en) * 2018-07-20 2018-09-28 长沙全度影像科技有限公司 A kind of color calibration method and evaluation method of panorama camera
CN112073703B (en) * 2020-08-31 2022-04-22 深圳市景阳科技股份有限公司 Method and device for adjusting color correction matrix, terminal equipment and medium
CN112561829B (en) * 2020-12-23 2024-01-12 西北工业大学 Multi-region non-uniform brightness distortion correction algorithm based on L-channel Gamma transformation
CN112839216B (en) * 2021-01-13 2022-07-19 合肥埃科光电科技股份有限公司 Image color correction method and device
CN113628135A (en) * 2021-07-28 2021-11-09 Oppo广东移动通信有限公司 Image color correction method, image color correction device, computer device, and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106530361A (en) * 2016-11-16 2017-03-22 上海市东方医院 Color correction method for color face image
JP6487515B1 (en) * 2017-10-13 2019-03-20 大日精化工業株式会社 Molded product set, computer color matching system, database, and molded product set manufacturing method
CN110830778A (en) * 2018-08-14 2020-02-21 杭州海康威视数字技术股份有限公司 Imaging device color correction method, imaging device color correction device, electronic device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
串行视觉通信下失真图像颜色校正方法仿真;段仲麒;《计算机仿真》;20171115(第11期);全文 *
基于统计特征分类耦合自适应Gamma校正的图像增强算法;陆涛;《电子测量与仪器学报》;20200615(第06期);全文 *

Also Published As

Publication number Publication date
CN113923429A (en) 2022-01-11

Similar Documents

Publication Publication Date Title
Afifi et al. When color constancy goes wrong: Correcting improperly white-balanced images
CN111292246B (en) Image color correction method, storage medium, and endoscope
CN111199524B (en) Purple edge correction method for image of adjustable aperture optical system
KR100886099B1 (en) Apparatus for automatically computing image correction curve and Method thereof
KR100933282B1 (en) Color restoration method and system
TWI568263B (en) Image processing method applied to an rgb-ir sensor and related device thereof
CN109191460B (en) Quality evaluation method for tone mapping image
JP2009044681A5 (en)
US20100195906A1 (en) Automatic image enhancement
US20190052860A1 (en) Multi-Image Color-refinement with Application to Disparity Estimation
Kim et al. Nonlinear camera response functions and image deblurring
WO2021136391A1 (en) Image processing method, image processing device, and display device
CN109274948B (en) Image color correction method, device, storage medium and computer equipment
CN112351195B (en) Image processing method, device and electronic system
CN105993170B (en) Image processing apparatus, camera device, image processing method
US8767087B1 (en) Preventing color artifacts in overexposed regions and preserving maximum signals in near-overexposed regions of digital images
CN110009574B (en) Method for reversely generating high dynamic range image from low dynamic range image
CN109544467B (en) Method for enhancing contrast of color image based on LAB model
Punnappurath et al. Spatially aware metadata for raw reconstruction
CN113923429B (en) Color correction method based on color card
JP2010016803A (en) Apparatus and method for adjusting colors among multiple color cameras
JP5327766B2 (en) Memory color correction in digital images
US8970739B2 (en) Devices and methods for creating structure histograms for use in image enhancement
TWI517098B (en) Color degradation compensation method
CN115103172A (en) Image color correction method, equipment and computer readable storage medium

Legal Events

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