Proper darkfield correction for Bayer color pattern images

Darkfield and flatfield corrections for Bayer pattern color images are critical. To ensure exact results the corrections must be made before the color interpolation.

With SImg this is quite easy, since SImg supports direct processing and storing of Bayer pattern color images.

Here is an example for a darkfield and a flatfield correction. The darkfield is stored in dark.sif and the flatfield is stored flat.sif. The input image is a digital camera raw image. All three images must be Bayer color pattern images and must have the same Bayer pattern.

export SImg_cameraWB=0
simg add -f1 -1 dark.sif input.raw |
  simg mul -e1 -1 flat.sif -o output.sif

The output is a Bayer color pattern image with the same pattern as the input image. The environment variable SImg_cameraWB should be set to 0 to avoid conflicts with the automatic white balance of the camera.

examples/bayer-darkfield_correction.txt · Last modified: 2010/03/08 09:51 (external edit)
Recent changes RSS feed Creative Commons License Powered by PHP Debian Driven by DokuWiki