Algorithm used in Debayer Preview

Anything that doesn't fit into any of the other forums
Post Reply
unitary_gauge
Posts: 2
Joined: Thu Nov 05, 2020 3:26 am

Algorithm used in Debayer Preview

#1

Post 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
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Algorithm used in Debayer Preview

#2

Post 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
kberry1956
Posts: 3
Joined: Thu Sep 24, 2020 2:34 am

Re: Algorithm used in Debayer Preview

#3

Post 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
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Algorithm used in Debayer Preview

#4

Post 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
User avatar
turfpit
Posts: 1779
Joined: Mon Feb 13, 2017 8:13 pm
Location: UK
Contact:

Re: Algorithm used in Debayer Preview

#5

Post 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
kberry1956
Posts: 3
Joined: Thu Sep 24, 2020 2:34 am

Re: Algorithm used in Debayer Preview

#6

Post 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
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Algorithm used in Debayer Preview

#7

Post 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
kberry1956
Posts: 3
Joined: Thu Sep 24, 2020 2:34 am

Re: Algorithm used in Debayer Preview

#8

Post 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
Post Reply