Appendix D: Internal Flat Field Calibration Algorithms
•
103
Appendix D: Internal Flat
Field Calibration Algorithms
The camera provides the user with the ability to perform a custom flat field calibration. This
appendix gives details of the calibration algorithms. All calibration is performed on averaged
image data to reduce noise.
Offset (FPN) Calibration
Offset calibration is performed when the sensor is not exposed to light. The offset values are
calculated as follows:
•
The camera averages several (see
flatfieldCalibrationSampleSize
) images.
•
The offset correction is simply the average at each pixel.
•
If the value is greater than the maximum correction (i.e. 127) then the pixel is
marked for replacement and the number of hot pixels replaced is incremented
(
flatfieldCalibrationHotPixelsReplaced
).
•
If the value is equal to 0 then the number of clipped offset pixels is incremented
(
flatfieldCalibrationOffsetPixelsClipped
).
Pixel Replacement Calibration
Like the offset calibration, pixel replacement calibration is done when the sensor is not
exposed to light. This calibration is used to find and replace pixels that turn “hot” at longer
exposure times. Therefore, the calibration should be performed after the Offset calibration
has been performed.
The Pixel replacement calibration is performed as follows:
•
The camera averages several (see
flatfieldCalibrationSampleSize
) images.
•
For each pixel
o
The offset correction value (FPN coefficient) is subtracted from the averaged
pixel value.
o
If the differece is greater than the pixel replacement offset threshold
(
flatfieldCalibrationPixelReplacementOffsetThreshold
) then the pixel is marked
for replacement and the number of hot pixels replaced is incremented
(
flatfieldCalibrationHotPixelsReplaced
).
o
In this way ‘new’ hot pixels that appear due to the longer exposure time are
targeted.
Gain (PRNU) Calibration
The flat field gain calibration is performed after the offset calibration, when the sensor is
exposed to flat light source. The gain on each pixel is adjusted to achieve a target value.
For the monochrome cameras the process is as follows:
•
The camera averages several (see
flatfieldCalibrationSampleSize
) images.
•
For each pixel of the averaged image: