Hi all,
Today I have released version 1.36 of the BatchPreprocessing script with support for the Bayer drizzle algorithm. New versions of the Debayer, ImageCalibration, ImageIntegration and ImageRegistration modules have also been released with bug fixes and improvements to support this feature.
Bayer drizzle was devised by David Coffin, the author of dcraw. It is just a drizzle integration process, but applied to CFA (Color Filter Array) data. This applies to frames acquired with DSLR and one-shot color CCD cameras. The idea behind Bayer drizzle is pretty straightforward: with a sufficient number of dithered frames, the drizzle integration algorithm can be applied to fill the existing holes in the red, green and blue channels of multiple CFA Bayer images to form a demosaiced RGB color image directly from calibrated raw data without interpolation. Note that this process is very different from demosaicing algorithms such as VNG, AHD, etc., which interpolate CFA frames to generate RGB pixel sample values.
For detailed information on the DrizzleIntegration tool and some interesting discussions about drizzle and Bayer drizzle, see the original announcement thread. With the newly released tools and scripts, this is an outline of the procedure to perform a Bayer drizzle integration in PixInsight:
1. Use the BatchPreprocessing script to calibrate your raw data as usual. On the Lights page of BatchPreprocessing, select:
- Generate Bayer drizzle data on the Image Registration section.
- Bayer drizzle on the DeBayer section.
2. Run the BatchPreprocessing script.
3. On the script's output directory you'll find two new sub-directories with the data required to perform a Bayer drizzle process:
This directory contains the FITS files that the DrizzleIntegration tool will use to generate the final drizzled image. These files are RGB images with the CFA components split in separate channels. These images are calibrated (and optionally cosmetized) raw data; they have not been demoisaiced or registered.
This directory contains the .drz files that you'll have to use with the ImageIntegration tool to prepare the Bayer drizzle process, as described in the following steps.
4. After BatchPreprocessing, open the ImageIntegration tool and add the registered images that you have on the
directory.
5. Click the Add Drizzle Files button and select the .drz files on the
directory (see step 3)
6. Carry out your integration as usual: Optimize pixel rejection parameters to achieve the necessary rejection of spurious features with a minimal impact on the final SNR improvement.
7. After ImageIntegration, open the DrizzleIntegration tool. Select the same .drz files on the
directory. Unless you have a really huge amount of data available, set scale = 1 and drop shrink = 1.0. Execute globally and carefully inspect the result.
Keep in mind that you really need many and dithered images to apply Bayer drizzle. Say a minimum of 20 - 30 images, the more the better of course. This is because CFA images lack data as a result of the Bayer pattern: a 75% of the data is missing on the red and blue channels, while a 50% of pixels are pure black on the green channel. The drizzle algorithm will attempt to fill all of these gaps by projection of many different, well dithered images. If you've got good data, the result will be a naturally demosaiced image without any interpolation.
Today I have released version 1.36 of the BatchPreprocessing script with support for the Bayer drizzle algorithm. New versions of the Debayer, ImageCalibration, ImageIntegration and ImageRegistration modules have also been released with bug fixes and improvements to support this feature.
Bayer drizzle was devised by David Coffin, the author of dcraw. It is just a drizzle integration process, but applied to CFA (Color Filter Array) data. This applies to frames acquired with DSLR and one-shot color CCD cameras. The idea behind Bayer drizzle is pretty straightforward: with a sufficient number of dithered frames, the drizzle integration algorithm can be applied to fill the existing holes in the red, green and blue channels of multiple CFA Bayer images to form a demosaiced RGB color image directly from calibrated raw data without interpolation. Note that this process is very different from demosaicing algorithms such as VNG, AHD, etc., which interpolate CFA frames to generate RGB pixel sample values.
For detailed information on the DrizzleIntegration tool and some interesting discussions about drizzle and Bayer drizzle, see the original announcement thread. With the newly released tools and scripts, this is an outline of the procedure to perform a Bayer drizzle integration in PixInsight:
1. Use the BatchPreprocessing script to calibrate your raw data as usual. On the Lights page of BatchPreprocessing, select:
- Generate Bayer drizzle data on the Image Registration section.
- Bayer drizzle on the DeBayer section.
2. Run the BatchPreprocessing script.
3. On the script's output directory you'll find two new sub-directories with the data required to perform a Bayer drizzle process:
Code:
<output-dir>/calibrated/light/bayer
This directory contains the FITS files that the DrizzleIntegration tool will use to generate the final drizzled image. These files are RGB images with the CFA components split in separate channels. These images are calibrated (and optionally cosmetized) raw data; they have not been demoisaiced or registered.
Code:
<output-dir>/registered/bayer
This directory contains the .drz files that you'll have to use with the ImageIntegration tool to prepare the Bayer drizzle process, as described in the following steps.
4. After BatchPreprocessing, open the ImageIntegration tool and add the registered images that you have on the
Code:
<output-dir>/registered
5. Click the Add Drizzle Files button and select the .drz files on the
Code:
<output-dir>/registered/bayer
6. Carry out your integration as usual: Optimize pixel rejection parameters to achieve the necessary rejection of spurious features with a minimal impact on the final SNR improvement.
7. After ImageIntegration, open the DrizzleIntegration tool. Select the same .drz files on the
Code:
<output-dir>/registered/bayer
Keep in mind that you really need many and dithered images to apply Bayer drizzle. Say a minimum of 20 - 30 images, the more the better of course. This is because CFA images lack data as a result of the Bayer pattern: a 75% of the data is missing on the red and blue channels, while a 50% of pixels are pure black on the green channel. The drizzle algorithm will attempt to fill all of these gaps by projection of many different, well dithered images. If you've got good data, the result will be a naturally demosaiced image without any interpolation.