CN110807812A - Digital image sensor system error calibration method based on prior noise model - Google Patents
Digital image sensor system error calibration method based on prior noise model Download PDFInfo
- Publication number
- CN110807812A CN110807812A CN201910934798.XA CN201910934798A CN110807812A CN 110807812 A CN110807812 A CN 110807812A CN 201910934798 A CN201910934798 A CN 201910934798A CN 110807812 A CN110807812 A CN 110807812A
- Authority
- CN
- China
- Prior art keywords
- noise
- value
- response
- dark
- pixel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
Abstract
The invention discloses a method for calibrating errors of a digital image sensor system based on a prior noise model. For an image sensor which can output linear image response value data, the response value composition model and the noise and systematic error correction model established by the invention can establish a systematic error and noise model contained in the original response value, and calibrate the distribution and intensity level of some systematic errors and noises through the calculation of the RAW image shot under specific conditions. The calibration values can be substituted into the response values established by the invention to form a model, and systematic error correction is carried out on a single RAW file shot by the image sensor.
Description
Technical Field
The invention belongs to the field of image sensor calibration, and particularly relates to a method for establishing noise distribution and an estimation model of a digital image sensor based on prior knowledge.
Background
In order to accurately simulate the conversion process between the optical signal and the digital signal in the digital sensor, besides establishing a process model based on physical principles, the error existing in the actual operation should be considered and corrected. Ideally, the image response D output by the sensor can be represented by the formula
And (4) calculating. The symbols and the corresponding dimensions in the formula are shown in the following table.
TABLE 1 symbolic meanings and corresponding dimensions
According to this equation, the same pixel should have the same response value in two exposures in which the external conditions are identical. In fact, various noises and system errors are introduced into the two conversion processes of the optical signal to the electric signal and the electric signal to the digital signal, and the digital response values of the two exposures are different. The present invention discusses and models these factors that cause differences in pixel response values and compensates and eliminates, by statistical means, the portions in which they can be estimated by various means.
Disclosure of Invention
The invention aims to solve the problem of system errors and noises of a digital image sensor in the exposure process, and provides a method for calibrating the system errors of the digital image sensor based on a prior noise model. The present invention discusses and models these factors that cause differences in pixel response values, and the method can more accurately estimate the noise level of the digital image sensor output values and compensate and eliminate the portions that can be estimated therein by statistical means.
The technical scheme adopted by the invention is as follows:
a digital image sensor system error calibration method based on prior noise model comprises the following steps:
s1: estimating sensor noise based on a calculation formula of an original response value of the digital image sensor and prior knowledge generated by related noise, wherein the expected values and variances of different types of noise including sensor pixel response nonuniformity, thermal noise, shot noise, fixed pattern noise, readout noise and quantization error are estimated, and establishing a total noise composition model D (i, j) of a pixel at a position (i, j) of the sensor;
s2: the sensor raw response value with noise is decomposed into a raw response value mu (i, j) with noise with an expected value not 0 and noise N (i, j) with an expected value 0, and the N is shot1Obtaining mathematical expectation of mu (i, j) by taking time domain mean of imageTaking the variance to obtain the variance of N (i, j)
S3: in a spatial window w centered on the pixel at position (i, j)1The influence of space position related noise is approximately removed by taking the space mean value of the original response value internally, and the window w of the sensor is obtained1Inner primitive response valueAnd variance of noiseThe slope of the first order function of (1) is the integrated gain coefficient g of the sensor0Changing exposure parameters to shoot n2G is obtained by calculating images of different exposures0(ii) an estimate of (d);
s4: shoot n in dark3Taking the time domain average value of the images to obtain the dark current response mudark(ii) an estimate of (i, j);
s5: in a spatial window w centered on the pixel at position (i, j)2The space mean value approximation of the internal original response value is carried out, so that the expectation of the space response nonuniformity K (i, j) is satisfiedAt this time, the ratio of the pixel (i, j) to the spatial mean is the spatial response nonuniformity K (i, j), and n is photographed by changing the illumination brightness4An image, an estimate of K (i, j) is obtained by linear regression; then shooting n under the same exposure condition5Obtaining the estimation of an ideal value e (i, j) of an original response value after removing noise;
s6: correcting the error signals simultaneously to obtain a response value D after removing the system errorncThe expression of (1); spatial window w where image color is uniform3And (4) carrying out internal averaging to remove random noise of the pixels.
Preferably, the specific method of step S1 is:
the digital image sensor raw response value D is represented as:
wherein F (-) represents the non-linear modulation of the circuit, F is the aperture value of the camera system, g is the sensor integrated gain, T is the sensor exposure time,a is a photosensitive sensitivity factor, A is a pixel effective area, U is a brightness modulation factor related to a pixel position, L (lambda) is spectral radiation brightness of the surface of a target object, t (lambda) is an overall transmittance function of a camera system, q (lambda) is a photoelectric efficiency function, and DoffsetRound (-) is a digital circuit rounding operation for the sensor bias response; λ represents the wavelength of light;
then, based on the calculation formula of the original response value of the digital image sensor and the prior knowledge, a mathematical model of the total noise of the original response value of the digital image sensor is established, and the mathematical model is in the form of:
D(i,j)=g0[K(i,j)U(i,j)I0+NTh(i,j)+Ns(i,j)+NFP(i,j)+NR(i,j)]+Doffset(i,j)+NQ(i,j)
wherein D (i, j) is the readout response value of the pixel at the position of the sensor (i, j); similarly, the parameter symbols with suffixes (i, j) each represent the parameter value for the pixel at the location of sensor (i, j);
k (i, j) is the non-uniformity of the pixel response of the sensor due to manufacturing errors:
the terms with subscript 0 each represent a physical quantity corresponding to a pixel free from manufacturing errors;
I0is the number of photoelectrons theoretically stored for a standard pixel;
u (i, j) is a sensor surface illumination modulation factor and represents the vignetting characteristic of a camera system;
NTh(i, j) is the thermal noise generated by the thermal effect of the photodiode, the intensity of which depends on the exposure time T and the ambient temperature of the device, there
E(NTh)=var(NTh)=μTh
Wherein muThE (-) and var (-) represent the computational mathematical expectation and variance, respectively, for the quantities related to the exposure time and the ambient temperature;
Ns(i, j) is shot noise, obeys Poisson distribution, has
E(Ns)=0,var(Ns)=KUI0+NTh
NFP(i, j) is fixed pattern noise, which is systematic error existing in analog circuits corresponding to pixels caused by inconsistency of the COMS image sensor in the circuit manufacturing process;
NR(i, j) reading noise, wherein the noise is introduced by a signal amplification unit at the rear end of the image sensor in the process of amplifying and outputting an analog circuit voltage signal, the expected value of the noise is 0, and the variance is in linear positive correlation with an amplification gain coefficient;
NQ(i, j) is a quantization error, which is a system error introduced by converting a continuous signal into a discrete signal, and the quantization error is subject to [ -0.5, 0.5 [ -0.5 [ ]]Average distribution of inner:comprises the following steps:
preferably, the specific method of step S2 is:
first, a mathematically expected consistency estimate of the raw response value D is obtainedConsistent estimation of sum noise varianceAccording to the statistical characteristics of random noise, the original response value is constructed into a model decomposition, which comprises the following steps:
D(i,j)=μ(i,j)+N(i,j)
where μ (i, j) represents the mathematical expectation of the original response value, and N (i, j) is the sum of the random noise:
the expected value of N (i, j) is 0;
using fixed exposure parameters, taking n shots of the same scene1Images, the response value of these images is
Obtain a consistency estimate of μ (i, j) of
Exploiting sample variance in the time domainAs var [ N (i, j)]Approximation of, calculatingIs estimated to be consistent with
Preferably, the specific method of step S3 is:
taking a window with a side length w1 around the pixel (i, j) so that U (i, j) can be regarded as a constantAnd K (i, j), NTh(i, j) and DoffsetThe spatial means of (i, j) can also be regarded as constants, 1, μTh、μoffset,Wherein muoffsetA theoretical value representing the offset of the response value; substituting into camera response values and noise formulas
With superscript wrAnd the symbol of the parameter marked with "-" indicates that w is taken for the parameterrA window is sized and a local mean value is calculated; r is 1, 2, 3;
shot by varying light source brightness to obtain n2A different original response value, and obtaining n2Group ofCoordinates, i.e. obtainingAndslope g of the functional relationship between0(i,j),g0(i, j) the maximum likelihood estimate is:
whereinRepresenting pairs on the q-th imageGet w1The window is sized and the local mean is calculated,representing pairs on the q-th imageGet w1A window is sized and a local mean value is calculated; by taking g0(i, j) to obtain a corresponding global overall gain coefficient g0。
Preferably, the specific method of step S4 is:
when taken in dark conditions, there is I00, the original response value D in dark conditiondark(i, j) is:
Ddark(i,j)=μdark(i,j)+Ndark(i,j)
μdark(i, j) the expectation of a digital response value in the absence of a light response by the corresponding sensor, referred to as dark current; n is a radical ofdark(i, j) total noise corresponding to no light response by the sensor;
E[Ndark(i,j)]shoot n in dark environment ═ 03Taking the time domain average value of the images to obtain mudark(i, j) estimation:
Ddark,pand (i, j) is the original response value of the pixel at the position of the p image (i, j) shot in the dark condition.
Preferably, the specific method of step S5 is:
the pixel response non-uniformity K (i, j) is first estimated:
let e (I, j) be K (I, j) U (I, j) I0Centered at (i, j), at w2Calculating the spatial mean value of e (i, j) within the range of side length to make U (i, j) be regarded as constant Then there are:
and is
Obtaining n by varying the brightness of the light source4Of group (a)After the sample point, the value of K (i, j) is obtained by linear regression, and the estimated value of K (i, j) is:
for calculating e (i, j), there are
D(i,j)=g0[e(i,j)+NFP(i,j)+μTh]+Doffset(i,j)+N(i,j)
By taking n under the same exposure conditions5The image is composed of E [ N (i, j)]When the ratio is 0, the following:
get an estimate of e (i, j):
preferably, the specific method of step S6 is:
the correction formulas are combined, and the response value D after the system error is removedncExpressed as:
wherein
∈(i,j)=g0[NTh(i,j)+NS(i,j)+NR(i,j)-μTh]+NQ(i,j)。
Preferably, in step S6, the length of the side is w3The method of the window mean value removes random noise, obtains the mathematical expectation value of each point:
preferably, the number of images, n, taken in each step1、n3And n5Is in the range of 10 to 40, n2And n4The value range is 6 to 10;
preferably, the length of the window edge, w, of the spatial mean value in each step is taken1And w2Has a value in the range of 10 to 100, w3And selecting according to the size of the uniform color blocks in the image.
The invention has the beneficial effects that: for an image sensor which can output linear image response value data, the response value composition model and the noise and systematic error correction model established by the invention can establish a systematic error and noise model contained in the original response value, and calibrate the distribution and intensity level of some systematic errors and noises through the calculation of the RAW image shot under specific conditions. The calibration values can be substituted into the response values established by the invention to form a model, and systematic error correction is carried out on a single RAW file shot by the image sensor.
Drawings
FIG. 1 shows three-channel integrated gain coefficient g of an image sensor0A schematic representation of changes with sensor ISO values;
FIG. 2 shows dark current noise μ of G channel of image sensordarkA schematic diagram of the spatial distribution of (a);
FIG. 3 is a schematic diagram of image sensor G channel pixel response non-uniformity;
fig. 4 is a diagram illustrating a variation of a G-channel response value of a RAW image after systematic error correction.
Detailed Description
The invention is further described with reference to the following figures and specific embodiments.
For convenience of description, the expression form of the parameters is defined as follows:
for any parameter, taking A as a general formula of the parameter, the parameter symbols A (i, j) with suffixes (i, j) each represent the value of the parameter A of the pixel at the position of the sensor (i, j); item A with subscript 00Each represents a physical quantity of the parameter a corresponding to a pixel having no manufacturing error; with superscript w1And the symbol of parameter marked with "-"Denotes taking w for this parameter1The window size is large and small, and the local mean value in the window is calculated; with superscript w2And the symbol of parameter marked with "-"Denotes taking w for this parameter2The window size is large and small, and the local mean value in the window is calculated; all with superscript w3And the symbol of parameter "-"Denotes taking w for this parameter3The window size is large and small, and the local mean value in the window is calculated; parameter symbol A with subscript ppThe parameter A representing the p-th image; parameter symbols with superscript ^ CRepresenting an estimate of the parameter a.
Some of the principles of the present invention are discussed below to facilitate a better understanding by those skilled in the art.
To model the pixels at different locations across the image sensor, the above response value calculation should be extended, with
Where (i, j) denotes the position of the photosensitive unit on the sensor plane, and let f (x) be x to simplify the calculation. The noise model and the system error correction method related to the model are suitable for three channels of the camera.
1) Image sensor noise model
In the process of converting an optical signal into a digital signal, the image sensor mainly generates the following six random noises and systematic errors, so that the response value of a read pixel changes:
non-uniformity of pixel response
Due to the limitation of manufacturing process means and random factors in the manufacturing process, different photosensitive units on the same sensor have certain differences in physical properties such as effective photosensitive area, photoelectric conversion coefficient, non-uniformity, spectral transmittance curve and the like. These differences are commonly referred to collectively as the pixel response non-uniformity K. The invention assumes that the different light-sensing units have different values of the photoelectric efficiency function q (i, j, lambda) and the total spectral transmittance function t (i, j, lambda) in intensity, but have no difference related to the wavelength lambda of incident light. Then for the pixel located at (i, j), the non-uniformity distribution function is used
To characterize the sum response non-uniformity of a pixel, the term with subscript 0 represents the corresponding physical quantity of a standard, non-fabrication error pixel. Substituted into the pixel response value formula, have
D(i,j)=round[g0K(i,j)U(i,j)I0+Doffset(i,j)]
Wherein
This equation represents the number of photoelectrons that a standard pixel theoretically stores.
Under the support of the existing semiconductor process, the numerical value of the digital image sensor K slightly fluctuates in the interval around 1, and
andrespectively representing the mean of the computation (mean) and the variance of the samples (sampleviance) in the spatial dimension, as follows
It can be seen that the non-uniformity distribution K (i, j) of the pixel response belongs to the device-dependent system error, does not change with the change of external factors such as exposure conditions, and can be removed by pre-calibration.
Thermal noise
The thermal effect of the photodiode will generate a number of free electrons complying with the poisson distribution, and these electrons will be captured by the photoelectric conversion circuit along with the photoelectrons excited by the photoelectric effect, so that the obtained electric signal is slightly larger than the signal excited by the photoelectrons themselves, and therefore the noise caused by this effect is called thermal noise NTh. The intensity of the thermal noise depends on the exposure time T and the ambient temperature in which the device is located.
Thermal noise N according to the nature of the Poisson distributionThSatisfy the requirement of
E(NTh)=var(NTh)=μTh
Wherein muThE (-) and var (-) represent the computational mathematical expectation (expectaion) and variance (variance), respectively, for quantities related to exposure time and ambient temperature, the same applies below.
Taking the thermal noise into account, the response value calculation formula becomes
D(i,j)=round{g0[K(i,j)U(i,j)I0+NTh(i,j)]+Doffset(i,j)}
Shot noise
The total number of electrons released in a single pixel will be subject to a random fluctuation, an effect known as shot noise NsThe method is macroscopic embodiment of uncertainty in quantum theory. The shot noise effect is caused by the uncertainty accumulation of a large number of single events, and mainly comprises the shot noise of photon distribution, the shot noise of photo-generated current, the thermal effect shot noise and the like in the imaging process of the digital sensor. The presence of shot noise subjects the quantity of photoelectrons that ultimately enter the analog circuit to a Poisson distribution, i.e. (I)*+Ns)~Poisson(I*) In which I*=KUI0+NThI.e. the amount of summed electrons generated by the pixel without taking into account shot noise.
According to the properties of the Poisson distribution, there is E (I)*+Ns)=var(I*+Ns)=I*So as to the shot noise NsIs provided with
E(Ns)=0,var(Ns)=KUI0+NTh
Taking the thermal noise into account, the response value calculation formula becomes
D(i,j)=round{g0[K(i,j)U(i,j)I0+NTh(i,j)+Ns(i,j)]+Doffset(i,j)}
Fixed pattern noise
The inconsistency of the cmos image sensor in the circuit manufacturing process can cause a certain noise, called fixed pattern noise N, to exist in the analog circuit corresponding to each pixelFP. The noise is similar to the pixel response nonuniformity, belonging to the same system error, but the pixel response nonuniformity is related to the photoelectric effect, while the fixed pattern noise is caused by the error in the analog circuit and generally has a certain spatial distribution rule.
Taking the fixed pattern noise into account, the response value calculation formula becomes
D(i,j)=round{g0[K(i,j)U(i,j)I0+NTh(i,j)+Ns(i,j)+NFP(i,j)]+Doffset(i,j)}
Read noise
A signal amplification unit at the rear end of the image sensor introduces certain read-out noise N in the process of amplifying and outputting the voltage signal of the analog circuitR. The expected value is 0, and the variance is linearly and positively correlated with the amplification gain coefficient.
Taking the readout noise into account, the response value calculation formula becomes
D(i,j)=round{g0[K(i,j)U(i,j)I0+NTh(i,j)+Ns(i,j)+NFP(i,j)+NR(i,j)]+Doffset(i,j)}
Quantization error
The electric signal output by the sensor is converted into a digital signal through digital-to-analog conversion, the digital signal is stored and transmitted in an integer form, and in the digital-to-analog conversion, a quantization error N is introduced when a continuous signal is converted into a discrete signalQ. Assuming that the signal values of the analog voltages are equi-probabilistically distributed in the real domain, the quantization error will obey-0.5, 0.5]Average distribution of inner:therefore, it is
Taking the quantization error into account, the response value calculation formula becomes
D(i,j)=g0[K(i,j)U(i,j)I0+NTh(i,j)+Ns(i,j)+NFP(i,j)+NR(i,j)]+Doffset(i,j)+NQ(i,j)
The equation is a model of the digital image sensor with the original response value of the system noise and error. Since the thermal noise, shot noise, readout noise and quantization error in the model are all random variables, the final output original response value D is also a random variable.
2) Calibration and correction of system error of image sensor
In practical image processing applications, pixel raw response values that are not affected by random noise can often be obtained by spatial domain (averaging over a window of a certain size) or temporal domain (averaging over multiple frames of the same pixel). Therefore, the invention is mainly aimed at the systematic errors with non-zero expected value or mean value, i.e. the non-uniformity of pixel response K, the fixed pattern noise NFPAnd a response value offset DoffsetAnd calibrating and correcting. For thermal noise, shot noise, readout noise and quantization error, only the parameter estimation method is given without attempting correction.
Decomposition of noise
According to the statistical characteristics of random noise, the original response value can be constructed into a model decomposition, including
D(i,j)=μ(i,j)+N(i,j)
Where μ (i, j) represents the mathematical expectation of the original response value; n (i, j) is the sum of random noise:
as can be seen, the expected value of N (i, j) is 0.
N (I, j) may be further decomposed into N according to whether the noise level is correlated with the number of electrons II(i, j) and NC(i,j)
According to shot noise NsIs of a nature
According to thermal noise NThAnd quantization error NsIs of a nature
Since both thermal noise and readout noise are independent of pixel location, μ can be omittedThAndposition suffix of (c).
Estimation of random noise
Using fixed exposure parameters, taking n shots of the same scene1Images, the response value of these images is
When n is1Sufficiently large because E [ N (i, j)]When 0, the consistency of μ (i, j) is estimated as
Exploiting sample variance in the time domainAs var [ N (i, j)]Can calculateIs estimated to be consistent with
WhereinRepresenting the time domain variance, the same applies below.
The overall gain factor g0Is estimated by
Due to NIAnd NCThe variance of the whole random noise can be known without correlationCan be expressed as
And
whereinDenotes w centered at (i, j)1×w1The spatial local mean is calculated for the variable X within the window.
On a scale of several pixels in length, the luminance modulation factor U (i, j) varies little, which can be considered as w1U (i, j) is a constant when a relatively large value is not exceededWhen w is1When the size is large enough and the number of pixels in the window is large enough, K (i, j) and NTh(i, j) and DoffsetThe spatial mean of (i, j) can also be considered as a constant, having
Wherein muoffsetThe theoretical value representing the offset of the response value is typically specified by the sensor manufacturer.
Substituted into the camera response value and noise formula, there are
Therefore, as long as enough is obtainedA data pair, a slope g is obtained0(i, j) has an intercept ofIs measured. Obtaining n by changing brightness of light source during actual measurement2A different original response value, and obtaining n2Group coordinates.
When n is1When the size of the particles is larger than the required size,approximately obeying a normal distribution, g0(i, j) is estimated as
Wherein
WhereinRepresenting pairs on the q-th imageGet w1The window is sized and the local mean is calculated,the same is true.
Theoretical g0Is a global constant, and can be controlled by g for each pixel0Obtaining the mean value of the estimated valuesFinal g0And (4) global estimation.
Dark current noise estimation
Taken in dark with I0When it is equal to 0
Ddark(i,j)=μdark(i,j)+Ndark(i,j)
μdark(i, j) the expectation of a digital response value in the absence of a light response by the corresponding sensor, called dark current.
Apparently E [ N ]dark(i,j)]Shoot n in dark environment ═ 03Taking the time domain average value of the images to obtain mudark(i, j) estimation
Estimation of the pixel response non-uniformity
Let e (I, j) be K (I, j) U (I, j) I0. Centered at (i, j), at w2×w2Calculating the spatial mean of e (i, j) within the range when w2When the size is properly selected, U (i, j) can be considered as a constant Then there is
And is
So that n is obtained by changing the brightness of the light source4Of group (a)After sampling, the value of K (i, j) can be obtained by linear regression using the least squares methodIs provided with
For calculating e (i, j), there are
D(i,j)=g0[e(i,j)+NFP(i,j)+μTh]+Doffset(i,j)+N(i,j)
By taking n under the same exposure conditions5The image is composed of E [ N (i, j)]0, available
An estimate of e (i, j) is available
RAW image systematic error correction
Combining the above correction formulas, removing the response value D after the system errorncCan be expressed as
Wherein
∈(i,j)=g0[NTh(i,j)+NS(i,j)+NR(i,j)-μTh]+NQ(i,j)
For the part with uniform and single color in the image, w can also be calculated3×w3The window mean value method removes random noise to obtain the mathematical expected value of each point
This equation is a noise correction model for a single RAW image.
Number of images taken in each step, n1、n3And n5Value ofIn the range of 10 to 40, n2And n4The value ranges from 6 to 10. Likewise, the length of the window side, w, of the spatial mean value is taken in each step1And w2Has a value in the range of 10 to 100, w3And flexibly selecting the color blocks according to the sizes of the uniform color blocks in the image.
The calibration method is applied to the specific embodiment to show the technical effect of the invention.
Examples
In this embodiment, an adopted method for calibrating the system error of the digital image sensor based on the prior noise model includes the following steps:
s1: based on a calculation formula of a raw response value of the digital image sensor and prior knowledge generated by related noises, expected values and variances of different types of noises including response nonuniformity of sensor pixels, thermal noise, shot noise, fixed pattern noise, readout noise and quantization error are estimated, and a total noise composition model D (i, j) of the sensor at the position (i, j) pixels is established.
In this embodiment, the specific execution process of step S1 is described in detail as follows: :
the digital image sensor raw response value D is represented as:
wherein F (-) represents the non-linear modulation of the circuit, F is the aperture value of the camera system, g is the sensor integrated gain, T is the sensor exposure time,a is a photosensitive sensitivity factor, A is a pixel effective area, U is a brightness modulation factor related to a pixel position, L (lambda) is spectral radiation brightness of the surface of a target object, t (lambda) is an overall transmittance function of a camera system, q (lambda) is a photoelectric efficiency function, and DoffsetRound (-) is a digital circuit rounding operation for the sensor bias response; λ represents the wavelength of light;
then, based on the calculation formula of the original response value of the digital image sensor and the prior knowledge, a mathematical model of the total noise of the original response value of the digital image sensor is established, and the mathematical model is in the form of:
D(i,j)=g0[K(i,j)U(i,j)I0+NTh(i,j)+Ns(i,j)+NFP(i,j)+NR(i,j)]+Doffset(i,j)+NQ(i,j)
wherein D (i, j) is the readout response value of the pixel at the position of the sensor (i, j); similarly, the parameter symbols with suffixes (i, j) each represent the parameter value for the pixel at the location of sensor (i, j);
k (i, j) is the non-uniformity of the pixel response of the sensor due to manufacturing errors:
the terms with subscript 0 each represent a physical quantity corresponding to a pixel free from manufacturing errors;
I0is the number of photoelectrons theoretically stored for a standard pixel;
u (i, j) is a sensor surface illumination modulation factor and represents the vignetting characteristic of a camera system;
NTh(i, j) is the thermal noise generated by the thermal effect of the photodiode, the intensity of which depends on the exposure time T and the ambient temperature of the device, there
E(NTh)=var(NTh)=μTh
Wherein muThE (-) and var (-) represent the computational mathematical expectation and variance, respectively, for the quantities related to the exposure time and the ambient temperature;
Ns(i, j) is shot noise, obeys Poisson distribution, has
E(Ns)=0,var(Ns)=KUI0+NTh
NFP(i, j) is fixed pattern noise, which is systematic error existing in analog circuits corresponding to pixels caused by inconsistency of the COMS image sensor in the circuit manufacturing process;
NR(i, j) reading noise, wherein the noise is introduced by a signal amplification unit at the rear end of the image sensor in the process of amplifying and outputting an analog circuit voltage signal, the expected value of the noise is 0, and the variance is in linear positive correlation with an amplification gain coefficient;
NQ(i, j) is a quantization error, which is a system error introduced by converting a continuous signal into a discrete signal, and the quantization error is subject to [ -0.5, 0.5 [ -0.5 [ ]]Average distribution of inner:comprises the following steps:
in practical image processing applications, it is often possible to obtain pixel raw response values that are not affected by random noise through spatial domain or temporal domain filtering. Therefore, the invention is mainly aimed at the systematic errors with non-zero expected value or mean value, i.e. the non-uniformity of pixel response K, the fixed pattern noise NFPAnd a response value offset DoffsetAnd calibrating and correcting. Only parameter estimation methods are given for thermal noise, shot noise, readout noise and quantization error.
S2: the sensor raw response value with noise is decomposed into a raw response value mu (i, j) with noise with an expected value not 0 and noise N (i, j) with an expected value 0, and the N is shot1Obtaining mathematical expectation of mu (i, j) by taking time domain mean of imageTaking the variance to obtain the variance of N (i, j)
In this embodiment, the specific execution process of step S2 is described in detail as follows: :
first, a mathematically expected consistency estimate of the raw response value D is obtainedConsistent estimation of sum noise varianceAccording to the statistical characteristics of random noise, the original response value is constructed into a model decomposition, which comprises the following steps:
D(i,j)=μ(i,j)+N(i,j)
where μ (i, j) represents the mathematical expectation of the original response value, and N (i, j) is the sum of the random noise:
the expected value of N (i, j) is 0;
using fixed exposure parameters, taking n shots of the same scene1Images, the response value of these images is
Because E [ N (i, j)]When n is 01When large enough, a consistency estimate of μ (i, j) is obtained as
Exploiting sample variance in the time domainAs var [ N (i, j)]Approximation of, calculatingIs estimated to be consistent with
S3: in a spatial window w centered on the pixel at position (i, j)1The influence of space position correlated noise is approximately removed by taking the space mean value of the original response value internally to obtainSensor in window w1Inner primitive response valueAnd variance of noiseThe slope of the first order function of (1) is the integrated gain coefficient g of the sensor0Changing exposure parameters to shoot n2G is obtained by calculating images of different exposures0Is estimated.
In this embodiment, the specific execution process of step S3 is described in detail as follows: :
taking a side length w around the pixel (i, j)1Such that U (i, j) can be regarded as a constantAnd K (i, j), NTh(i, j) and DoffsetThe spatial means of (i, j) can also be regarded as constants, 1, μTh、μoffsetIn which μoffsetA theoretical value representing the offset of the response value; substituting into camera response values and noise formulas
All with superscript w1And the symbol of the parameter marked with "-" indicates that w is taken for the parameter1A window is sized and a local mean value is calculated; for subsequent w2、w3The same is true.
a variance that is a sum of noise independent of the camera response value;
shot by varying light source brightness to obtain n2A different original response value, and obtaining n2Group ofCoordinates, i.e. obtainingAndslope g of the functional relationship between0(i,j),g0(i, j) the maximum likelihood estimate is:
whereinRepresenting pairs on the q-th imageTake a window of size w1 and calculate a local mean,representing pairs on the q-th imageGet w1A window is sized and a local mean value is calculated; by taking g0(i, j) to obtain a corresponding global overall gain coefficient g0。
S4: shoot n in dark3Taking the time domain average value of the images to obtain the dark current response mudark(i, j) estimation.
In this embodiment, the specific execution process of step S4 is described in detail as follows: :
when taken in dark conditions, there is I00, the original response value D in dark conditiondark(i, j) is:
Ddark(i,j)=μdark(i,j)+Ndark(i,j)
μdark(i, j) the expectation of a digital response value in the absence of a light response by the corresponding sensor, referred to as dark current; n is a radical ofdark(i, j) total noise corresponding to no light response by the sensor;
E[Ndark(i,j)]shoot n in dark environment ═ 03Taking the time domain average value of the images to obtain mudark(i, j) estimation:
Ddark,pand (i, j) is the original response value of the pixel at the position of the p image (i, j) shot in the dark condition.
S5: in a spatial window w centered on the pixel at position (i, j)2The space mean value approximation of the internal original response value is carried out, so that the expectation of the space response nonuniformity K (i, j) is satisfiedAt this time, the ratio of the pixel (i, j) to the spatial mean is the spatial response nonuniformity K (i, j), and n is photographed by changing the illumination brightness4An image, an estimate of K (i, j) is obtained by linear regression; then shooting n under the same exposure condition5And (5) obtaining an estimation of an ideal value e (i, j) of the original response value after removing noise.
In this embodiment, the specific execution process of step S5 is described in detail as follows: :
the pixel response non-uniformity K (i, j) is first estimated:
let e (I, j) be K (I, j) U (I, j) I0Centered at (i, j), at w2Calculating the spatial mean value of e (i, j) within the range of side length to make U (i, j) be regarded as constant Then there are:
and is
Obtaining n by varying the brightness of the light source4Of group (a)After the sample point, the value of K (i, j) is obtained by linear regression, and the estimated value of K (i, j) is:
for calculating e (i, j), there are
D(i,j)=g0[e(i,j)+NFP(i,j)+μTh]+Doffset(i,j)+N(i,j)
By taking n under the same exposure conditions5The image is composed of E [ N (i, j)]When the ratio is 0, the following:
get an estimate of e (i, j):
s6: correcting the error signals simultaneously to obtain a response value D after removing the system errorncThe expression of (1); spatial window w where image color is uniform3And (4) carrying out internal averaging to remove random noise of the pixels.
In this embodiment, the specific execution process of step S6 is described in detail as follows: :
the correction formulas are combined, and the response value D after the system error is removedncExpressed as:
wherein
∈(i,j)=g0[NTh(i,j)+NS(i,j)+NR(i,j)-μTh]+NQ(i,j)。
In addition, for the part with uniform and single color in the image, the side length can also be calculated as w3The method of the window mean value removes random noise, obtains the mathematical expectation value of each point:
in this embodiment, a Nikon D3x digital camera is used to capture images and analyze and correct their systematic errors and noise. Wherein, w1=15,w2=15,w3And the size of the color block is flexibly selected according to the size of the uniform color block. n is1=n3=n5=16,n2=n48. Some specific results of this example are shown below:
according to the following formula:
obtaining n by fixing ISO value and changing light source brightness calculation2Group ofAndthe comprehensive gain coefficient g of the sensor under the current ISO value can be obtained0. Fig. 1 shows three-channel integrated gain coefficients for Nikon D3x camera sensors at different ISO values.
According to the following formula:
shoot n in dark3An image, the dark current noise mu of the sensor can be obtained by calculationdark. Fig. 2 shows G-channel dark current noise of a Nikon D3x camera sensor under the conditions of T1/8 s and ISO 100.
According to the following formula:
and
photographing n by varying light source brightness4Images, and capturing n under the same capturing conditions5The distribution of the pixel response non-uniformities K (i, j) of the sensor can be calculated. FIG. 3 shows the pixel response non-uniformity distribution for the Nikon D3x camera sensor G channel
According to the following formula:
wherein
∈(i,j)=g0[NTh(i,j)+NS(i,j)+NR(i,j)-μTh]+NQ(i,j)
The system errors of a single RAW image shot by the camera can be corrected after various system error parameters of the sensor are obtained. Fig. 4 shows a RAW image taken by a Nikon D3x camera with systematic error correction, and marks the original response value variation before and after correction.
Therefore, the response value construction model and the noise and system error correction model established by the invention can establish a system error and noise model contained in the original response value, and calibrate the distribution and intensity level of some system errors and noises through the calculation of the RAW image shot under specific conditions. The calibration values can be substituted into the response values established by the invention to form a model, and systematic error correction is carried out on a single RAW file shot by the image sensor.
Claims (10)
1. A digital image sensor system error calibration method based on a prior noise model is characterized by comprising the following steps:
s1: estimating sensor noise based on a calculation formula of an original response value of the digital image sensor and prior knowledge generated by related noise, wherein the expected values and variances of different types of noise including sensor pixel response nonuniformity, thermal noise, shot noise, fixed pattern noise, readout noise and quantization error are estimated, and establishing a total noise composition model D (i, j) of a pixel at a position (i, j) of the sensor;
s2: the sensor raw response value with noise is decomposed into a raw response value mu (i, j) with noise with an expected value not 0 and noise N (i, j) with an expected value 0, and the N is shot1Obtaining mathematical expectation of mu (i, j) by taking time domain mean of imageTaking the variance to obtain the variance of N (i, j)
S3: in a spatial window w centered on the pixel at position (i, j)1The influence of space position related noise is approximately removed by taking the space mean value of the original response value internally, and the window w of the sensor is obtained1Inner primitive response valueAnd variance of noiseThe slope of the first order function of (1) is the integrated gain coefficient g of the sensor0Changing exposure parameters to shoot n2G is obtained by calculating images of different exposures0(ii) an estimate of (d);
s4: shoot n in dark3Taking the time domain average value of the images to obtain the dark current response mudark(ii) an estimate of (i, j);
s5: in a spatial window w centered on the pixel at position (i, j)2The space mean value approximation of the internal original response value is carried out, so that the expectation of the space response nonuniformity K (i, j) is satisfiedAt this time, the ratio of the pixel (i, j) to the spatial mean is the spatial response nonuniformity K (i, j), and n is photographed by changing the illumination brightness4An image, an estimate of K (i, j) is obtained by linear regression; then shooting n under the same exposure condition5Obtaining the estimation of an ideal value e (i, j) of an original response value after removing noise;
s6: correcting the error signals simultaneously to obtain a response value D after removing the system errorncThe expression of (1); spatial window w where image color is uniform3And (4) carrying out internal averaging to remove random noise of the pixels.
2. The a priori noise model-based digital image sensor system error calibration method of claim 1, wherein the step S1 is specifically performed by:
the digital image sensor raw response value D is represented as:
wherein F (-) represents the non-linear modulation of the circuit, F is the aperture value of the camera system, g is the sensor integrated gain, T is the sensor exposure time,a is a photosensitive sensitivity factor, A is a pixel effective area, U is a brightness modulation factor related to a pixel position, L (lambda) is spectral radiation brightness of the surface of a target object, t (lambda) is an overall transmittance function of a camera system, q (lambda) is a photoelectric efficiency function, and DoffsetRound (-) is a digital circuit rounding operation for the sensor bias response; λ represents the wavelength of light;
then, based on the calculation formula of the original response value of the digital image sensor and the prior knowledge, a mathematical model of the total noise of the original response value of the digital image sensor is established, and the mathematical model is in the form of:
D(i,j)=g0[K(i,j)U(i,j)I0+NTh(i,j)+Ns(i,j)+NFP(i,j)+NR(i,j)]+Doffset(i,j)+NQ(i,j)
wherein D (i, j) is the readout response value of the pixel at the position of the sensor (i, j); similarly, the parameter symbols with suffixes (i, j) each represent the parameter value for the pixel at the location of sensor (i, j);
k (i, j) is the non-uniformity of the pixel response of the sensor due to manufacturing errors:
the terms with subscript 0 each represent a physical quantity corresponding to a pixel free from manufacturing errors;
I0number of photoelectrons theoretically stored for standard pixel;
U (i, j) is a sensor surface illumination modulation factor and represents the vignetting characteristic of a camera system;
NTh(i, j) is the thermal noise generated by the thermal effect of the photodiode, the intensity of which depends on the exposure time T and the ambient temperature of the device, there
E(NTh)=var(NTh)=μTh
Wherein muThE (-) and var (-) represent the computational mathematical expectation and variance, respectively, for the quantities related to the exposure time and the ambient temperature;
Ns(i, j) is shot noise, obeys Poisson distribution, has
E(Ns)=0,var(Ns)=KUI0+NTh
NFP(i, j) is fixed pattern noise, which is systematic error existing in analog circuits corresponding to pixels caused by inconsistency of the COMS image sensor in the circuit manufacturing process;
NR(i, j) reading noise, wherein the noise is introduced by a signal amplification unit at the rear end of the image sensor in the process of amplifying and outputting an analog circuit voltage signal, the expected value of the noise is 0, and the variance is in linear positive correlation with an amplification gain coefficient;
NQ(i, j) is a quantization error, which is a system error introduced by converting a continuous signal into a discrete signal, and the quantization error is subject to [ -0.5, 0.5 [ -0.5 [ ]]Average distribution of inner:comprises the following steps:
3. the a priori noise model-based digital image sensor system error calibration method of claim 1, wherein the step S2 is specifically performed by:
first, the mathematical expectation of the original response value D is obtainedSexual estimationConsistent estimation of sum noise varianceAccording to the statistical characteristics of random noise, the original response value is constructed into a model decomposition, which comprises the following steps:
D(i,j)=μ(i,j)+N(i,j)
where μ (i, j) represents the mathematical expectation of the original response value, and N (i, j) is the sum of the random noise:
the expected value of N (i, j) is 0;
using fixed exposure parameters, taking n shots of the same scene1Images, the response value of these images is
Obtain a consistency estimate of μ (i, j) of
Exploiting sample variance in the time domainAs var [ N (i, j)]Approximation of, calculatingIs estimated to be consistent with
4. The a priori noise model-based digital image sensor system error calibration method of claim 1, wherein the step S3 is specifically performed by:
taking a side length w around the pixel (i, j)1Such that U (i, j) can be regarded as a constantAnd K (i, j), NTh(i, j) and DoffsetThe spatial means of (i, j) can also be regarded as constants, 1, μTh、μoffsetIn which μoffsetA theoretical value representing the offset of the response value; substituting into camera response values and noise formulas
With superscript wrAnd the symbol of the parameter marked with "-" indicates that w is taken for the parameterrA window is sized and a local mean value is calculated; r is 1, 2, 3;
andthe interval satisfies:
a variance that is a sum of noise independent of the camera response value;
shot by varying light source brightness to obtain n2A different original response value, and obtaining n2Group ofCoordinates, i.e. obtainingAndslope g of the functional relationship between0(i,j),g0(i, j) the maximum likelihood estimate is:
5. The a priori noise model-based digital image sensor system error calibration method of claim 1, wherein the step S4 is specifically performed by:
when taken in dark conditions, there is I00, the original response value D in dark conditiondark(i, j) is:
Ddark(i,j)=μdark(i,j)+Ndark(i,j)
μdark(i, j) the expectation of a digital response value in the absence of a light response by the corresponding sensor, referred to as dark current; n is a radical ofdark(i, j) total noise corresponding to no light response by the sensor;
E[Ndark(i,j)]shoot n in dark environment ═ 03Taking the time domain average value of the images to obtain mudark(i, j) estimation:
Ddark,pand (i, j) is the original response value of the pixel at the position of the p image (i, j) shot in the dark condition.
6. The a priori noise model-based digital image sensor system error calibration method of claim 1, wherein the step S5 is specifically performed by:
the pixel response non-uniformity K (i, j) is first estimated:
let e (I, j) be K (I, j) U (I, j) I0Centered at (i, j), at w2Calculating the spatial mean value of e (i, j) within the range of side length to make U (i, j) be regarded as constantThen there are:
and is
Obtaining n by varying the brightness of the light source4Of group (a)After the sample point, the value of K (i, j) is obtained by linear regression, and the estimated value of K (i, j) is:
for calculating e (i, j), there are
D(i,j)=g0[e(i,j)+NFP(i,j)+μTh]+Doffset(i,j)+N(i,j)
By taking n under the same exposure conditions5The image is composed of E [ N (i, j)]When the ratio is 0, the following:
get an estimate of e (i, j):
7. the a priori noise model-based digital image sensor system error calibration method of claim 1, wherein the step S6 is specifically performed by:
the correction formulas are combined, and the response value D after the system error is removedncExpressed as:
wherein
∈(i,j)=g0[NTh(i,j)+NS(i,j)+NR(i,j)-μTh]+NQ(i,j)。
8. The method for calibrating systematic errors of digital image sensors based on a priori noise model of claim 7, wherein in step S6, the side length is w by calculating the color of a uniform and single portion of the image3The method of the window mean value removes random noise, obtains the mathematical expectation value of each point:
9. the a priori noise model based digital image sensor system error calibration method of claim 1, wherein the number of images, n, taken in each step1、n3And n5Is in the range of 10 to 40, n2And n4The value range is 6 to 10;
10. the method of claim 1, wherein the step of taking the window side length, w, of the spatial mean value is performed in each step1And w2Has a value in the range of 10 to 100, w3And selecting according to the size of the uniform color blocks in the image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910934798.XA CN110807812B (en) | 2019-09-29 | 2019-09-29 | Digital image sensor system error calibration method based on prior noise model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910934798.XA CN110807812B (en) | 2019-09-29 | 2019-09-29 | Digital image sensor system error calibration method based on prior noise model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110807812A true CN110807812A (en) | 2020-02-18 |
CN110807812B CN110807812B (en) | 2022-04-05 |
Family
ID=69487953
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910934798.XA Active CN110807812B (en) | 2019-09-29 | 2019-09-29 | Digital image sensor system error calibration method based on prior noise model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110807812B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1237357A2 (en) * | 2001-03-02 | 2002-09-04 | LENZ, Reimar | Digital camera with improved dynamic using CMOS image sensor and method for driving the CMOS image sensor |
US20040051797A1 (en) * | 2002-09-13 | 2004-03-18 | Kelly Sean C. | Fixed pattern noise removal in CMOS imagers across various operational conditions |
CN101532948A (en) * | 2009-04-24 | 2009-09-16 | 西安电子科技大学 | Calibration method for CCD camera imaging application |
CN102436646A (en) * | 2011-11-07 | 2012-05-02 | 天津大学 | Compressed sensing based CCD (Charge Coupled Device) noise estimation method |
CN102508147A (en) * | 2011-10-26 | 2012-06-20 | 西安电子科技大学 | Method for measuring related parameters of sensitivity, linearity and dark noise of charge coupled device (CCD) chip |
CN104849220A (en) * | 2015-06-09 | 2015-08-19 | 武汉大学 | Plane culture relic spectral image acquiring method |
CN106896069A (en) * | 2017-04-06 | 2017-06-27 | 武汉大学 | A kind of spectrum reconstruction method based on color digital camera single width RGB image |
CN107197225A (en) * | 2017-06-13 | 2017-09-22 | 浙江大学 | Color digital camera white balance correcting based on chromatic adaptation model |
CN110246105A (en) * | 2019-06-15 | 2019-09-17 | 南京大学 | A kind of video denoising method based on actual camera noise modeling |
-
2019
- 2019-09-29 CN CN201910934798.XA patent/CN110807812B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1237357A2 (en) * | 2001-03-02 | 2002-09-04 | LENZ, Reimar | Digital camera with improved dynamic using CMOS image sensor and method for driving the CMOS image sensor |
US20040051797A1 (en) * | 2002-09-13 | 2004-03-18 | Kelly Sean C. | Fixed pattern noise removal in CMOS imagers across various operational conditions |
CN101532948A (en) * | 2009-04-24 | 2009-09-16 | 西安电子科技大学 | Calibration method for CCD camera imaging application |
CN102508147A (en) * | 2011-10-26 | 2012-06-20 | 西安电子科技大学 | Method for measuring related parameters of sensitivity, linearity and dark noise of charge coupled device (CCD) chip |
CN102436646A (en) * | 2011-11-07 | 2012-05-02 | 天津大学 | Compressed sensing based CCD (Charge Coupled Device) noise estimation method |
CN104849220A (en) * | 2015-06-09 | 2015-08-19 | 武汉大学 | Plane culture relic spectral image acquiring method |
CN106896069A (en) * | 2017-04-06 | 2017-06-27 | 武汉大学 | A kind of spectrum reconstruction method based on color digital camera single width RGB image |
CN107197225A (en) * | 2017-06-13 | 2017-09-22 | 浙江大学 | Color digital camera white balance correcting based on chromatic adaptation model |
CN110246105A (en) * | 2019-06-15 | 2019-09-17 | 南京大学 | A kind of video denoising method based on actual camera noise modeling |
Non-Patent Citations (2)
Title |
---|
原玉磊等: "Alta U9000相机噪声的测试与分析", 《测绘科学》 * |
李静等: "一种高精度CCD测试系统的非均匀性校正方法", 《北京理工大学学报》 * |
Also Published As
Publication number | Publication date |
---|---|
CN110807812B (en) | 2022-04-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7092017B2 (en) | Fixed pattern noise removal in CMOS imagers across various operational conditions | |
Costantini et al. | Virtual sensor design | |
Granados et al. | Optimal HDR reconstruction with linear digital cameras | |
US8319843B2 (en) | Image processing apparatus and method for blur correction | |
Reibel et al. | CCD or CMOS camera noise characterisation | |
US7443431B2 (en) | Fixed pattern noise removal in CMOS imagers across various operational conditions | |
Irie et al. | A technique for evaluation of CCD video-camera noise | |
Irie et al. | A model for measurement of noise in CCD digital-video cameras | |
US20110108717A1 (en) | Infrared Sensor Control Architecture | |
US5661521A (en) | Smear correction of CCD imager using active pixels | |
US20050093991A1 (en) | Black level correction circuit and black level correction method for video camera using solid state image pickup device | |
US20020179813A1 (en) | Contrast focus figure-of-merit method that is insensitive to scene illumination level | |
CN110807812B (en) | Digital image sensor system error calibration method based on prior noise model | |
US9143709B1 (en) | Non-uniformity correction (NUC) gain damping | |
Sur et al. | Measuring the noise of digital imaging sensors by stacking raw images affected by vibrations and illumination flickering | |
KR100934730B1 (en) | Adaptive noise reduction device and image sensor using the device | |
US10937230B2 (en) | Image processing | |
Schöberl et al. | Fixed pattern noise column drift compensation (CDC) for digital moving picture cameras | |
Lim et al. | Gain fixed-pattern-noise correction via optical flow | |
Abdelhamed | Noise Modelling for Smartphone Cameras | |
US11632506B2 (en) | Non-uniformity correction (NUC) self-calibration using images obtained using multiple respective global gain settings | |
Godoy et al. | Nonuniformity correction algorithm based on a noise-cancellation system for infrared focal plane arrays | |
Krüger et al. | The impact of cooling on CCD-based camera systems in the field of image luminance measuring devices | |
CN113643388B (en) | Black frame calibration and correction method and system for hyperspectral image | |
Aguerrebere et al. | Best algorithms for HDR image generation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |