Spectral response function optimization method and system based on digital camera full-parameter imaging model
Through technologies such as digital camera full parameter imaging model and principal component analysis, the spectral response function of digital cameras is optimized, which solves the problems of complex and low accuracy of spectral response function estimation in the existing technology, and achieves higher response value prediction accuracy and chromatic aberration reduction Small, supports multispectral imaging and color correction applications.
Patent Information
- Application Number
- CN202411419258.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-10-11
AI Technical Summary
In the prior art, the spectral response function estimation method of digital cameras has problems such as complex operation, expensive equipment, large noise influence, limited curve characteristics and large color difference between the estimation results and the actual response value, resulting in multispectral imaging and color correction accuracy errors.
Using the spectral response function optimization method based on the digital camera full parameter imaging model, the spectral response function database is collected, the training sample spectrum is measured, the response values of different imaging scenes are taken, the camera imaging parameters are recorded, and the spectral power distribution of the light source is synchronized. The main Component analysis and pseudo-inverse algorithm calculate the initial response function, combine the digital camera full parameter imaging model to predict the raw response value, and obtain the final response function through CIEDE2000 chromatic aberration optimization.
显著提升了相机响应值预测精度,减少了色差,支持数码相机在多光谱成像和颜色校正等实际应用中提高精度。
Smart Images

Figure CN119316589A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer digital image processing, and in particular relates to a spectral response function optimization method and system based on a full-parameter imaging model of a digital camera. Background Art
[0002] In the field of computer vision and color science, the estimation of the spectral response function of digital cameras is a key technology, which is widely used in multispectral imaging, illumination estimation, color correction, and color characterization of digital cameras. Since consumer-grade digital cameras are not designed for high-precision visual tasks, manufacturers often do not disclose their spectral response function data. Therefore, researchers have explored a variety of methods to obtain the spectral response function of cameras, which can be divided into two categories: direct measurement method and indirect estimation method.
[0003] The direct measurement method uses a digital camera to capture images of monochromatic light of different wavelengths generated by a monochromator, and then calculates its spectral response function based on the camera's response at different wavelengths. Although this method can provide accurate results, its operation process is complicated and requires expensive equipment and a specific measurement environment, which limits its wide application in practical applications.
[0004] Given the limitations of direct measurement methods, researchers have proposed indirect estimation methods to estimate the camera spectral response function. However, camera spectral response function estimation faces multiple challenges, including:
[0005] 1. The ill-posedness of the problem caused by the finite dimension of the spectral reflectance makes it difficult to accurately estimate the spectral response function from limited measurement data.
[0006] 2. The impact of noise during camera shooting on the estimation algorithm, which may reduce the accuracy of the estimation results.
[0007] 3. The curve characteristics of the camera spectral response function limit the estimation algorithm. Different camera models may require different estimation strategies.
[0008] 4. There is a large color difference between the estimated spectral response curve in practical applications and the response value obtained by the camera actually shooting, which limits its application in tasks such as color correction and characterization.
[0009] At present, most estimation methods focus on solving the similarity between the curve and the real curve, but ignore the main role of the spectral response function in practical applications. This deviation leads to a large color difference between the predicted camera response value and the response value actually obtained by the camera, which causes accuracy errors in subsequent multispectral imaging and color correction applications. Summary of the invention
[0010] The purpose of the present invention is to solve the problem described in the background technology and to propose a spectral response function optimization method based on a full-parameter imaging model of a digital camera.
[0011] In view of the problems existing in the above-mentioned existing research, the present invention proposes a method for solving the problem, firstly, collecting the existing public spectral response function database, measuring the spectrum of the training samples, photographing and obtaining the original format response values of the training samples under different imaging scenes and recording the camera imaging parameters, synchronously measuring the spectral power distribution of the light source of the imaging scene, selecting the data in the 400 to 700 nanometer band in the spectral response function database, and normalizing the spectral response function by three channels of RGB, using principal component analysis (PCA) to calculate the principal components of the spectral response function database by channel, using the pseudo-inverse algorithm to calculate the initial spectral response function, and then predicting the raw response values of the training sample set under the same imaging conditions based on the full-parameter imaging model of the digital camera, and normalizing the original format response values of the training samples and the predicted training sample set response values by three channels of RGB, respectively, calculating the CIEDE2000 color difference between the two, using it as the loss function, and using the sequential quadratic programming method to iteratively optimize to obtain the final camera spectral response function. The technical solution of the present invention is a spectral response function optimization method based on the full-parameter imaging model of a digital camera, which specifically includes the following steps:
[0012] Step 1, collect the existing public spectral response function database, and normalize the spectral response function by three channels of RGB;
[0013] Step 2, measuring the spectral reflectance of the training samples;
[0014] Step 3, obtaining the original digital response values of the training samples under different imaging scenes, and recording the camera imaging parameters;
[0015] Step 4, measuring the spectral power distribution of the light source during the shooting process;
[0016] Step 5, combining the spectral reflectance of the training sample and the spectral power distribution of the light source, using principal component analysis to calculate the principal components of the spectral response function database by channel, and using the pseudo-inverse algorithm to calculate the initial spectral response function;
[0017] Step 6, based on the initial digital camera imaging model, combined with the camera imaging parameters and the initial spectral response function, a curve fitting model is used to obtain the nonlinear parameters in the digital camera full parameter imaging model;
[0018] Step 7, based on the digital camera full parameter imaging model and combined with the initial camera spectral response function, predict the raw response value of the training sample set under any identical imaging conditions;
[0019] Step 8, respectively normalize the original format response value of the test sample and the predicted training sample set response value in three channels of RGB;
[0020] Step 9: Calculate the color difference between the normalized original format response value and the predicted response value, use it as the loss function, and iteratively optimize to obtain the final camera spectral response function.
[0021] Furthermore, the specific implementation of step 5 is as follows;
[0022] The camera spectral response function is decomposed into s using principal component analysis. k,n =σ k *E k , k = R, G, B, where the coefficient σ k =[σ k,1 , σ k,2 ] is a 1×2 vector, E k =[e k,1 , e k,2 ] T is a 2×31 eigenvector matrix; based on this, the initial digital camera imaging model is expressed as:
[0023]
[0024] in is the predicted response of the camera, g k σ k E k is the camera spectral response function before normalization, l is the spectral power distribution of the scene light source, and R is the spectral reflectance of the training sample;
[0025] By solving k=R,G,B,where the superscript '+' represents pseudo-inverse, and the camera spectral response function is restored. Then the initial spectral response function S k It is expressed as:
[0026]
[0027] Where r is the original digital response value of the training sample captured by the camera.
[0028] Furthermore, the specific implementation of step 6 is as follows:
[0029] When the initial camera spectral response function is known, the preliminary predicted camera response can be obtained:
[0030]
[0031] Among them, S k is the initial spectral response function, l is the spectral power distribution of the scene light source, and R is the spectral reflectance of the training sample;
[0032] The initial values of nonlinear parameters can be obtained through the curve fitting model:
[0033]
[0034] Among them, r is the original digital response value of the training sample captured by the camera, and f S is the sensitivity function, c1, c2, and β are parameters that characterize the non-equivalence between camera exposure time and ISO.
[0035] Furthermore, the specific implementation of step 7 is as follows:
[0036] First, the radiation spectrum distribution l(λ) of the light source is irradiated on the surface of the object, and after absorption and reflection by the object, a radiation spectrum image is formed, as shown in formula (6):
[0037] L scene (x,y,λ)=∫r(x,y,λ)l(λ) (6)
[0038] Where λ represents the wavelength, r(x, y, λ) is the spectral reflectance of the pixel (x, y) in the image, l(λ) represents the relative spectral radiance of the light source, and L scene (x, y, λ) represents the radiation spectrum at each pixel. Subsequently, the radiation spectrum image is focused by the camera lens and enters the sensor, and forms an irradiance image before entering the sensor, as shown in formula (7):
[0039]
[0040] Where f / # is the effective aperture number of the lens, m is the lens magnification, T(λ) is the transmittance of the lens, L(x, y, λ) represents the radiation spectrum at each pixel, and I(x, y, λ) is the irradiance at each pixel. Furthermore, the irradiance image enters the camera sensor, undergoes photoelectric conversion and analog-to-digital conversion, and obtains a Bayer pattern mosaic image. The camera raw response value image of the scene is obtained through the interpolation algorithm. The process is shown in equations (8) to (12):
[0041] Q(x, y) = ∫ Ω I image (x,y,λ)S k (λ)dλ (8)
[0042] Where Ω is the spectral wavelength range, S k (λ) is the spectral response function of the camera, Q(x, y) is the number of photoelectric conversions per unit time at the pixel (x, y), and within a given exposure time τ, the total photoelectric conversion amount of the camera sensor is defined as:
[0043] φ(x, y) = f s ∫ τ Q(x,y)dt (9)
[0044] In the formula, f s is the sensitivity function, τ is the exposure time; when the spectral irradiance and the quantum efficiency of the sensor remain unchanged during one shooting, φ(x) can be further simplified to the form shown in formula (10):
[0045] φ(x, y) = f s τQ(x,y) (10)
[0046] According to equations (8) and (10), the raw response value p(x, y) at any pixel (x, y) in the image can be expressed as:
[0047]
[0048] In addition, considering the nonlinear relationship between the irradiance of the camera sensor and the camera readout response, the model uses three coefficients c1, c2 and β to characterize the non-equivalence between exposure time and ISO, and the final raw response value p(x, y) expression of any pixel point can be obtained:
[0049]
[0050] Furthermore, the channel normalization method in step 8 is shown in formula (13):
[0051]
[0052] In the formula, R, G, and B are the R channel, G channel, and B channel of the sample respectively. Represents a sample channel normalized response value vector, p k represents the response value before normalization.
[0053] Furthermore, the specific implementation of step 9 is as follows:
[0054] First, convert the response value after channel normalization in step 8 from RGB color space to XYZ color space, then convert it to Lab color space, and then calculate its CIEDE2000 color difference ΔE 00 As a loss function:
[0055]
[0056] in, p represents the camera prediction response and the original format response of each sample, and μ is an adjustable parameter, which is the maximum color difference in the sample to set the regularization constraint of the loss function.
[0057] Furthermore, in step 2, the spectral reflectance of the training sample is measured using a spectrophotometer;
[0058] In step 3, a digital camera is used to obtain the original digital response values of the training samples in different imaging scenes;
[0059] In step 4, a color illuminance meter is used to synchronously measure the spectral power distribution of the light source during the shooting process.
[0060] Furthermore, the camera imaging parameters in step 3 include exposure time and ISO sensitivity.
[0061] Furthermore, in step 9, a sequential quadratic programming method is used to iteratively optimize and obtain the final camera spectral response function.
[0062] The present invention also provides a spectral response function optimization system based on a digital camera full-parameter imaging model, comprising:
[0063] one or more processors;
[0064] A storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement a spectral response function optimization method based on a full-parameter imaging model of a digital camera as described in the above scheme.
[0065] Aiming at the problem that the spectral response function curve obtained by the existing camera spectral response estimation method has a large color difference in practical application and the response value obtained by the camera actually shooting, the present invention predicts the raw response value of the training sample set under the same imaging conditions based on the full parameter imaging model of the digital camera, and respectively normalizes the original format response value of the training sample and the predicted training sample set response value in RGB three channels, calculates the CIEDE2000 color difference between the two, takes it as the loss function, and uses the sequential quadratic programming method to iteratively optimize to obtain the final camera spectral response function. The method of the present invention can significantly improve the prediction accuracy of the camera response value and support various practical applications based on digital cameras. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 is a flow chart of an embodiment of the present invention.
[0067] Figure 2 The RGB three-channel distribution diagram of the camera spectral response, where (a) is the initial estimated camera spectral response and (b) is the optimized camera spectral response. DETAILED DESCRIPTION
[0068] When the technical solution of the present invention is specifically implemented, it can be operated by those skilled in the art using computer software technology.
[0069] like Figure 1 As shown, the present invention provides a multi-spectral reconstruction method based on camera raw response value prediction, which specifically includes the following steps:
[0070] Step 1: collect the existing public spectral response function database, select the data in the 400 to 700 nanometer band, and normalize the spectral response function by three channels of RGB;
[0071] The method for normalizing the spectral response function by dividing the RGB channels in step 1 is as follows:
[0072]
[0073] where s k,n is the normalized spectral response function, s k,n =[s k (400nm), s k (410nm),…,s k (700nm)],S k is the spectral response function before normalization, S k =g k *s k,n , g k > 0, k = R, G, B, g k is a constant of the three channels R, G, and B. R, G, and B are R channel, G channel, and B channel, respectively. In this method, the existing spectral response function is normalized by channel, and the peak values of all RGB channels are normalized to one.
[0074] Step 2, using a spectrophotometer to measure the spectral reflectance R of the training sample;
[0075] Step 3: Use a digital camera to obtain the original digital response values of the training samples in different imaging scenes, and record the camera imaging parameters (such as exposure time, ISO sensitivity, etc.);
[0076] Step 4, using a color illuminance meter to synchronously measure the spectral power distribution l of the light source during the shooting process;
[0077] Step 5, combining the spectral reflectance of the training sample and the spectral power distribution of the light source, using principal component analysis (PCA) to calculate the principal components of the spectral response function database by channel, and using the pseudo-inverse algorithm to calculate the initial spectral response function;
[0078] In step 5, principal component analysis (PCA) is used to calculate the principal components of the spectral response function database by channel, and the method of using the pseudo-inverse algorithm to calculate the initial spectral response function is as follows:
[0079] The camera spectral response function is decomposed into s using principal component analysis. k,n =σk *E k , k = R, G, B, where the coefficient σ k =[σ k,1 , σ k,2 ] is a 1×2 vector, E k =[e k,1 , e k,2 ] T is a 2×31 eigenvector matrix. Based on this, the initial digital camera imaging model can be expressed as:
[0080]
[0081] in is the predicted response of the camera, g k σ k E k is the camera spectral response function before normalization, l is the spectral power distribution of the scene light source, and R is the spectral reflectance of the training sample.
[0082] By solving k=R,G,B,where the superscript '+' represents pseudo-inverse, which can restore the camera spectral response function. Then the initial spectral response function S k It is expressed as:
[0083]
[0084] Among them, r is the original digital response value of the training sample captured by the camera;
[0085] Step 6, based on the initial digital camera imaging model, combined with the camera imaging parameters and the initial spectral response function, a curve fitting model is used to obtain the nonlinear parameters in the digital camera full parameter imaging model;
[0086] In step 6, based on the initial digital camera imaging model, the method of using the curve fitting model to obtain the nonlinear parameters in the digital camera full parameter imaging model is as follows:
[0087] When the initial camera spectral response function is known, the preliminary predicted camera response can be obtained:
[0088]
[0089] The initial values of nonlinear parameters can be obtained through the curve fitting model:
[0090]
[0091] Among them, r is the original digital response value of the training sample captured by the camera, and f SIt is a sensitivity function, usually obtained by dividing the ISO value by 100. c1, c2, and β are parameters that characterize the non-equivalence between camera exposure time and ISO.
[0092] Step 7, based on the digital camera full parameter imaging model, combined with the initial camera spectral response function, camera imaging parameters and nonlinear parameters, predict the raw response value of the training sample set under any identical imaging conditions;
[0093] In step 7, based on the full-parameter imaging model of the digital camera, the method for predicting the raw response value of the training sample set under any imaging condition is as follows:
[0094] First, the radiation spectrum distribution l(λ) of the light source is irradiated on the surface of the object, and after absorption and reflection by the object, a radiation spectrum image is formed, as shown in formula (6):
[0095] L scene (x,y,λ)=∫r(x,y,λ)l(λ) (6)
[0096] Where λ represents the wavelength, r(x, y, λ) is the spectral reflectance of the pixel (x, y) in the image, l(λ) represents the relative spectral radiance of the light source, and L scene (x, y, λ) represents the radiation spectrum at each pixel. Subsequently, the radiation spectrum image is focused by the camera lens and enters the sensor, forming an irradiance image before entering the sensor, as shown in formula (7):
[0097]
[0098] In the formula, f / # is the effective aperture number of the lens, m is the lens magnification, T(λ) is the transmittance of the lens, L(x, y, λ) represents the radiation spectrum at each pixel, and I(x, y, λ) is the irradiance at each pixel. Further, the irradiance image enters the camera sensor, undergoes photoelectric conversion and analog-to-digital conversion, and obtains a Bayer pattern mosaic image, and the camera raw response value image of the scene is obtained through the interpolation algorithm. The process is shown in equations (8) to (12):
[0099] Q(x, y) = ∫ Ω I image (x,y,λ)S k (λ)dλ (8)
[0100] Where Ω is the spectral wavelength range, which is 400-700nm in this study, and S k (λ) is the spectral response function of the camera, Q(x, y) is the number of photoelectric conversions per unit time at the pixel (x, y), and within a given exposure time τ, the total photoelectric conversion amount of the camera sensor is defined as:
[0101] φ(x, y) = f s ∫ τ Q(x,y)dt (9)
[0102] In the formula, f s is the sensitivity function, usually obtained by dividing the ISO value by 100, and τ is the exposure time. When the spectral irradiance and the quantum efficiency of the sensor remain unchanged during a single shot, φ(x) can be further simplified to the form shown in formula (10):
[0103] φ(x, y) = f s τQ(x,y) (10)
[0104] According to equations (8) and (10), the raw response value p(x, y) at any pixel (x, y) in the image can be expressed as:
[0105]
[0106] In addition, considering the nonlinear relationship between the irradiance of the camera sensor and the camera readout response, the model uses three coefficients c1, c2 and β to characterize the non-equivalence between exposure time and ISO, and the final raw response value p(x, y) expression of any pixel point can be obtained.
[0107]
[0108] Step 8, respectively normalizing the original format response value of the test sample obtained in step 3 and the predicted training sample set response value obtained in step 7 into three channels of RGB;
[0109] The channel normalization method in step 8 is shown in formula (13):
[0110]
[0111] In the formula, R, G, and B are the R channel, G channel, and B channel of the sample respectively. Represents a sample channel normalized response value vector, p k represents the response value before normalization.
[0112] Step 9: Calculate the CIEDE2000 color difference between the two, that is, the color difference between the normalized original format response value and the predicted response value, use it as the loss function, and use the sequential quadratic programming method to iteratively optimize to obtain the final camera spectral response function.
[0113] First, convert the response value after channel normalization in step 8 from RGB color space to XYZ color space, then convert it to Lab color space, and then calculate its CIEDE2000 color difference (ΔE 00) as the loss function:
[0114]
[0115] in, p represents the camera prediction response and the original format response of each sample. Since we selected ColorChecker SG140 as the training sample, the total number of samples N is 140. μ is an adjustable parameter, which is the maximum color difference in the sample to set the regularization constraint of the loss function. This method is empirically set to 0.1.
[0116] Our goal is to find the camera spectral response function S that minimizes the loss function k (λ) and nonlinear parameters. Since the full-parameter imaging model of digital cameras is in the form of a power function, it is difficult to directly calculate its gradient during the optimization process. Therefore, we choose the sequential quadratic programming method to solve this constrained nonlinear optimization problem.
[0117] The following is a specific example to illustrate the embodiment of the present invention.
[0118] The embodiment uses a Nikon D7200 digital camera, an EVERFINE SPIC-300AW spectral color illuminance meter, and an X-rite i1-Pro3 spectrophotometer as experimental instruments, and conducts experiments in a laboratory environment and an outdoor open environment. In the specific implementation, the ColorChecker SG140 (CCSG) color card is used as a training sample, and the ColorChecker 24 (CC) color card is used as a test sample.
[0119] In the embodiment, in a laboratory environment, based on a closed uniform lighting light box, a Nikon D7200 digital camera is used to shoot digital images of CCSG and CC color cards, and the shooting raw response values of the color cards are extracted. During the shooting process, the color card is placed in the center of the shooting field of view, where the color card plane is about 1 meter away from the camera sensor plane, and the camera focal length is 35 mm. The experiment shoots the CC color card under 5 different exposure and ISO combinations (as shown in Table 1), and the color card images under each exposure combination condition have no overexposure problem to ensure the validity of the experimental data.
[0120] Table 1 Five exposure settings for laboratory environment experiments
[0121]
[0122] In an open outdoor environment, the CCSG and CC color cards were also photographed with a Nikon D7200 digital camera, and the raw response value data of the color cards were extracted. In addition, in the open environment experiment, 5 different exposure and ISO combinations were also set, as shown in Table 2. Among them, the color card images under the first exposure and ISO combination are slightly overexposed, and the color card images under the other exposure and ISO combinations are not overexposed. During the shooting process, the color card was placed in the center of the shooting field of view, where the color card plane was about 3 meters away from the camera sensor plane, and the camera focal length was 22 mm. The rest of the experimental conditions and the color card raw response value prediction method were consistent with the laboratory environment.
[0123] Table 2 Five exposure settings for the open environment experiment
[0124]
[0125] In the experiment, the relative spectral power distribution of the light source was measured using an EVERFINE SPIC-300AW spectral color illuminance meter. The spectral reflectance of the color card was measured using an X-rite i1-Pro3 spectrophotometer. Given the known spectral reflectance of the training sample, the spectral response function of the Nikon D7200, the spectral power distribution of the light source, and the imaging parameters, the response value prediction model can be used to predict the raw response data of the color card under the corresponding imaging conditions, as shown in the following formula:
[0126]
[0127] In the formula, f s is the sensitivity function, which is usually obtained by dividing the ISO value by 100, τ is the exposure time, Ω is the spectral wavelength range, which is 400-700nm in this study, f / # is the effective aperture number of the lens, and m is the lens magnification. represents the radiation spectrum at each pixel, S k (λ) is the spectral response function of the camera.
[0128] The original format response value of the test sample and the predicted training sample set response value are normalized respectively. The specific normalization method is shown in the following formula:
[0129]
[0130] In the formula, R, G, and B are the R channel, G channel, and B channel of the sample respectively. Represents a sample channel-normalized response value vector.
[0131] After obtaining the normalized predicted training sample set response value, the training sample set spectral reflectance, and the test sample original format response value, they are converted from RGB color space to XYZ color space, and then to Lab color space. The CIEDE2000 color difference between the two is calculated and used as the loss function. The sequential quadratic programming method is used to iteratively optimize and obtain the final camera spectral response function.
[0132]
[0133] in, p represents the camera prediction response and the original format response of each sample. Since we selected ColorChecker SG140 as the training sample, the total number of samples N is 140. μ is an adjustable parameter, which is the maximum color difference in the sample to set the regularization constraint of the loss function. This method is empirically set to 0.1.
[0134] In the embodiment, the CIEDE2000 color difference (ΔE 00 ) is used as the evaluation index for camera response value prediction, and the performance of the method of the present invention is evaluated by calculating the color difference between the real original format digital response value obtained by shooting and the predicted raw response value.
[0135] Table 3 Color difference between the real original format digital response value and the predicted raw response value obtained under five different imaging conditions in the laboratory environment before optimizing the camera spectral response
[0136]
[0137] Table 4 Color difference between the real original format digital response value and the predicted raw response value obtained under five different imaging conditions in the laboratory environment after optimizing the camera spectral response
[0138]
[0139] Table 5 Color difference between the real original format digital response value and the predicted raw response value obtained under five different imaging conditions in an open environment before optimizing the camera spectral response
[0140]
[0141]
[0142] Table 6 Color difference between the real original format digital response value and the predicted raw response value obtained under five different imaging conditions in an open environment after optimizing the camera spectral response
[0143]
[0144] It can be seen intuitively from the evaluation index values in the table that the method of the present invention can significantly improve the prediction accuracy of the full-parameter imaging model of digital cameras in both laboratory environments and open environments, providing support for subsequent applications.
[0145] On the other hand, an embodiment of the present invention further provides a spectral response function optimization system based on a digital camera full-parameter imaging model, comprising:
[0146] one or more processors;
[0147] A storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement a spectral response function optimization method based on a full-parameter imaging model of a digital camera as described in the above scheme.
[0148] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.
Claims
1. A spectral response function optimization method based on a digital camera full-parameter imaging model, characterized in that: The steps include: Step 1: collect the existing public spectral response database and normalize the spectral response by three channels of RGB; Step 2, measuring the spectral reflectance of the training samples; Step 3, obtaining the original digital response values of the training samples under different imaging scenes, and recording the camera imaging parameters; Step 4, measuring the spectral power distribution of the light source during the shooting process; Step 5, combining the spectral reflectance of the training sample and the spectral power distribution of the light source, using principal component analysis to calculate the principal components of the spectral response database by channel, and using the pseudo-inverse algorithm to calculate the initial spectral response function; Step 6, based on the initial digital camera imaging model, combined with the camera imaging parameters and the initial spectral response function, a curve fitting model is used to obtain the nonlinear parameters in the digital camera full parameter imaging model; Step 7, based on the digital camera full parameter imaging model and combined with the initial camera spectral response function, predict the raw response value of the training sample set under any identical imaging conditions; Step 8, respectively normalize the original format response value of the test sample and the predicted training sample set response value in three channels of RGB; Step 9: Calculate the color difference between the normalized original format response value and the predicted response value, use it as the loss function, and iteratively optimize to obtain the final camera spectral response function.
2. A method for optimizing the spectral response function based on a full-parameter imaging model of a digital camera as claimed in claim 1, characterized in that: The specific implementation of step 5 is as follows; The camera spectral response is decomposed into s using principal component analysis. k,n =σ k *E k , k = R, G, B, where the coefficient σ k =[σ k,1 , σ k,2 ] is a 1×2 vector, E k =[e k,1 , e k,2 ] T is a 2×31 eigenvector matrix; based on this, the initial digital camera imaging model is expressed as: in is the predicted response of the camera, g k σ k E k is the camera spectral response function before normalization, l is the spectral power distribution of the scene light source, and R is the spectral reflectance of the training sample; By solving The superscript '+' represents the pseudo-inverse, and the camera spectral response function is restored. Then the initial spectral response function S k It is expressed as: Where r is the original digital response value of the training sample captured by the camera.
3. A method for optimizing the spectral response function based on a full-parameter imaging model of a digital camera as claimed in claim 1, characterized in that: The specific implementation of step 6 is as follows; When the initial camera spectral response function is known, the preliminary predicted camera response can be obtained: Among them, S k is the initial spectral response function, l is the spectral power distribution of the scene light source, and R is the spectral reflectance of the training sample; The initial values of nonlinear parameters can be obtained through the curve fitting model: Among them, r is the original digital response value of the training sample captured by the camera, and f s is the sensitivity function, c1, c2, and β are parameters that characterize the non-equivalence between camera exposure time and ISO.
4. A method for optimizing the spectral response function based on a full-parameter imaging model of a digital camera as claimed in claim 1, characterized in that: The specific implementation of step 7 is as follows; First, the radiation spectrum distribution l(λ) of the light source is irradiated on the surface of the object, and after absorption and reflection by the object, a radiation spectrum image is formed, as shown in formula (6): L scene (x,y,λ)=∫r(x,y,λ)l(λ) (6) Where θ represents the wavelength, r(x, y, λ) is the spectral reflectance of the pixel (x, y) in the image, l(λ) represents the relative spectral radiance of the light source, and L scene (x, y, λ) represents the radiation spectrum at each pixel. Subsequently, the radiation spectrum image is focused by the camera lens and enters the sensor, and forms an irradiance image before entering the sensor, as shown in formula (7): Where f / # is the effective aperture number of the lens, m is the lens magnification, T(λ) is the transmittance of the lens, L(x, y, λ) represents the radiation spectrum at each pixel, and I(x, y, λ) is the irradiance at each pixel. Furthermore, the irradiance image enters the camera sensor, undergoes photoelectric conversion and analog-to-digital conversion, and obtains a Bayer pattern mosaic image. The camera raw response value image of the scene is obtained through the interpolation algorithm. The process is shown in equations (8) to (12): Q(x,y)=∫ Ω I image (x,y,λ)S k (λ)dλ (8) Where Ω is the spectral wavelength range, S k (λ) is the spectral response function of the camera, Q(x, y) is the number of photoelectric conversions per unit time at the pixel (x, y), and within a given exposure time τ, the total photoelectric conversion amount of the camera sensor is defined as: φ(x,y)=f s ∫ τ Q(x,y)dt (9) In the formula, f s is the sensitivity function, τ is the exposure time; when the spectral irradiance and the quantum efficiency of the sensor remain unchanged during one shooting, φ(x) can be further simplified to the form shown in formula (10): φ(x,y)=f s τQ(x,y) (10) According to equations (8) and (10), the raw response value p(x, y) at any pixel (x, y) in the image can be expressed as: In addition, considering the nonlinear relationship between the irradiance of the camera sensor and the camera readout response, the model uses three coefficients c1, c2 and β to characterize the non-equivalence between exposure time and ISO, and the final raw response value p(x, y) expression of any pixel point can be obtained:
5. A method for optimizing the spectral response function based on a full-parameter imaging model of a digital camera as claimed in claim 1, characterized in that: The channel normalization method in step 8 is shown in formula (13): In the formula, R, G, and B are the R channel, G channel, and B channel of the sample respectively. Represents a sample channel normalized response value vector, p k represents the response value before normalization.
6. A method for optimizing the spectral response function based on a full-parameter imaging model of a digital camera as claimed in claim 1, characterized in that: The specific implementation of step 9 is as follows; First, convert the response value after channel normalization in step 8 from RGB color space to XYZ color space, then convert it to Lab color space, and then calculate its CIEDE2000 color difference ΔE 00 As a loss function: in, Represent the camera prediction response and the original format response of each sample respectively, and μ is an adjustable parameter, which is the maximum color difference in the sample to set the regularization constraint of the loss function.
7. A method for optimizing the spectral response function based on a full-parameter imaging model of a digital camera as claimed in claim 1, characterized in that: In step 2, the spectral reflectance of the training sample is measured using a spectrophotometer; In step 3, a digital camera is used to obtain the original digital response values of the training samples in different imaging scenes; In step 4, a color illuminance meter is used to synchronously measure the spectral power distribution of the light source during the shooting process.
8. The method for optimizing the spectral response function based on the full-parameter imaging model of a digital camera according to claim 1, characterized in that: The camera imaging parameters in step 3 include exposure time and ISO sensitivity.
9. A method for optimizing a spectral response function based on a full-parameter imaging model of a digital camera as claimed in claim 1, characterized in that: In step 9, the sequential quadratic programming method is used to iteratively optimize and obtain the final camera spectral response function.
10. A spectral response function optimization system based on a digital camera full-parameter imaging model, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement a spectral response function optimization method based on a full-parameter imaging model of a digital camera as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Method for optimizing and estimating spectral sensitivity of digital camera based on perception chromatic aberration minimization
CN110784709A
Spectral reconstruction method based on sample feature matching
CN110926609A
Open measurement environment spectral measurement method based on imaging condition correction
CN111750993A
Spectral measurement method based on digital camera imaging model
CN111750994A
Method, device and program for estimating spectral reflectance
JP2007208708A