A color camera color correction method, system, device and medium

By combining a transparent color card and a surface light source correction coefficient, the problems of surface light source occlusion and unevenness in color correction of traditional color cameras are solved, achieving a more accurate color correction effect that conforms to human visual perception.

CN120676258BActive Publication Date: 2025-11-21HEFEI I TEK OPTOELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511156294.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2025-11-21
Estimated Expiration
2045-08-19

AI Technical Summary

Technical Problem

Traditional color camera color correction methods are affected by surface light sources, leading to inaccurate color correction, especially due to surface light source obstruction and unevenness caused by close-range light collection by color measurement equipment.

Method used

By combining the measured results of the transparent color card with the uniformity correction of the surface light source, the light source correction coefficient and lens shadow correction are calculated. Transmitted light is measured using a color camera and color measurement equipment, and a correction matrix is ​​fitted to improve the accuracy of color correction.

Benefits of technology

It significantly improves the accuracy of color correction, eliminates lens shading effects, ensures uniform image brightness and color that matches human visual perception, and reduces computational complexity and time costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120676258B_ABST
    Figure CN120676258B_ABST
Patent Text Reader

Abstract

The application discloses a color camera color correction method, system, device and medium, the correction method comprises: through shooting the area light source to complete the lens shadow correction and white balance correction of the color camera; the XYZ value of the area light source is measured using a color measuring device, and the light source correction coefficient corresponding to the different areas of the area light source is calculated; the transmission color card is placed, and the transmission light of the area light source passing through the color card is measured using the color measuring device to obtain target color data; the color camera is started and the measured color data is collected, so that the correction matrix is fitted based on the target color data. The application carries out color correction of the color camera based on the color card under the irradiation of the actual area light source, avoids the influence of the actual area light source on the true value of the color card provided by the manufacturer, solves the area light source shielding problem during the measurement of the target color data through the transmission color card, solves the uniformity problem of the area light source through the light source correction coefficient, and significantly improves the accuracy of the color correction as a whole.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of camera calibration, and particularly relates to a color calibration method, system, device and medium for a color camera. Background Technology

[0002] The common principle of color imaging in color cameras is to use a Bayer filter to make each pixel of the image sensor sense a color of light, arrange adjacent pixels in RGGB format, and then use an interpolation algorithm to make each pixel have RGB color information.

[0003] Due to limitations in the Bayer filter manufacturing process, the spectral response curves of image sensors for the three colors differ from those of the human eye. This results in inconsistencies between the colors captured in the image and what the human eye perceives. Furthermore, the spectral response curves of each image sensor are different. Therefore, color correction algorithms are needed to make the colors in the captured image closer to human perception. The most commonly used algorithm multiplies the RGB data output by the camera using a 3×3 matrix (also known as the CCM matrix) to obtain the corrected RGB data.

[0004] Traditional CCM matrix parameters are typically obtained by capturing images of reflective color charts and fitting them to the true values ​​of the color charts, which are usually provided by the color chart manufacturer. A drawback of this method is that the true values ​​of the color charts are affected by surface light sources. Different surface light sources have different spectra, resulting in different color coordinates reflected from the color chart. If a color measurement device is used to calibrate the color chart, the probe of the color measurement device needs to be at close range to receive light, which can cause the light from the surface light source to be blocked, thus preventing the acquisition of accurate color information. Furthermore, the color information measured by the color measurement device at this time is affected by the non-uniformity of the surface light source, leading to deviations in the measurement results and further affecting the accuracy of color calibration.

[0005] Therefore, in order to obtain accurate color correction results, the present invention provides a color camera color correction method, system, device and medium. Summary of the Invention

[0006] The purpose of this invention is to overcome the above-mentioned problems existing in the prior art and to provide a color correction method, system, device and medium for color cameras. For the technical problem of non-uniformity caused by surface light source during color correction, a correction matrix is ​​obtained by actual measurement results of transparent color card, and the uniformity correction calculation process of surface light source is combined to improve the accuracy of color correction.

[0007] To achieve the above-mentioned technical objectives and effects, the present invention is implemented through the following technical solution:

[0008] A color correction method for a color camera, based on image data acquired by the color camera, uses target color data to fit color correction parameters, the correction method comprising:

[0009] A fixed surface light source and a color camera facing it are used to perform lens shading correction and white balance correction.

[0010] Calculate the light source correction coefficients for each region of the surface light source to correct the non-uniformity of the surface light source;

[0011] A fixed transmissive color chart is positioned between the surface light source and the color camera, and parallel to the surface light source.

[0012] The XYZ correction values ​​of each color patch on the transmissive color chart are calculated to obtain LAB correction values. The XYZ correction values ​​are obtained by using the light source correction coefficient and the original XYZ values, which are obtained by measuring the transmitted light passing through the transmissive color chart using a color measuring device.

[0013] A correction matrix is ​​obtained by fitting the measured color data with the LAB correction value, which is used as the color correction parameter; the measured color data is obtained by the transmitted light from the color camera's measurement surface light source passing through the transmissive color card;

[0014] The light source correction coefficient is inversely proportional to the sum of the XYZ components of each region of the light source, and the XYZ components of each region are measured by a color measurement device; each region of the light source corresponds one-to-one with each color block of the transmissive color chart.

[0015] Furthermore, lens shading correction includes:

[0016] The image of the area light source captured by the color camera is acquired and divided into several regions;

[0017] Calculate the total average gray value and the average gray value of each region in each channel of the surface light source image, and use the quotient of the total average gray value and the average gray value of each region as the lens correction coefficient for each region.

[0018] Extract the grayscale values ​​of all pixels in each channel of the surface light source image, and then correct them using the lens correction coefficients of the corresponding regions of each pixel to obtain the corrected image data.

[0019] Furthermore, white balance correction includes:

[0020] Acquire images of the surface light source taken by a color camera to obtain the maximum values ​​of each RGB component;

[0021] Calculate the quotient of the maximum value among all components in the area light source image and the maximum value among each RGB component, and use it as the gain coefficient for each RGB component.

[0022] The white balance correction is achieved by multiplying the RGB component data of the surface light source image with the corresponding gain coefficient.

[0023] Furthermore, the color measurement device uses a colorimeter for measurement, and the distance between the colorimeter probe and each color block on the color card remains consistent.

[0024] Furthermore, the specific formula for calculating the light source correction coefficient is as follows: α i =S light_XYZ_min / S light_XYZ (i);

[0025] Where i is the sequence number corresponding to different regions of the surface light source, α i S represents the light source correction coefficients for different regions of the surface light source. light_XYZ_min S is the minimum value in the set formed by the sums of the XYZ components of all regions of the surface light source. light_XYZ (i) represents the sum of the XYZ components corresponding to different regions of the surface light source.

[0026] Furthermore, the specific formula for calculating the XYZ correction value is as follows:

[0027] X target (i)=X card (i)×α i ;

[0028] Y target (i)=Y card (i)×α i ;

[0029] Z target (i)=Z card (i)×α i ;

[0030] Among them, X target (i) represents the X component correction value corresponding to each color patch on the color chart, X card (i) represents the original values ​​of the X component corresponding to each color patch on the color chart, and Y... target (i) represents the Y component correction value corresponding to each color patch on the color chart. card (i) represents the original Y component value corresponding to each color block on the color chart, and Z... target (i) represents the Z component correction value corresponding to each color patch on the color chart, Z card (i) represents the original Z component values ​​corresponding to each color block on the color chart.

[0031] Furthermore, the correction matrix obtained by fitting the target color data includes:

[0032] Collect the measured color data of each color block on the color chart, i.e., the measured RGB data, and calculate the simulated RGB data after correction by the simulation matrix;

[0033] Convert analog RGB data to LAB color space to obtain analog LAB data;

[0034] The simulation matrix that minimizes the sum of the squared Euclidean distances between the simulated LAB data and the target color data is used as the correction matrix.

[0035] The present invention also provides a color correction system for a color camera, comprising:

[0036] The camera correction module is used to perform lens shading correction and white balance correction for color cameras;

[0037] The light source correction module is used to calculate the light source correction coefficient for each region of the surface light source to correct the non-uniformity of the surface light source; wherein, the light source correction coefficient is inversely proportional to the sum of the XYZ components of each region of the light source, and the XYZ components of each region are measured by a color measurement device; each region of the light source corresponds one-to-one with each color block of the transmissive color chart;

[0038] The target analysis module is used to calculate the XYZ correction value of each color block on the transmissive color chart, so as to convert it into the LAB correction value; the XYZ correction value is calculated by the light source correction coefficient and the original XYZ value, which is obtained by the color measuring device measuring the transmitted light passing through the transmissive color chart.

[0039] The calibration analysis module is used to fit the measured color data and the LAB calibration value to obtain a calibration matrix, which is used as a color calibration parameter; the measured color data is obtained by the transmitted light from the color camera's measurement surface light source passing through the transmissive color card.

[0040] The present invention also provides a color correction device for a color camera, comprising:

[0041] Surface light source, used to provide a lighting environment;

[0042] A color camera is mounted to a surface light source such that the light-collecting surface of the color camera faces the surface light source.

[0043] A transmissive color chart is positioned between the surface light source and the color camera, and is parallel to the surface light source.

[0044] Color measuring equipment used to measure the transmitted light from a surface light source through a color chart;

[0045] A processor is used to execute the above correction method.

[0046] The present invention also provides a computer-readable storage medium including a computer program that, when executed by a processor, implements the above-described correction method.

[0047] The beneficial effects of this invention are:

[0048] (1) This invention performs color correction for color cameras based on color cards illuminated by actual surface light sources, avoiding the influence of actual surface light sources on the true values ​​of color cards provided by manufacturers. It solves the problem of surface light source occlusion during target color data measurement by using a transmissive color card, and solves the problem of surface light source uniformity by using a light source correction coefficient. Overall, it significantly improves the accuracy of color correction, as follows:

[0049] By capturing images of surface light sources to perform lens shadow correction and white balance correction on the color camera, effective correction of the color camera is achieved. Lens shadow correction is performed in conjunction with surface light sources in actual scenes, eliminating the shadow effect caused by lens characteristics in the surface light source image, making the brightness distribution of the image captured by the color camera more uniform; white balance correction ensures that there is no color cast in the image captured by the color camera, which conforms to the color perception of the human eye.

[0050] By calculating the light source correction coefficients corresponding to different regions of the surface light source, and ensuring that the light source correction coefficients are inversely proportional to the sum of the XYZ components of each region of the light source, the problem of surface light source non-uniformity introduced again when color measurement equipment measures surface light sources can be effectively addressed. The non-uniformity of the distribution of different regions of the surface light source is reasonably utilized, and a dynamic light source correction coefficient is formed by combining the sum of the XYZ components of different regions of the surface light source. Through the constraint of the inverse proportional relationship, a light source correction coefficient with the opposite magnitude to the sum of the XYZ components of different regions can be formed, so that the different light source regions after the final correction become uniform.

[0051] By placing a transmissive color chart and using a color measuring device to measure the transmitted light from a surface light source through the color chart, the original XYZ values ​​corresponding to each color patch on the color chart are obtained. Then, combined with the corresponding light source correction coefficient, the LAB correction values ​​corresponding to each color patch on the color chart are output. Using a transmissive color chart replaces the traditional reflective color chart, fundamentally solving the problem of the color measuring device probe blocking the surface light source when receiving light at close range. Simultaneously, the original XYZ values ​​obtained by the color measuring device can be used to analyze and obtain the corrected target color data for each color patch on the color chart based on the light source correction coefficient. This not only avoids the accuracy problems caused by traditional manufacturers directly providing the true values ​​of the color chart under different surface light source environments, but also effectively solves the color distribution problem caused by the non-uniformity of the surface light source to the color measuring device through the correction of the original XYZ values.

[0052] By activating a color camera and collecting the transmitted light from a surface light source through a color chart, the measured color data of each color patch on the color chart is obtained. A correction matrix is ​​then fitted based on the target color data, ensuring that both the measured color data and the target color data are obtained from the color chart under the current surface light source illumination. After removing the influence of the surface light source uniformity, the target color data has achieved an effect close to human eye perception. Therefore, the correction matrix fitted on this basis will inevitably make the corresponding corrected color data meet human eye requirements.

[0053] (2) This invention calculates the total gray average value of each channel of the surface light source image and the gray average value of each region, and uses the quotient of the total gray average value and the gray average value of each region as the lens correction coefficient of each region. It can efficiently complete lens shadow correction under the premise of limited resources and ensure the correction effect.

[0054] (3) The present invention calculates the quotient of the maximum value of all components in the surface light source image and the maximum value of each RGB component, and uses it as the gain coefficient of each RGB component. This allows the surface light source to be used reasonably for white balance correction, so that the image color conforms to the visual perception of the human eye.

[0055] (4) In the calculation of the light source correction coefficient of this invention, the minimum value in the set of sums of XYZ components corresponding to all regions of the surface light source is selected as the benchmark. This effectively avoids the loss of details caused by excessive brightness and can recover some detail information to a certain extent. At the same time, since the human eye is more sensitive to changes in brightness in dark areas, the minimum value is used as the benchmark to preserve the integrity of dark areas (i.e., the minimum brightness remains unchanged), which is more in line with visual perception. Meanwhile, the relative contrast of bright areas is still acceptable after compression (because the original signal-to-noise ratio of bright areas is high). Moreover, by selecting the minimum value as the benchmark, only the global minimum value needs to be found, which effectively reduces the time complexity. There is no iteration or matrix operation, which greatly improves the computational efficiency under limited computing resources.

[0056] (5) In the process of calculating the correction matrix, this invention unifies the measured color data and the target color data to the same LAB color space for fitting. The LAB color space is designed as an approximately uniform perceptual color space, which means that the magnitude of the color difference is closer to the degree of difference perceived by human vision. Correction in such a space can more directly optimize the color accuracy perceived by the human eye. By using the LAB color space for comparison, the luminance component (L) and chrominance component (A, B) are clearly separated, which makes the correction more targeted at handling luminance component or chrominance component issues. Attached Figure Description

[0057] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0058] Figure 1 This is a flowchart of the correction method in this invention;

[0059] Figure 2 This is a block diagram of the correction system structure in this invention;

[0060] Figure 3 This is a schematic diagram of the correction device in this invention.

[0061] In the diagram: 1-Surface light source; 2-Color camera; 3-Transmittance color chart; 4-Linear platform. Detailed Implementation

[0062] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. 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.

[0063] Color imaging with a color camera typically relies on image data captured by the camera. Color correction parameters are then fitted using target color data. However, traditional target color data comes directly from the true values ​​of the color chart provided by the color chart manufacturer. As the ambient light source changes, the actual target color data on the color chart also changes. If the manufacturer's true values ​​are used directly as the actual target color data, the fitted result will deviate significantly from the actual value, affecting the final correction accuracy. If a color measurement device is used to measure the actual color of the color chart, the probe needs to be close to the light source, which can block the light illuminating the color chart, preventing the acquisition of accurate color information. Furthermore, the color measurement results are affected by the unevenness of the ambient light source, leading to deviations and further impacting the accuracy of color correction.

[0064] like Figure 1 As shown, in order to solve the above problems, this embodiment first provides a color correction method for a color camera, which specifically includes the following steps:

[0065] A fixed surface light source and a color camera facing it are used to perform lens shading correction and white balance correction.

[0066] The surface light source is white light, which can be a standard D65 surface light source or other surface light sources. By pointing a color camera at the lit surface light source, a corresponding surface light source image can be captured. Lens shading correction, performed on the surface light source image, is an image preprocessing technique used to eliminate shadow effects caused by lens characteristics in the surface light source image. This is achieved by homogenizing the surface light source image, making its distribution more uniform. White balance aims to make the colors in an image match human visual perception. The human visual system has an automatic white balance capability, compensating for ambient lighting to make objects appear as the same color. However, image sensors do not have this automatic white balance function. Therefore, the goal of white balance is to correct white objects under different surface light sources to the white perceived by the human eye, eliminating color casts in the image. White is chosen because the human eye is less sensitive to the chromaticity information of other colors than to white.

[0067] Calculate the light source correction coefficient for each region of the surface light source to correct the non-uniformity of the surface light source; wherein, the light source correction coefficient is inversely proportional to the sum of the XYZ components of each region of the light source, and the XYZ components of each region are measured by a color measurement device.

[0068] As shown above, after a color camera captures an area light source and completes lens shadow correction, it corrects the inhomogeneity of the camera and lens, as well as the inhomogeneity caused by the distribution of the area light source. However, when a color measurement device is used to measure the area light source, this inhomogeneity will be introduced again. Therefore, the color measurement device needs to measure the inhomogeneity of the area light source separately. Only in this way can the influence of the uneven distribution of the area light source be removed during subsequent color truth value measurement, thus obtaining the truth value that matches the image data actually captured by the color camera. By making the light source correction coefficient inversely proportional to the sum of the XYZ components of each region of the light source, the uneven distribution of different regions of the area light source is reasonably utilized. Combined with the sum of the XYZ components of different regions of the area light source, a dynamic light source correction coefficient is formed. Through the constraint of the inverse proportionality, a light source correction coefficient with the opposite magnitude to the sum of the XYZ components can be formed, so that the different light source regions are uniform after the final correction.

[0069] A fixed transmissive color chart is positioned between the surface light source and the color camera, and parallel to the surface light source; each region of the light source corresponds one-to-one with each color block of the transmissive color chart;

[0070] The XYZ correction values ​​of each color patch on the transmissive color chart are calculated to obtain LAB correction values. The XYZ correction values ​​are calculated using the light source correction coefficient and the original XYZ values, which are obtained by measuring the transmitted light passing through the transmissive color chart using a color measuring device.

[0071] By replacing the traditional reflective color chart with a transmissive color chart, the problem of the color measurement device probe blocking the surface light source when receiving light at close range is fundamentally solved. At the same time, the raw XYZ values ​​obtained by the color measurement device can be used to analyze and obtain the LAB correction values ​​of each color block of the color chart after correction, i.e., the target color data, based on the light source correction coefficient. This not only avoids the accuracy problems caused by the traditional manufacturer directly providing the true value of the color chart under different surface light source environments, but also effectively solves the color distribution problem caused by the non-uniformity of the surface light source to the color measurement device by correcting the raw XYZ values.

[0072] A correction matrix is ​​obtained by fitting the measured color data with the LAB correction value, which is used as a color correction parameter; the measured color data is obtained by measuring the transmitted light passing through the transmissive color card from the color camera's surface light source.

[0073] At this point, the color data directly captured by the color camera is the measured color data. Since the color measurement equipment has already obtained the target color data after calibration, in order to obtain the calibration matrix, it is only necessary to make the color data obtained by combining the measured color data and the calibration matrix as close as possible to the target color data. The corresponding calibration matrix can then be selected as the color correction parameter for the current scene. Because both the measured color data and the target color data are based on the color data obtained from the color card under the current surface light source illumination, and the target color data has achieved an effect close to human eye perception after removing the influence of the surface light source uniformity, the calibration matrix fitted on this basis will necessarily make the corresponding corrected color data conform to human eye requirements.

[0074] In summary, this invention performs color correction for color cameras based on color charts illuminated by actual surface light sources, avoiding the influence of actual surface light sources on the true values ​​of color charts provided by manufacturers. It solves the problem of surface light source occlusion during target color data measurement by using a transmissive color chart and solves the problem of surface light source distribution uniformity by using a light source correction coefficient, thus significantly improving the overall accuracy of color correction.

[0075] As shown above, the purpose of lens shading correction is to eliminate the shading effect caused by lens characteristics in area light source images. To improve correction efficiency and ensure correction effect, the specific steps include:

[0076] Images of the area light source captured by a color camera are acquired and divided into several regions. The acquired area light source images are then divided into grids to form several cell regions, and the RGB data within each cell region are statistically analyzed.

[0077] Calculate the total average grayscale value and the average grayscale value for each region in the image with the area light source. Use the quotient of the total average grayscale value and the average grayscale value for each region as the lens correction coefficient for each region. Define the total average grayscale value for each RGB channel as R.ave G ave B ave The average grayscale value of each region under each RGB channel is R. ref (u,v), G ref (u,v), B ref (u,v), the lens correction coefficients for each region under each RGB channel are R. gain (u,v), G gain (u,v), B gain (u,v), the calculation formula is as follows:

[0078] R gain (u,v)=R ave / R ref (u,v)

[0079] G gain (u,v)=G ave / G ref (u,v)

[0080] B gain (u,v)=B ave / B ref (u,v)

[0081] Where u and v are the horizontal and vertical coordinate numbers of each cell range, respectively.

[0082] Extract the grayscale values ​​of all pixels in each channel of the area light source image, and then correct them using the lens correction coefficients for the corresponding regions of each pixel to obtain the corrected image data. Define the pixel grayscale values ​​for each RGB channel as R(x,y), G(x,y), and B(x,y), respectively, and the corresponding corrected pixel grayscale values ​​are R... gain (x,y), G gain (x,y), B gain (x, y), where x and y are the horizontal and vertical coordinates of each pixel, respectively. The calculation formula is as follows:

[0083] R gain (x,y)=R(x,y)×R gain (u,v)

[0084] G gain (x,y)=G(x,y)×G gain (u,v)

[0085] B gain (x,y)=B(x,y)×B gain (u,v)

[0086] As shown above, white balance aims to make the colors of an image match the visual perception of the human eye. Its goal is to correct white objects under different surface light sources to the white color perceived by the human eye. Therefore, to make reasonable use of surface light sources for correction, white balance correction specifically includes the following steps:

[0087] Image of a surface light source captured by a color camera is acquired, and the maximum value of each RGB component is obtained, defined as R. max G max B max .

[0088] Calculate the quotient of the maximum value among all components in the area light source image and the maximum value among all RGB components, and use this quotient as the gain coefficient for each RGB component. Define the maximum value among all components as I. max The gain coefficients of each RGB component are R k G k B k The calculation formula is as follows:

[0089] R k =I max / R max

[0090] G k =I max / G max

[0091] B k =I max / B max

[0092] White balance correction is achieved by multiplying the RGB component data of the area light source image by their corresponding gain coefficients. As shown above, the pixel grayscale values ​​for each RGB channel are R(x,y), G(x,y), and B(x,y), and the white balance corrected data are R... white (x,y), G white (x,y), B white (x, y), the calculation formula is as follows:

[0093] R white (x,y)=R(x,y)×R k

[0094] G white (x,y)=G(x,y)×G k

[0095] B white (x,y)=B(x,y)×B k

[0096] To accurately capture color information that closely approximates human visual perception, color measurement equipment employs a colorimeter, with the colorimeter probe maintaining a consistent distance from each color patch on the color chart. During measurement, the colorimeter probe should be as close as possible to the color patch without touching it, and perpendicular to the plane of the color chart. The distance between the probe and the color chart should remain consistent across different color patches. Compared to other measuring devices, a colorimeter offers a significant speed advantage, directly simulating the XYZ tristimulus response of the human eye or directly calculating Lab values. Measurements are typically completed instantaneously (usually a fraction of a second to a few seconds), and it is portable, easy to operate, and relatively inexpensive.

[0097] To properly set the light source correction coefficient, a colorimeter can be used to measure the XYZ values ​​of the light source area corresponding to each color patch on the color chart. The specific formula for calculating the light source correction coefficient is as follows: α i =S light_XYZ_min / S light_XYZ (i);

[0098] Where i is the sequence number corresponding to different regions of the surface light source, α i S represents the light source correction coefficients for different regions of the surface light source. light_XYZ_min S is the minimum value in the set formed by the sums of the XYZ components of all regions of the surface light source. light_XYZ (i) represents the sum of the XYZ components corresponding to different regions of the surface light source.

[0099] Considering that the non-uniformity of the surface light source distribution mainly causes the deviation of the L component, it is only necessary to correct the L component by combining the light source correction coefficient. The specific calculation formula for the XYZ correction value is as follows:

[0100] X target (i)=X card (i)×α i ;Y target (i)=Y card (i)×α i Z target (i)=Z card (i)×α i ;

[0101] Among them, X target (i) represents the X component correction value corresponding to each color patch on the color chart, X card (i) represents the original values ​​of the X component corresponding to each color patch on the color chart, and Y... target (i) represents the Y component correction value corresponding to each color patch on the color chart. card (i) represents the original Y component value corresponding to each color block on the color chart, and Z... target (i) represents the Z component correction value corresponding to each color patch on the color chart, Z card (i) represents the original Z component values ​​corresponding to each color patch on the color chart. X target(i), Y target (i), Z target (i) After converting to the LAB color space, the L... arget (i), A target (i), B target (i), the specific conversion formula can be found below.

[0102] The calculation of the light source correction coefficient uses the minimum value among the sums of the XYZ components of all regions of the surface light source as the benchmark. This effectively avoids the loss of detail caused by excessive brightness and can recover some detail information to a certain extent. Furthermore, since the human eye is more sensitive to changes in brightness in dark areas, using the minimum value as the benchmark preserves the integrity of dark areas (i.e., the minimum brightness remains unchanged), which is more consistent with visual perception. At the same time, the relative contrast of bright areas remains acceptable after compression (because the original signal-to-noise ratio of bright areas is high). Moreover, choosing the minimum value as the benchmark only requires finding the global minimum, effectively reducing time complexity. Without iteration or matrix operations, computational efficiency is greatly improved with limited computing resources.

[0103] The specific process for calculating the XYZ correction value based on the light source correction coefficient is as follows:

[0104] S1: Calculate the sum of the XYZ components corresponding to different regions of the surface light source.

[0105] Let the XYZ values ​​corresponding to different regions of the surface light source be X light_i Y light_i Z light_i The calculation formula is as follows:

[0106]

[0107] Where, k i Let E be the intensity factor at location i in the region. ref (λ) represents the spectral power distribution of the reference light source, and x(λ), y(λ), and z(λ) are the corresponding functions of the XYZ components in the CIE 1931 standard colorimetric observer color matching function, respectively. ref Y ref Z ref All values ​​are X, Y, and Z values ​​corresponding to the spectral power distribution of the reference light source.

[0108] Therefore, the sum of the XYZ components at region position i of the light source is S. light_XYZ (i) The calculation formula is:

[0109]

[0110] Among them, S ref It is the sum of the XYZ components corresponding to the spectral power distribution of the reference light source, which is theoretically a constant and does not depend on the location of the region.

[0111] S2:S light_XYZ_min Calculation of light source correction factor

[0112] Because: S light_XYZ (i)=k i ×S ref

[0113] Therefore, S light_XYZ_min Location of the region corresponding to the minimum intensity factor: S light_XYZ_min (i)=k min ×S ref

[0114] Where, k min It is the minimum value among all regional intensity factors.

[0115] Light source correction factor α at location i i The calculation formula is:

[0116]

[0117] S3:X card (i), Y ard (i), Z card (i) calculation

[0118] Due to X at different locations i in different regions card (i), Y ard (i), Z card (i) Depending on the spectral power distribution of the light source and the transmittance t(λ) of the color card, we can obtain:

[0119]

[0120] Among them, X card_ref Y card_ref Z card_ref All values ​​are X, Y, and Z values ​​of the corresponding color chart under the spectral power distribution of the reference light source.

[0121] S4:X target (i), Y target (i), Z target (i) calculation

[0122] From the above, we can see that:

[0123]

[0124] When the color card is uniform, t(λ) does not change with the position of the color block, therefore X card_ref Y card_ref Z card_refBoth are constants and are independent of the region location i, which means that the inhomogeneity of the light source has been completely removed.

[0125] To ensure that the final correction result conforms to human visual perception, the correction matrix is ​​obtained by fitting the target color data, which specifically includes the following steps:

[0126] Collect the measured color data of each color block on the color chart, i.e., the measured RGB data, and calculate the simulated RGB data after correction by the simulation matrix;

[0127] Convert analog RGB data to LAB color space to obtain analog LAB data;

[0128] The simulation matrix that minimizes the sum of the squared Euclidean distances between the simulated LAB data and the target color data is used as the correction matrix.

[0129] The fitting principle of the correction matrix is ​​as follows:

[0130] Let the RGB component data in the measured RGB data be R raw (i), G raw (i), B raw (i) Set the analog matrix to a certain 3×3 matrix, and define the analog RGB data after analog matrix correction as R... corr (i), G corr (i), B corr (i), and then convert to the XYZ color space to obtain the simulated XYZ data components X. meas (i), Y meas (i), Z meas (i), the specific calculation formula is as follows:

[0131]

[0132] Let X meas (i), Y meas (i), Z meas (i) After conversion to the LAB color space, the data of each component are L meas (i), A meas (i), B meas (i), the specific calculation formula is as follows:

[0133]

[0134] Among them, X n Y n Z n The values ​​are 95.047, 100, and 108.833 respectively. X n Y n Z nHere, f(t) is the intermediate parameter participating in the operation, f(t) is the intermediate function participating in the operation, and t is the independent variable parameter participating in the operation of f(t).

[0135] As shown above, the LAB correction value, i.e. the target color data, is L... target (i), A target (i), B target (i) Let parameter W satisfy the following formula:

[0136]

[0137] Where N is the total number of color patches on the color chart, the simulation matrix corresponding to the minimum W is used as the correction matrix, and W is the sum of the squared Euclidean distances between the simulation LAB data and the target color data.

[0138] As shown above, this method successfully unifies both measured and target color data into the same LAB color space for fitting. The LAB color space is designed as a nearly uniform perceptual color space, meaning that the magnitude of color differences more closely approximates the degree of difference perceived by human vision. Correction within this space allows for more direct optimization of color accuracy perceived by the human eye. Using the LAB color space for comparison clearly separates the luminance component (L) and chrominance components (A, B), enabling correction to address luminance or chrominance component issues more specifically.

[0139] like Figure 2 As shown, a second aspect of the present invention also provides a color correction system for a color camera, comprising:

[0140] The camera correction module is used to perform lens shading correction and white balance correction for color cameras.

[0141] The light source correction module is used to calculate the light source correction coefficient for each region of the surface light source to correct the non-uniformity of the surface light source; wherein, the light source correction coefficient is inversely proportional to the sum of the XYZ components of each region of the light source, and the XYZ components of each region are measured by a color measurement device; each region of the light source corresponds one-to-one with each color block of the transmissive color chart.

[0142] The target analysis module is used to calculate the XYZ correction value of each color block on the transmissive color chart, so as to convert it into the LAB correction value; the XYZ correction value is calculated by the light source correction coefficient and the original XYZ value, which is obtained by the color measuring device measuring the transmitted light passing through the transmissive color chart.

[0143] The calibration analysis module is used to fit the measured color data and the LAB calibration value to obtain a calibration matrix, which is used as a color calibration parameter; the measured color data is obtained by the transmitted light from the color camera's measurement surface light source passing through the transmissive color card.

[0144] The specific operation method of the calibration system can be referred to the calibration method described above.

[0145] like Figure 3 As shown, a third aspect of the present invention also provides a color correction device for a color camera, comprising:

[0146] Surface light source 1 is used to provide the lighting environment; surface light source 1 is white light, which can be a standard D65 surface light source or other surface light sources, and surface light source 1 is placed horizontally on the straight platform 4.

[0147] Color camera 2 is mounted facing the surface light source 1 so that the light-receiving surface of color camera 2 is directly opposite the surface light source 1. If color camera 2 outputs Bayer format, it should be converted to RGB data using an interpolation algorithm. If color camera 2 is a line scan camera, the linear platform 4 needs to be controlled to move at a constant speed, and the camera's line frequency needs to be adjusted so that the aspect ratio of the captured image is 1, thereby capturing the color chart image. Alternatively, the same effect can be achieved by controlling the movement of color camera 2 through other devices.

[0148] The transmissive color chart 3 is positioned between the surface light source and the color camera, parallel to the surface light source 1, and within the field of view of the color camera; at this time, the transmissive color chart 3 can be horizontally attached to the upper surface of the surface light source 1.

[0149] Color measurement equipment is used to measure the transmitted light from a surface light source through a color card. Color measurement equipment can preferably be a colorimeter, or a spectrometer or other equipment can be selected. During measurement, the colorimeter probe should be as close as possible to the color patch, but not in contact with it, and perpendicular to the plane of the color card. When measuring different color patches, the distance between the probe and the color card should not be significantly different.

[0150] A processor is used to execute the above correction method.

[0151] A fourth aspect of the present invention also provides a computer-readable storage medium including a computer program that, when executed by a processor, implements the above-described correction method.

[0152] In practical applications, a computer-readable storage medium can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0153] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0154] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0155] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0156] In the description of this specification, references to terms such as "an embodiment," "example," and "specific example" indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0157] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.

Claims

1. A color correction method for a color camera, characterized in that, include: A fixed surface light source and a color camera facing it are used to perform lens shading correction and white balance correction. Calculate the light source correction coefficients for each region of the surface light source to correct the non-uniformity of the surface light source; A fixed transmissive color chart is positioned between the surface light source and the color camera, and parallel to the surface light source. The XYZ correction values ​​of each color patch on the transmissive color chart are calculated to obtain LAB correction values. The XYZ correction values ​​are obtained by using the light source correction coefficient and the original XYZ values, which are obtained by measuring the transmitted light passing through the transmissive color chart using a color measuring device. A correction matrix is ​​obtained by fitting the measured color data with the LAB correction value, which is used as the color correction parameter; the measured color data is obtained by the transmitted light from the color camera's measurement surface light source passing through the transmissive color card; The light source correction coefficient is inversely proportional to the sum of the XYZ components of each region of the light source, and the XYZ components of each region are measured by a color measurement device; each region of the light source corresponds one-to-one with each color block of the transmissive color chart.

2. The color correction method for a color camera according to claim 1, characterized in that, Lens shadow correction includes: The image of the area light source captured by the color camera is acquired and divided into several regions; Calculate the total average gray value and the average gray value of each region in each channel of the surface light source image, and use the quotient of the total average gray value and the average gray value of each region as the lens correction coefficient for each region. Extract the grayscale values ​​of all pixels in each channel of the surface light source image, and then correct them using the lens correction coefficients of the corresponding regions of each pixel to obtain the corrected image data.

3. The color correction method for a color camera according to claim 1, characterized in that, White balance correction includes: Acquire images of the surface light source taken by a color camera to obtain the maximum values ​​of each RGB component; Calculate the quotient of the maximum value among all components in the area light source image and the maximum value among each RGB component, and use it as the gain coefficient for each RGB component. The white balance correction is achieved by multiplying the RGB component data of the surface light source image with the corresponding gain coefficient.

4. The color correction method for a color camera according to claim 1, characterized in that, The color measurement equipment uses a colorimeter for measurement, and the colorimeter probe is kept at a consistent distance from each color block on the color card.

5. A color correction method for a color camera according to any one of claims 1-4, characterized in that, The specific formula for calculating the light source correction factor is as follows: α i =S light_XYZ_min / S light_XYZ (i); Where i is the sequence number corresponding to different regions of the surface light source, α i S represents the light source correction coefficients for different regions of the surface light source. light_XYZ_min S is the minimum value in the set formed by the sums of the XYZ components of all regions of the surface light source. light_XYZ (i) represents the sum of the XYZ components corresponding to different regions of the surface light source.

6. The color correction method for a color camera according to claim 5, characterized in that, The specific formula for calculating the XYZ correction value is as follows: X target (i)=X card (i)×α i ;Y target (i)=Y card (i)×α i Z target (i)=Z card (i)×α i ; Among them, X target (i) represents the X component correction value corresponding to each color patch on the color chart, X card (i) represents the original values ​​of the X component corresponding to each color patch on the color chart, and Y... target (i) represents the Y component correction value corresponding to each color patch on the color chart. card (i) represents the original Y component value corresponding to each color block on the color chart, and Z... target (i) represents the Z component correction value corresponding to each color patch on the color chart, Z card (i) represents the original Z component values ​​corresponding to each color block on the color chart.

7. A color correction method for a color camera according to claim 6, characterized in that, The correction matrix obtained by fitting the target color data includes: Collect the measured color data of each color block on the color chart, i.e., the measured RGB data, and calculate the simulated RGB data after correction by the simulation matrix; Convert analog RGB data to LAB color space to obtain analog LAB data; The simulation matrix that minimizes the sum of the squared Euclidean distances between the simulated LAB data and the target color data is used as the correction matrix.

8. A color correction system for a color camera, characterized in that, include: The camera correction module is used to perform lens shading correction and white balance correction for color cameras; The light source correction module is used to calculate the light source correction coefficient for each region of the surface light source to correct the non-uniformity of the surface light source; wherein, the light source correction coefficient is inversely proportional to the sum of the XYZ components of each region of the light source, and the XYZ components of each region are measured by a color measurement device; each region of the light source corresponds one-to-one with each color block of the transmissive color chart; The target analysis module is used to calculate the XYZ correction value of each color block on the transmissive color chart, so as to convert it into the LAB correction value; the XYZ correction value is calculated by the light source correction coefficient and the original XYZ value, which is obtained by the color measuring device measuring the transmitted light passing through the transmissive color chart. The calibration analysis module is used to fit the measured color data and the LAB calibration value to obtain a calibration matrix, which is used as a color calibration parameter; the measured color data is obtained by the transmitted light from the color camera's measurement surface light source passing through the transmissive color card.

9. A color correction device for a color camera, characterized in that, include: Surface light source, used to provide a lighting environment; A color camera is mounted to a surface light source such that the light-collecting surface of the color camera faces the surface light source. A transmissive color chart is positioned between the surface light source and the color camera, and is parallel to the surface light source. Color measuring equipment used to measure the transmitted light from a surface light source through a color chart; A processor for performing the correction method according to any one of claims 1-7.

10. A computer-readable storage medium comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the correction method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Color calibration method for imaging color measurement device

    US20030169347A1

  • Image processing method, electronic device, computer program product, and storage medium

    WO2024103746A1