Camera calibration method, device, and readable storage medium

By acquiring and calculating the spectral response data of the camera and mathematically modeling based on the color correction matrix, the problem of high calibration complexity of the camera color correction matrix in the prior art is solved, and an efficient and convenient calibration process is achieved.

WO2025054986A1PCT designated stage expired Publication Date: 2025-03-20AAC TECHNOLOGIES PTE LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/119191
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-09-15
Publication Date
2025-03-20

AI Technical Summary

Technical Problem

In the prior art, the camera color correction matrix calibration method has high complexity, large workload, and low calibration efficiency and convenience.

Method used

By obtaining the spectral response sensitivity data of the camera to be calibrated, the spectral power distribution data of different standard light sources, and the spectral reflectivity data of multiple color samples, the camera's response parameters relative to the color sample are calculated, and the response parameters are corrected based on the color correction matrix, and the matrix element value is adjusted until the effective correction conditions are met.

Benefits of technology

It effectively reduces the calibration complexity and efficiency, and improves the convenience and accuracy of the calibration process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023119191_20032025_PF_FP_ABST
    Figure CN2023119191_20032025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a camera calibration method, a device, and a readable storage medium. The specific implementation solution comprises: acquiring spectral response sensitivity of a camera, spectral power distribution data of different light sources, and spectral reflectivity of multiple color samples; for each light source, on the basis of the spectral response sensitivity, the spectral reflectivity and the corresponding spectral power distribution data, calculating a response parameter of the camera with respect to each color sample; on the basis of a current color correction matrix (CCM), correcting the response parameter to obtain a corrected response parameter; if it is determined on the basis of the corrected response parameters corresponding to all the color samples that the CCM does not satisfy an effective correction condition, adjusting an element value of the current CCM until the CCM satisfies the effective correction condition; and calibrating an adjusted CCM corresponding to each light source to the camera. In the present application, by means of mathematical modeling, the response of a camera to a color sample in a real light source environment is simulated to calibrate a CCM, thereby effectively reducing the calibration complexity and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Camera calibration method, device and readable storage medium Technical Field

[0001] This application relates to the field of calibration technology, particularly camera calibration technology, and can be applied to camera color correction matrix (CCM) calibration scenarios. Specifically, this application discloses a camera calibration method, device, and readable storage medium. Background Art

[0002] The color correction matrix is ​​designed to adjust the color reproduction capability of the digital camera itself. It is used to perform color correction on the images captured by the camera, helping the camera to restore the original colors of objects in the real scene as accurately as possible to ensure the camera has the best color reproduction effect.

[0003] In the related art, when calibrating the color correction matrix of a camera, it is usually necessary to repeatedly shoot a standard color card with multiple different color blocks under the lighting environment of multiple actual light source devices, and then compare the difference between the actual color of the color block and the color restored by the camera. When the color difference is large, adjust the element value of the color correction matrix and re-execute the color restoration and color difference comparison until the color difference measurement index is less than the preset value. The entire calibration process is highly complex and labor-intensive, and the calibration efficiency and convenience are low. It is worth noting that the techniques described in this section are not necessarily techniques that have been previously conceived or adopted. Unless otherwise specified, it should not be assumed that any technique described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise specified, the issues mentioned in this section should not be considered to have been recognized in any prior art. Technical issues

[0004] The present application provides a camera calibration method, device, and readable storage medium, which can at least solve the problems of high complexity and large workload of the color correction matrix calibration method provided in the related art. Technical Solutions

[0005] To solve the above technical problems, the first aspect of the present application provides a camera calibration method, comprising:

[0006] Step A: obtaining spectral response sensitivity data of the camera to be calibrated, obtaining spectral power distribution data corresponding to different standard light sources, and obtaining spectral reflectance data corresponding to multiple color samples;

[0007] Step B: for each of the standard light sources, calculating the response parameters of the camera to be calibrated relative to each of the color samples based on the spectral response sensitivity data, the spectral reflectance data, and the corresponding spectral power distribution data;

[0008] Step C, correcting the response parameters based on a color correction matrix to obtain corrected response parameters;

[0009] Step D: If it is determined according to the corrected response parameters corresponding to all the color samples that the color correction matrix does not meet the preset valid correction condition, then adjusting the element values ​​of the color correction matrix, and then returning to execute step C;

[0010] Step E: When it is determined that the color correction matrix meets the valid correction condition according to the corrected response parameters corresponding to all the color samples, the color correction matrix corresponding to each standard light source is calibrated to the camera to be calibrated.

[0011] A second aspect of the present application provides an electronic device, comprising: a memory and a processor, wherein the processor is used to execute a computer program stored on the memory; when the processor executes the computer program, the processor implements the various steps of the camera calibration method provided in the first aspect of the present application.

[0012] A third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the camera calibration method provided in the first aspect of the present application are implemented. Beneficial effects

[0013] As can be seen from the above, according to the camera calibration method, device and readable storage medium provided by this application, the spectral response sensitivity of the camera to be calibrated, the spectral power distribution data corresponding to different standard light sources and the spectral reflectance corresponding to multiple color samples are obtained; for each standard light source, the response parameters of the camera to be calibrated relative to each color sample are calculated based on the spectral response sensitivity, spectral reflectance and the corresponding spectral power distribution data; the response parameters are corrected based on the color correction matrix to obtain the corrected response parameters; if it is determined that the color correction matrix does not meet the preset effective correction conditions based on the corrected response parameters corresponding to all color samples, the element values ​​of the color correction matrix are adjusted until the color correction matrix meets the effective correction conditions, and the color correction matrix corresponding to each standard light source is calibrated to the camera to be calibrated. Through the implementation of this application, the color correction matrix is ​​calibrated by simulating the camera's response to color samples in a real light source environment in a mathematical modeling manner, which effectively reduces the calibration complexity and efficiency.

[0014] It should be understood that the content described in this section is not intended to identify the key or important features of this application, nor is it intended to limit the scope of this application. Other features of this application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings illustrate exemplary embodiments and constitute a part of the specification. Together with the description of the specification, they serve to explain exemplary implementations of the embodiments. The drawings are shown for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals designate similar, but not necessarily identical, elements.

[0016] FIG1 is a schematic diagram showing the principle of a color correction matrix calibration method provided by the related art;

[0017] FIG2 is a schematic diagram of the basic flow of a camera calibration method provided in the first embodiment of the present application;

[0018] FIG3 is a schematic diagram of spectral power distribution data provided by the first embodiment of the present application;

[0019] FIG4 is a schematic diagram of spectral reflectance data of 24 color sample blocks provided in the first embodiment of the present application;

[0020] FIG5 is a schematic diagram of a relative spectral response sensitivity curve provided in the first embodiment of the present application;

[0021] FIG6 is a schematic diagram of a detailed flow chart of a camera calibration method provided in a second embodiment of the present application;

[0022] FIG7 is a schematic diagram of a color card calibration result provided in the third embodiment of the present application;

[0023] FIG8 is a schematic diagram of color error provided by the third embodiment of the present application;

[0024] FIG9 is a schematic diagram of the hardware structure of an electronic device provided in the fourth embodiment of the present application. Modes for Carrying Out the Invention

[0025] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of this application.

[0026] It should be noted that in the description of the embodiments of the present application, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0027] The essential color correction matrix for digital cameras adjusts the camera's color reproduction capabilities, helping it reproduce the original colors of objects in real scenes as accurately as possible. Before shipment, the method commonly used by mobile device manufacturers to obtain the CCM matrix for digital cameras is an iterative process based on experimentation and comparison, requiring multiple shots, adjustments, and comparisons to achieve optimal color reproduction. Figure 1 shows a schematic diagram of the principle behind a color correction matrix calibration method provided by related technologies. The method begins with the known color of each color sample block in a standard color chart as the target. The color difference metric between each sample block and the actual color of the corresponding sample block on the standard color chart is then calculated. The CCM matrix elements are then adjusted through iterative optimization to reduce the color difference metric until a CCM matrix that meets the color reproduction requirements is obtained, which is then calibrated to the camera.

[0028] First, because the traditional method of obtaining CCM requires repeatedly photographing standard color charts under the lighting conditions of multiple actual light source devices, completing a round of such photography is a tedious and time-consuming process. The key is that once some parameters in the previous CCM calibration work change (for example, the gamma curve, AWB parameters, etc. will be appropriately adjusted due to changes in project requirements), the CCM calibration work must be carried out again. In fact, in a project, there are often several gamma curves, each of which corresponds to several light sources, and each light source corresponds to a CCM matrix. Therefore, once the gamma curve changes, the workload of completing the CCM recalibration using traditional methods is huge. This process lacks efficiency and convenience, and is very time-consuming.

[0029] Secondly, actual light source equipment is usually designed and manufactured based on the spectral power distribution data developed by the CIE. When developing the spectral power distribution data of various standard light sources, the CIE based its development on experimental measurements and statistical analysis in various parts of the world. Therefore, the spectral power distribution data of these standard light sources largely represent the characteristics of the natural daylight lighting environment. However, due to limitations in manufacturing processes, material properties, instrument measurement errors, etc., there is often a large deviation between the spectral power distribution data of the standard light sources produced by actual light source equipment and the standard light sources developed by the CIE. As a result, the light emitted by the actual light source equipment cannot well represent the natural daylight lighting environment. Then, the CCM matrix calibrated under the lighting conditions of these actual light source equipment will not match the natural daylight lighting environment, resulting in a large calibration error.

[0030] Third, traditional methods typically use physical standard color blocks of known colors for photographic testing, such as the 18 color blocks in the ColorChecker. However, these color blocks fade during use due to the gradual changes in the dye properties, causing the colors of the standard color blocks to deviate from their theoretical values. If these faded color blocks are used as color references for CCM matrix calibration, the resulting CCM matrix will introduce color reproduction errors in actual applications. In addition, the ColorChecker color chart only provides 18 color samples, a very limited number that cannot cover the various color variations in the real world. Therefore, the CCM matrix calibrated based on 18 color blocks also has limitations. For example, when the user captures colors other than the 18 standard color blocks in the field of view, the calibrated CCM matrix cannot guarantee that these colors still have a small color error, which may lead to color errors.

[0031] Fourthly, traditional methods, within a limited project lifecycle, can only select a few actual light sources to create the lighting environments for a few high-frequency application scenarios. Therefore, the calibrated CCM matrix performs poorly in other lighting environments not covered by the actual light sources. To improve the adaptability of the CCM, traditional methods must use cameras to capture a wider range of actual lighting environments to expand the number of light source samples. However, this faces difficulties such as being unable to obtain lighting samples for winter scenes during summer and for sunny scenes during cloudy days. This results in a relatively limited applicability of the CCM matrix calibration results.

[0032] Based on this, in order to solve the problems of high complexity, large workload, and limited accuracy and applicability of the color correction matrix calibration method provided in the related art, the first embodiment of the present application provides a camera calibration method. FIG2 is a basic flow chart of the camera calibration method provided in this embodiment. The camera calibration method includes the following steps:

[0033] Step 201: Acquire spectral response sensitivity data of the camera to be calibrated, acquire spectral power distribution data corresponding to different standard light sources, and acquire spectral reflectance data corresponding to multiple color samples.

[0034] Specifically, unlike the traditional method that must use actual light sources to illuminate standard color samples and then use the camera to take pictures and record its own response to the standard color samples, this embodiment quantifies the lighting environment of the actual light source, the color characteristics of the standard color samples, and the response characteristics of the camera, so that the subsequent calibration process can be transformed into a mathematical operation process.

[0035] In the objective world, color is essentially determined by spectral power distribution. Each lighting environment has a specific spectral power distribution. When this light strikes an object, different wavelengths of light interact with the object differently, such as through transmission, absorption, or reflection. When light is modulated by an object, its spectral power distribution no longer matches that of the incident light. When new light enters the human eye, the human visual system responds to the new spectral power distribution and interprets it as the object's color. This is because the cones in the human eye have specific sensitivities to different wavelengths of light. Different wavelengths activate different types of cones, and the relative degree of activation enables the human eye to perceive different colors. Furthermore, digital cameras also have their own spectral response sensitivity, which represents the degree to which the camera's lens, infrared filter, and image sensor respond to different wavelengths of light. Changes to the camera's lens, infrared filter, or image sensor will also affect the camera's spectral response sensitivity. This spectral response sensitivity varies from camera to camera, and if color correction is not performed, different cameras will produce slightly different color representations when capturing the same scene.

[0036] In some implementations of this embodiment, the above-mentioned step of obtaining spectral power distribution data corresponding to different standard light sources includes: obtaining spectral power distribution data of different standard light sources in different lighting scenarios from a preset public database; wherein the lighting scenarios include at least one of the following: season, daytime period; and / or, obtaining spectral power distribution data actually tested for different standard light sources.

[0037] Specifically, the spectral power distribution data of this embodiment can be derived from a public expert database or a custom database. In practical applications, the spectral power distribution data of a specific standard light source can be found in the spectral power distribution database disclosed on the CIE official website. The standard light source types mainly include natural light sources (such as sunlight), standard light source A, standard light source D series, standard fluorescent light sources, and standard LED light sources, etc., thereby overcoming the error caused by the mismatch between the light emitted by the actual light source equipment and the natural daylight lighting environment in the traditional method. In addition, this embodiment can also obtain a custom database through self-testing. Preferably, the CAS140CT-156 model spectral instrument produced by Instrument System can be used to accurately measure the spectral power distribution data of various common lighting environments in daily life, thereby forming a custom spectral database, and then selecting the spectral power distribution data of the light source in the high-frequency application scenario as needed during the camera calibration process. FIG3 is a schematic diagram of spectral power distribution data provided in this embodiment, showing spectral power distribution data under outdoor daylight lighting conditions on a sunny spring day in a city in southern China. In colorimetry research, the focus is usually on the relative proportion of the radiant power of each wavelength rather than the absolute spectral power distribution. Therefore, the spectral power distribution tested here refers to the relative spectral power distribution.

[0038] In some implementations of this embodiment, the above-mentioned step of obtaining spectral reflectance data corresponding to multiple color samples includes: obtaining actual application scene information of the camera to be calibrated; and obtaining spectral reflectance data of multiple corresponding color samples from a preset sample database based on the actual application scene information.

[0039] Specifically, unlike traditional methods that rely on 18 color sample blocks from the ColorChecker, this embodiment can obtain spectral reflectance data for a more diverse range of color sample blocks from the official X-Rite database. Figure 4 shows a schematic diagram of spectral reflectance data for 24 color sample blocks provided by this embodiment, with the data normalized. Of course, to accommodate more complex and diverse application scenarios, this embodiment can further expand the number of color samples. For example, it can utilize the Munsell Color System's color data, which contains over 2,000 popular color samples, each with known spectral reflectance data. It is worth noting that actual camera application scenarios vary considerably. This embodiment adapts to these scenarios by specifically acquiring reflectance data for multiple color samples for subsequent calibration, ensuring that all color variations in actual camera application scenarios are covered while reducing the amount of calibration data required. Furthermore, the use of quantified color sample data in this embodiment can avoid color errors introduced by dye fading from the physical color samples used in traditional methods.

[0040] It should also be noted that, for the spectral response sensitivity data of the camera, the present embodiment can use the QT-1000 model monochromator produced by Labsphere to accurately measure the spectral response sensitivity data of the digital camera. For example, a monochromator can be used to generate monochromatic visible light in the range of 360 to 780 nm at 2 nm intervals, and the spectral response sensitivity data of the digital camera within this band can be tested. It should be understood that the calibration process of the present embodiment only needs to test the spectral response sensitivity data of the digital camera once. During the iterative adjustment process of the CCM matrix, there is no need to manually take pictures repeatedly in the actual scene, making the calibration process more convenient and efficient. As shown in Figure 5, a schematic diagram of a relative spectral response sensitivity curve provided by the present embodiment, the spectral response sensitivity data includes the response values ​​of the four channels of R, Gr, Gb, and B. The specific calculation formula is expressed as follows:

[0041] Camera spectral response sensitivity data = camera actual received and corresponding light signal intensity (λ) / monochromator output light signal intensity (λ) = photo average gray value (λ) / monochromator output radiation brightness (λ), λ∈{380nm,780nm}

[0042] Step 202 : For each standard light source, calculate the response parameters of the camera to be calibrated relative to each color sample based on the spectral response sensitivity data, the spectral reflectance data, and the corresponding spectral power distribution data.

[0043] Specifically, in this embodiment, the spectral response sensitivity data of the camera to be calibrated, the spectral reflectance data of each color sample, and the spectral power distribution data of each standard light source can be input into a preset calculation model to calculate the response parameter R of the camera to be calibrated relative to each color sample. n G n B n ; The calculation model is expressed as:

[0044] Among them, I k,x Indicates the response parameter, C k (λ) represents the spectral response sensitivity data, R x (λ) represents the spectral reflectance data, and L(λ) represents the spectral power distribution data.

[0045] Step 203: Correct the response parameters based on the color correction matrix to obtain corrected response parameters.

[0046] Specifically, the implementation process of using the color correction matrix to correct the response parameters in this embodiment can refer to the principle introduced in Figure 1 above. n G n Bn After correction by the color correction matrix, a new response parameter is obtained, that is, the corrected response parameter R' n G' n B' n .

[0047] Step 204: Determine whether the color correction matrix meets the preset valid correction condition based on the corrected response parameters corresponding to all color samples; if not, execute step 205; if so, execute step 206;

[0048] Step 205 : Adjust the element values ​​of the color correction matrix; then return to step 203 .

[0049] Specifically, this embodiment determines whether the color correction matrix meets the valid correction condition based on the corrected response parameters. The valid correction condition is used to indicate that the color correction effect of the color correction matrix meets the color reproduction accuracy required by the camera. If not, it means that the currently used color correction matrix has color reproduction errors and needs to be corrected, so as to adjust the element values ​​of the color correction matrix, and then reuse the adjusted color correction matrix to perform response parameter correction.

[0050] In some implementations of this embodiment, after the step of correcting the response parameters based on the color correction matrix to obtain the corrected response parameters, the method further includes: calculating a color restoration evaluation index based on each corrected response parameter and a preset true response parameter; comparing all color restoration evaluation indexes with a preset index threshold, and judging whether the color correction matrix satisfies a preset valid correction condition based on the comparison result; wherein, if all color restoration evaluation indexes are less than or equal to the index threshold, then the color correction matrix satisfies the valid correction condition.

[0051] Specifically, in this embodiment, the response parameter R' is corrected n G' n B' n And the true response parameter R of each color sample 0n G 0n B 0n To quantitatively evaluate the color reproduction accuracy of the camera, when the color reproduction evaluation index determined based on the two is less than a specific threshold, it indicates that the difference between the color restored based on the color correction matrix and the real color is small, the color correction matrix meets the effective correction conditions, and the color reproduction accuracy of the camera can be guaranteed.

[0052] In some implementations of this embodiment, the above-mentioned steps of calculating the color restoration evaluation index based on each corrected response parameter and the preset true response parameter include: converting each corrected response parameter into the CIELAB space to obtain the corresponding first brightness, first chromaticity and first saturation, and converting the preset true response parameter into the CIELAB space to obtain the corresponding second brightness, second chromaticity and second saturation; and calculating the color restoration evaluation index by combining the first brightness, first chromaticity, first saturation, second brightness, second chromaticity and second saturation.

[0053] Specifically, when comparing the corrected response parameters with the true response parameters, this embodiment does not directly compare them in the RGB space. Instead, the comparison is performed after converting the RGB space to the CIELAB space. The color difference of each color sample is measured using the indicator ΔE. ΔE represents the perceived difference between colors, which is also the color reproduction evaluation indicator of this embodiment. This indicator can be used to quantitatively evaluate the accuracy of camera color reproduction. A smaller ΔE value indicates a smaller difference between the restored color and the true color, while a larger ΔE value indicates a larger difference.

[0054] In some implementations of this embodiment, the step of calculating the color reproduction evaluation index by combining the first brightness, the first chromaticity, the first saturation, the second brightness, the second chromaticity, and the second saturation includes: inputting the first brightness, the first chromaticity, the first saturation, the second brightness, the second chromaticity, and the second saturation into a preset color difference evaluation model to calculate the color reproduction evaluation index; the color difference evaluation model is expressed as:

[0055] Wherein, ΔE represents a color reproduction evaluation index, L1, a1, and b1 represent a first brightness, a first chromaticity, and a first saturation, respectively, and L0, a0, and b0 represent a second brightness, a second chromaticity, and a second saturation, respectively.

[0056] In some implementations of this embodiment, the step of adjusting the element values ​​of the color correction matrix includes: determining a corresponding adjustment index based on a difference between a color restoration evaluation index and an index threshold; and adjusting the element values ​​of the color correction matrix according to the adjustment index.

[0057] Specifically, considering that a greater number of iterative adjustments results in a greater amount of computation, which negatively impacts correction efficiency, this embodiment measures the difference between the color restoration accuracy and the required accuracy by reference to the difference between the current color restoration evaluation index and the index threshold, and adaptively determines adjustment indicators for the element values ​​of the color correction matrix, such as the adjustment ratio, in turn, to ensure the effectiveness of each adjustment and ensure that the color correction matrix is ​​adjusted in place with as few matrix element value adjustments as possible, thereby improving the efficiency of the camera's color correction matrix calibration.

[0058] Step 206: Calibrate the color correction matrix corresponding to each standard light source to the camera to be calibrated.

[0059] Specifically, this embodiment adjusts the element values ​​of the color correction matrix and then iteratively executes step 203 above, thereby reducing color differences until the color difference metric is less than a preset value. This results in a color correction matrix suitable for the current light source lighting environment. Finally, this color correction matrix is ​​calibrated to the camera, ensuring that the calibrated camera has accurate color reproduction capabilities in actual application scenarios. After calibrating the spectral power distribution data of a standard light source to obtain a color correction matrix, this embodiment continues the process of steps 202 to 206 above using the spectral power distribution data of another standard light source, ultimately calibrating U color correction matrices for each of the U light sources.

[0060] It should be noted that in this embodiment, the spectral power distribution data of various light sources and the spectral reflectance data of the color samples in the light source database are independent, objective data and are effectively unrelated to the camera itself. However, in traditional methods, the light source, color samples, and camera must be in the same space, and the camera's response to the color samples is recorded by taking photos. Therefore, when the camera is replaced for a new project, the data captured by the camera in the old project cannot be reused. However, in this embodiment, the light source, color samples, and camera are independent of each other, so the light source and color sample data can be easily applied to other projects.

[0061] To better understand the present application, the second embodiment of the present application provides a refined camera calibration method. FIG6 is a flow chart of a refined camera calibration method provided in this embodiment. The camera calibration method includes:

[0062] Step 601: Acquire spectral response sensitivity data of the camera to be calibrated, spectral power distribution data corresponding to different standard light sources, and spectral reflectance data corresponding to multiple color samples;

[0063] Step 602: For each standard light source, input the spectral response sensitivity data, spectral reflectance data, and corresponding spectral power distribution data into a preset calculation model to calculate the response parameters of the camera to be calibrated relative to each color sample;

[0064] Step 603: Correct each response parameter based on the color correction matrix to obtain a corrected response parameter;

[0065] Step 604: convert each corrected response parameter into the CIELAB space to obtain a corresponding first brightness, first chromaticity, and first saturation, and convert the preset true response parameter into the CIELAB space to obtain a corresponding second brightness, second chromaticity, and second saturation;

[0066] Step 605: Input the first brightness, the first chroma, the first saturation, the second brightness, the second chroma, and the second saturation into a preset color difference evaluation model to calculate a color restoration evaluation index;

[0067] Step 606: Determine whether all color reproduction evaluation indicators are less than or equal to the preset indicator threshold; if not, execute step 607; if so, execute step 608;

[0068] Step 607: Adjust the element values ​​of the color correction matrix; then return to step 603;

[0069] Step 608: Calibrate the color correction matrix corresponding to each standard light source to the camera to be calibrated.

[0070] It should be understood that the size of the serial numbers of the steps in this embodiment does not mean the order in which the steps are executed. The order in which the steps are executed should be determined by their functions and internal logic, and should not constitute a sole limitation on the implementation process of the embodiments of this application.

[0071] In order to better demonstrate the results of the above technical solutions provided in the previous embodiments of the present application, the third embodiment of the present application further provides a comparative verification experiment for illustration, as follows:

[0072] Select the same camera and any light source scene (for example, D65), calibrate two CCM matrices using the method of this embodiment and the traditional method respectively, and compare the color correction effects of the two CCM matrices under the selected light source environment.

[0073] First, in the laboratory, a real-world light source was used to generate D65 light. This light was then illuminated by a chart, which was then photographed with a digital camera. Conventional methods were used to iteratively adjust the CCM matrix M1 corresponding to the D65 light source. Alternatively, the spectral power distribution data for the D65 light source published by the CIE was directly used. The spectral response sensitivity data of the digital camera was then measured and, using the method of this embodiment, another CCM matrix M2 corresponding to the D65 light source was obtained through iterative adjustment.

[0074] Then, two sets of tuning parameters were generated using M1 and M2, respectively. The camera was then placed outdoors in natural daylight. When the ambient color temperature was approximately 6500K, the camera was used to capture the ColorChecker standard 24-color chart in the scene using both sets of parameters, yielding the color calibration results for the two 24-color charts. Figure 7 (a) shows the 24-color chart calibration result using the traditional method, while (b) shows the 24-color chart calibration result using the method of this embodiment.

[0075] As shown in Figure 8, a is a schematic diagram of the color error corresponding to the traditional method, and b is a schematic diagram of the color error corresponding to the method of this embodiment. The comparison results show that the color error between the 24-color card photo corresponding to the method of this embodiment and the real color of the 24-color card is smaller. (△E corresponding to the traditional method mean =10.4, △E max =23.6; This patented method corresponds to △E mean =8.85, △E max =13.6).

[0076] Based on the above technical solution provided in the embodiment of the present application, the spectral response sensitivity of the camera to be calibrated, the spectral power distribution data corresponding to different standard light sources, and the spectral reflectance corresponding to multiple color samples are obtained; for each standard light source, the response parameters of the camera to be calibrated relative to each color sample are calculated based on the spectral response sensitivity, spectral reflectance, and the corresponding spectral power distribution data; the response parameters are corrected based on the color correction matrix to obtain the corrected response parameters; if it is determined that the color correction matrix does not meet the valid correction conditions based on the corrected response parameters corresponding to all color samples, the element values ​​of the color correction matrix are adjusted until the color correction matrix meets the valid correction conditions, and the color correction matrix corresponding to each standard light source is calibrated to the camera to be calibrated. Through the implementation of the present application, the color correction matrix is ​​calibrated by simulating the camera's response to color samples in a real light source environment using mathematical modeling, which effectively reduces the calibration complexity and efficiency.

[0077] Please refer to FIG9 , which shows an electronic device provided in a fourth embodiment of the present application. The electronic device can be used to implement the camera calibration method in the aforementioned embodiment. As shown in FIG9 , the electronic device mainly includes:

[0078] Memory 901, processor 902, and bus 903. Memory 901 and processor 902 are connected via bus 903. Memory 901 stores a computer program that can be executed on processor 902. When processor 902 executes the computer program, the camera calibration method described in the aforementioned embodiment is implemented. The number of processors can be one or more.

[0079] The memory 901 can be a high-speed random access memory (RAM) memory or a non-volatile memory such as a disk memory. The memory 901 is used to store executable program code. The processor 902 is coupled to the memory 901.

[0080] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, which may be provided in the electronic device in each of the above embodiments, and the computer-readable storage medium may be the memory in the embodiment shown in FIG. 9 .

[0081] The computer-readable storage medium stores a computer program that, when executed by a processor, implements the camera calibration method described in the aforementioned embodiment. Furthermore, the computer-readable storage medium may be a USB flash drive, a mobile hard drive, a read-only memory (ROM), RAM, a magnetic disk, or an optical disk, among other media capable of storing program code.

[0082] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0083] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of these modules may be selected to achieve the purpose of this embodiment based on actual needs.

[0084] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software functional modules.

[0085] If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a readable storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned readable storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.

[0086] It should be noted that for the aforementioned method embodiments, for ease of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0087] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0088] The above is a description of the camera calibration method, device, and readable storage medium provided in this application. For those skilled in the art, based on the concepts of the embodiments of this application, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting this application.

Claims

1. A camera calibration method, characterized in that: include: Step A, obtaining spectral response sensitivity data of the camera to be calibrated, obtaining spectral power distribution data corresponding to different standard light sources, and obtaining spectral reflectance data corresponding to multiple color samples; Step B: for each of the standard light sources, according to the spectral response sensitivity data, the spectral reflectance data and the corresponding spectral power distribution data, calculating the response parameters of the camera to be calibrated relative to each of the color samples; Step C, correcting the response parameters based on a color correction matrix to obtain corrected response parameters; Step D: if it is determined according to the corrected response parameters corresponding to all the color samples that the color correction matrix does not meet the preset effective correction condition, then adjusting the element values ​​of the color correction matrix, and then returning to execute step C; Step E: When it is determined that the color correction matrix satisfies the effective correction condition according to the corrected response parameters corresponding to all the color samples, the color correction matrix corresponding to each of the standard light sources is calibrated to the camera to be calibrated.

2. The camera calibration method according to claim 1, characterized in that: The step of obtaining spectral power distribution data corresponding to different standard light sources comprises: Obtain spectral power distribution data of different standard light sources in different lighting scenarios from a preset public database; wherein the lighting scenario includes at least one of the following: season, daytime period; And / or, obtaining spectral power distribution data actually tested for different standard light sources.

3. The camera calibration method according to claim 1, characterized in that: The step of acquiring spectral reflectance data corresponding to a plurality of color samples comprises: Acquire actual application scenario information of the camera to be calibrated; According to the actual application scenario information, spectral reflectance data of a plurality of corresponding color samples are obtained from a preset sample database.

4. The camera calibration method according to claim 1, characterized in that: The step of calculating the response parameters of the camera to be calibrated relative to each of the color samples according to the spectral response sensitivity data, the spectral reflectance data and the corresponding spectral power distribution data comprises: The spectral response sensitivity data, the spectral reflectance data and the corresponding spectral power distribution data are input into a preset calculation model to calculate the response parameters of the camera to be calibrated relative to each of the color samples; the calculation model is expressed as: Among them, I k,x represents the response parameter, C k (λ) represents the spectral response sensitivity data, R x (λ) represents the spectral reflectance data, and L(λ) represents the spectral power distribution data.

5. The camera calibration method according to any one of claims 1 to 4, characterized in that: After the step of correcting the response parameter based on the color correction matrix to obtain the corrected response parameter, the method further includes: Calculating color restoration evaluation indicators based on the corrected response parameters and the preset real response parameters respectively; All the color restoration evaluation indicators are compared with a preset indicator threshold, and whether the color correction matrix meets the preset effective correction condition is determined according to the comparison result; wherein, if all the color restoration evaluation indicators are less than or equal to the indicator threshold, the color correction matrix meets the effective correction condition.

6. The camera calibration method according to claim 5, characterized in that: The step of calculating the color restoration evaluation index based on each of the corrected response parameters and the preset real response parameters comprises: Converting each of the corrected response parameters into a CIELAB space to obtain a corresponding first brightness, a first chromaticity, and a first saturation, and converting a preset true response parameter into a CIELAB space to obtain a corresponding second brightness, a second chromaticity, and a second saturation; A color restoration evaluation index is calculated by combining the first brightness, the first chromaticity, the first saturation, the second brightness, the second chromaticity, and the second saturation.

7. The camera calibration method according to claim 6, characterized in that: The step of calculating the color restoration evaluation index by combining the first brightness, the first chromaticity, the first saturation, the second brightness, the second chromaticity and the second saturation comprises: The first brightness, the first chromaticity, the first saturation, the second brightness, the second chromaticity and the second saturation are input into a preset color difference evaluation model to calculate a color restoration evaluation index; the color difference evaluation model is expressed as: Wherein, ΔE represents the color restoration evaluation index, L1, a1 and b1 represent the first brightness, the first chromaticity and the first saturation respectively, and L0, a0 and b0 represent the second brightness, the second chromaticity and the second saturation respectively.

8. The camera calibration method according to claim 6, characterized in that: The step of adjusting the element values ​​of the color correction matrix comprises: Determining a corresponding adjustment index based on a difference between the color restoration evaluation index and the index threshold; The element values ​​of the color correction matrix are adjusted according to the adjustment index.

9. An electronic device, characterized in that: include: Memory and processor; The processor is used to execute the computer program stored in the memory; When the processor executes the computer program, the steps in the camera calibration method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the camera calibration method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Color-correcting method of camera module

    CN104897374A

  • Scene light source color estimation method capable of being effectively embedded into image signal processor

    CN116188797A

  • Illuminant correction for a spectral imager

    US20220346672A1