Page 1 of 1

Algorithm used in Debayer Preview

Posted: Thu Nov 05, 2020 3:30 am
by unitary_gauge
Hi, I am wondering what debayering algorithm SharpCap uses in debayer previewing when using RAW8 or RAW16 formats. I am curious how it compares to typical in-camera debayering algorithms. Thanks

Re: Algorithm used in Debayer Preview

Posted: Thu Nov 05, 2020 1:15 pm
by admin
Hi,

SharpCap uses a bilinear algorithm for debayering raw images. This gives a good trade-off between reasonable quality and rapid execution. If you choose an RGB mode instead then the camera hardware/software is responsible for the choice of debayering algorithm and normally you have no idea what algorithm is in use in those circumstances, since it's rare for the manufacturers to documented.

There is a reasonable discussion of the different algorithms on Wikipedia –https://en.wikipedia.org/wiki/Demosaicing

Cheers, Robin

Re: Algorithm used in Debayer Preview

Posted: Wed Mar 10, 2021 2:48 pm
by kberry1956
How can I tell what Debayer mode Sharpcap is using when Debayer preview is on? RGGB, GBRG, GRBG, or BGGR. The Camera setting file just says "Debayer Preview = On" but not the mode.

Thanks,
Kirk

Re: Algorithm used in Debayer Preview

Posted: Wed Mar 10, 2021 4:34 pm
by admin
Hi Kirk,

the simplest way is to work through the other 4 options and the answer is the one that gives the same colour in the image as the 'On' option. Two will give you weird grids visible on the image, often with a purple colour cast, one will be correct and the other will have the red and blue channels swapped.

Robin

Re: Algorithm used in Debayer Preview

Posted: Wed Mar 10, 2021 10:01 pm
by turfpit
Kirk

Adding to Robin's post - try some daytime capture of a land based object and try including blue sky, green trees and red buildings. That way you know which is the correct pattern. A breakfast cereal packet is another good object to use.

Dave

Re: Algorithm used in Debayer Preview

Posted: Tue Mar 23, 2021 4:43 pm
by kberry1956
Thanks Gents.

I used PIP to Debayer the raw frames (FITs format) with all 4 possibilities with GBRG coming closest to what I saw in the live stack - but the processed PIP frames did not show the vibrancy of color that the live stack showed or what the sharpcap files showed (Stack_501frames_7465s.png, Stack_502frames_7480s_WithDisplayStretch.png, or Stack_16bits_500frames_7450s.fit). I then stacked the PIP processed frames with deep sky stacker and the end result looked nearly black and white. Somehow I am losing color - at least as compared to what sharpcap produced.

Thanks,
Kirk

Re: Algorithm used in Debayer Preview

Posted: Tue Mar 23, 2021 7:45 pm
by admin
Hi Kirk,

If your DSS is truly monochrome then you may have missed ticking the box to tell it to debayer the RAW FITS files to colour - see viewtopic.php?t=911

If it's just almost monochrome then that seems to be something that DSS often does - once you have done your stacking in DSS there is a 'Saturation' tab - go to that and drag the slider quite a way to the right to hopefully see your colour grow stronger.

cheers,

Robin

Re: Algorithm used in Debayer Preview

Posted: Wed Mar 24, 2021 12:04 am
by kberry1956
Thanks Robin!

The PIP frames have the color and as you mentioned I could make the color better by adjusting DSS.
I am very new to this stuff but I certainly got my best pic by just enhancing the stretched .PNG from sharpcap thru Photoshop :)

Thanks Again,
Kirk