A word about RAW/CRW/CR2 files and debayering.

Guides, tutorials, tips & tricks.
Post Reply
User avatar
admin
Site Admin
Posts: 3382
Joined: Thu Dec 02, 2010 10:51 pm
Location: Melbourne
Contact:

A word about RAW/CRW/CR2 files and debayering.

Post by admin »

The reason why some other applications allow CR2 as input, is because they stack images as well, not so much because it is a priori meant as an input format for processing.
However, if you're comfortable for now with single exposures, do stick with that for a while until you're comfortable with other parts of the image acquisition/stacking process. If you really would like to use single exposures straight from your camera, look at an application called RawTherapee to convert the to 16-bit PNGs or TIFFs that StarTools can read.

Once you're ready though, have a look at the excellent free Deep Sky Stacker application for Windows (and read up on stacking multiple light frames, dark frames, flat frames and bias frames).
If you want to get the most from your equipment, stacking multiple light frames, dark frames, flat frames and bias frames are a must. Once you prepare your data set in this manner, I will guarantee you the final results will blow you away! This procedure will output TIFF or FITS files that StarTools can then post-process.

Here is a little technical story as well;
If you are sticking with single exposure for the moment, do realize that the megapixel rating of your DSLR is a megapixel rating for mono images. A lot of people don't know this. The amount of megapixels is actually divided up and allocated to the 3 different color channels. For every 4 pixels, 1 goes to red, 2 go to green and 1 goes to blue. In order to reconstruct the color image at your DSLR's megapixel rating for each color channel a process called 'Debayering' conjures up the missing pixels by means of interpolation. I.e., for 3 out of 4 red pixels, this data isn't real, for 2 out 4 green pixels this data isn't real and for 3 out of 4 blue pixels this isn't real. What's worse the missing pixels are calculated based on neighboring pixels, so, for example, if one of those pixels for the red channel is 'corrupted' due to noise, the 3 missing pixels will also look corrupted. This means that, during the debayering process, noise will be magnified and spread over multiple pixels! You can see this when you zoom into single pixels - noise spikes are clumps, rather than single pixels.

Depending on the chosen debayering algorithm, this type of noise can cross over into different channels and make things even worse. If you do single exposures, then the solution here is to chose a simple 'blinear' algorithm and bin your image to 50% at least. However, if you have multiple exposures which you can stack it becomes a whole different ball game - with careful exposure of the sub-pixels on the Bayer matrix (a process called 'Dithering') you may even do away with Debayering altogether!
Ivo Jager
StarTools creator and astronomy enthusiast
Post Reply