Can flat-field correction be done with two 1D gain arrays instead of a full 2D table?
Asked 10/28/2013
1 views
2 answers
0
I’m used to flat-fielding with a full 2D gain map, one correction value per pixel. A camera I’m working with claims to do built-in flat-field correction using only two 1D gain arrays: one for image width and one for image height.
My understanding is that, for a pixel at position (x, y), the camera multiplies the pixel value by a horizontal gain from the x-array and a vertical gain from the y-array. In other words, the 2D correction is treated as the product of two 1D corrections.
This seems to work in practice, but I’d like to understand the math behind when this is valid. If the image falloff is centered and caused by vignetting, under what assumptions can a 2D flat-field be represented as two 1D arrays? How would you derive those arrays mathematically?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
12y ago
2 Answers
3
You can, as user1118321 states correct vignetting using a pair of 1-D arrays provided the vignetting profile is a negative exponential (it doesn't have to be strictly Gaussian i.e. the integral doesn't have to sum to 1). The gain to be applied at coordinates [x,y] must be of the form:
e^k(x^2 + y^2)
where k < 0, e > 1 (for a Gaussian e is the exponential constant)
If this is the case then the gain at [x,y] can be found by multiplying
e^k(x^2)
by
e^k(y^2)
as finding the product of two exponentials is simply a case of adding the exponents. So if you store the value of e^k(z^2) in an array you can look-up the value twice for x and y, multiply them and you have the value for [x,y] (you don't even need 2 arrays if the vignette is circular). If it is elliptical then the two arrays will be of the same form but will have different scaling.
However a constant linear fall-off in a circular pattern cannot be corrected using this method (unless you resort to polar coordinates, then only 1 array is needed) as it relies on the properties of exponentials.
It strikes me that the use of two 1D arrays suggests this flat fielding correction is designed to account only for amplifier variations across the pixel matrix (to reduce banding / plaid patterned noise) not to correct for vignetting.
Originally by user1375. Source · Licensed CC BY-SA 4.0
user1375
12y ago
0
Generated from our catalog & community — verify before relying on it.
Yes—this works when the 2D flat-field is separable, meaning the gain map can be written as:
G(x,y) = X(x) · Y(y)
A common case is Gaussian/exponential-style falloff. If the required gain is of the form:
e^(k(x² + y²))
then it separates exactly as:
e^(kx²) · e^(ky²)
So you can store one 1D array for x and one for y, then multiply them to get the gain for any pixel. If the vignette is circularly symmetric, the same 1D function may even be reused for both axes; if it is elliptical, the x and y arrays can differ.
This is the same separability idea used with Gaussian blur filters.
Important limitation: not every flat-field or vignetting pattern is separable. A full 2D table is more general and can correct arbitrary pixel-to-pixel variation, dust shadows, sensor nonuniformity, and asymmetric lens shading. Two 1D arrays are only an approximation unless the falloff really matches a separable model.
Recommended products
UniqueBot
AI12y ago
Your Answer
Related Questions
How does luminance (Y) relate to the CIE 1931 chromaticity diagram and gamut limits?
How do I calculate focal length in pixels from horizontal and vertical field of view?
Is a camera’s active pixel count the same as its resolution?
Why are RAW files often smaller than TIFF if a camera sensor uses RGB color filters?
How can I better match color and exposure across multiple cameras for seamless real-time stitching?