Non-interpolation methods

General discussion about StarTools.

Non-interpolation methods

Postby northern_plights » Thu Apr 02, 2015 10:22 pm

Hey Ivo,

I've been doing some reading on the technical details of DSS while we all eagerly await the stacking module in ST (whenever that may be :D ).

I've been experimenting with dcraw to remove the white balance before stacking, using either bi-linear or AHD interpolation.
Now after some reading, I've noticed that DSS has two non-interpolation options - RGGB Super Pixels and Bayer Drizzle.

So, this leads to a two part question, in the interest of linear, virgin frames:
1) Is it better to accept a less-effective debayering using dcraw to avoid the white balance [what causes more harm - white balance or bad debayering?]
2) If the non-interpolation options are better, even though we need to use the RAW white balance, are super pixels or bayer drizzle the way to go?

I'm using a Rebel SL1 (18MP) if that makes a difference - I could afford the 1/4 image reduction [so 9MP?] if necessary.

Cheers! :obscene-drinkingcheers:

EDIT: Just had another thought. What about using the -h parameter with dcraw -r 1 1 1 1 to create non-white balanced, bayer super pixels?
Michael Dunning
Ontario, Canada

Vixen ED80SF | Canon Rebel SL1 | Sky-Watcher HEQ5 Pro | Orion 9x50 Finder | QHY5 Guider | Hotech SCA Field Flattener
User avatar
northern_plights
 
Posts: 7
Joined: Sun Feb 08, 2015 4:01 pm

Re: Non-interpolation methods

Postby admin » Sun Apr 05, 2015 5:55 am

Hi Michael,

White balancing can really introduce quite a bit of noise into your luminance data, so it's worth debayering up front.
dcraw is used by DSS internally, so there really is no difference. The only difference is that DSS debayers *after* calibration, which can yield a slightly better result.

From the Reddit post where you (I believe) asked a related question;

DSS unfortunately insists on color balancing the image, with no way of turning that off. This causes an imbalance in the noise levels within the 3 different channels; as levels are multiplied in a channel - which is what color balancing is - noise is multiplied along with it. That, and the fact that any OSC or DSLR with a Bayer matrix collects 2x more 'precise' green information than red and blue, makes your luminance data (the aggregate of R + 2xG + B) noisier than it needs to be if the data is color balanced first and only then converted into luminance. For example instead of R + 2xG + B, for a Canon 1100D you'll end up with 2.53 x R + G + 1.27 x B for luminance. Compared with the R + 2xG + B signal as recorded, noise contribution from the red channel is exacerbated 2.53 times, the noise mitigation of double sample green is halved, while noise contribution from the blue channel is exacerbated 1.27 times. That's a pretty massive difference!

The following command pre-converts CR2s to TIFFs that can be stacked.

dcraw -v -r 1 1 1 1 -4 -T -S 32767 -k 0 -o 0 *.CR2

As you point out, however, AHD is the default debayering option. To force dcraw to apply bilinear debayering (the recommended setting), use

dcraw -v -r 1 1 1 1 -4 -T -S 32767 -q 0 -k 0 -o 0 *.CR2

Unfortunately, the -q 0 option had stopped working for a number of versions of dcraw (it is working on the most stable version I could find, which is 9.17), so if you find -q 0 is not working for you, you're stuck with AHD.

Keeping the color balancing example above in mind though, you can see that noise exacerbation due to color balancing data first likely far outweighs noise exacerbation due to application of AHD.


To see what a difference AHD vs bilinear can make, have a look here; the mazing artifacts that AHD produce can really throw off a stacker.

This is what Luc Coffier wrote about it on the DSS Yahoo Groups.

Finally, image reduction is absolutely the way to go!
As long as the super pixels become 1xR, 2xG and 1xB. (note the two green samples pooled into 1)
Ivo Jager
StarTools creator and astronomy enthusiast
User avatar
admin
Site Admin
 
Posts: 2169
Joined: Thu Dec 02, 2010 10:51 pm
Location: Melbourne

Re: Non-interpolation methods

Postby northern_plights » Mon Apr 06, 2015 5:41 pm

Thanks Ivo,

Code: Select all
dcraw -v -r 1 1 1 1 -4 -T -S 32767 -q 0 -k 0 -o 0 *.CR2


seems to be working for me, so I'm just going to stick with that and use the bin module in ST if I need the image reduction.

Last question - if preprocessing the light frames with dcraw to remove the white balance, does this need to be done to the calibration frames as well? Or can we let DSS apply the white balance to those frames?

My gut says use dcraw for all the frames, but if I can go to bed and let DSS handle the work, I wouldn't be opposed :sleeping-sleep:
Michael Dunning
Ontario, Canada

Vixen ED80SF | Canon Rebel SL1 | Sky-Watcher HEQ5 Pro | Orion 9x50 Finder | QHY5 Guider | Hotech SCA Field Flattener
User avatar
northern_plights
 
Posts: 7
Joined: Sun Feb 08, 2015 4:01 pm

Re: Non-interpolation methods

Postby admin » Wed Apr 08, 2015 1:33 am

northern_plights wrote:Thanks Ivo,

Code: Select all
dcraw -v -r 1 1 1 1 -4 -T -S 32767 -q 0 -k 0 -o 0 *.CR2


seems to be working for me, so I'm just going to stick with that and use the bin module in ST if I need the image reduction.

Last question - if preprocessing the light frames with dcraw to remove the white balance, does this need to be done to the calibration frames as well? Or can we let DSS apply the white balance to those frames?

My gut says use dcraw for all the frames, but if I can go to bed and let DSS handle the work, I wouldn't be opposed :sleeping-sleep:


It's best to give the calibration frames the same treatment, to avoid any trouble. Eager to hear how you go!
Ivo Jager
StarTools creator and astronomy enthusiast
User avatar
admin
Site Admin
 
Posts: 2169
Joined: Thu Dec 02, 2010 10:51 pm
Location: Melbourne


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 6 guests