Display saturation stretch

Got an idea for something that SharpCap should do? Share it here.
Forum rules
'+1' posts are welcome in this area of the forums to indicate your support for a particular feature suggestion. Suggestions that get the most +1's will be seriously considered for inclusion in future versions of SharpCap.
Post Reply
Borodog
Posts: 341
Joined: Fri Jan 01, 2021 7:25 pm

Display saturation stretch

#1

Post by Borodog »

One of the drawbacks of astronomy cameras is that they tend to produce rather drab, desaturated images. Take a few photos with one (with the appropriate UV/IR filter installed) with a terrestrial lens and compare them to photos from a DSLR, mirrorless, or camera phone and you will see what I mean. Inevitably the saturation has to be increased in post.

However, this leaves the experience during capture in SharpCap lacking. Some older repurposed web cameras have a saturation control, but modern astronomy cameras typically do not. You can adjust the white balance, to a point, and you can adjust the display intensity stretch for gamma like effects, but you cannot increase the saturation during capture or simply watching Jupiter on screen for example.

I would like to request a display saturation stretch option. It is very simple to implement, although it may result in having to drop some frames during display; I'm not sure what the effect on the frame rate would be. But as long as it did not affect the frame rate being written to disk, I don't care.

What would happen is that the frame for display would be converted to HSL (probably L as luma rather than lightness if you wanted to use it for other things), and then immediately reconstituted but with the Saturation channel modified like this:

S' = S^(1/gamma)

where S is the saturation channel of the image, varying between 0 and 1, and gamma is a user select-able parameter. If gamma = 1, the saturation is unchanged. If gamma > 1, the saturation is increased. If gamma < 1, the saturation is decreased. The only control needed is a horizontal slider in the Display Stretch section that varies logarithmically from say 0.1 to 10, default on 1.

This would allow the user not only to turn up the saturation and more easily see the colors on Jupiter or the moon, but also see the color fringes due to atmospheric dispersion, or quickly desaturate the image without having to turn off the debayer preview (which leaves the Bayer matrix visible, by the way).

Theoretically you could use this for other purposes as well. For example independent color and luminance noise reduction, or even sharpening that does not increase color noise.

Thanks for your time and consideration.
User avatar
admin
Site Admin
Posts: 13350
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Display saturation stretch

#2

Post by admin »

Hi,

yes, colour noise reduction in live stacking works in a similar way (although HSL didn't work nicely as it led to brightness shifts - YCrCb turned out to work better). Saturation boosting in live stacking is done slightly differently, but the technique could be applied. There's nothing in theory stopping this sort of thing being applied pre-display (apart from performance - might not be fast enough for high speed imaging, but never mind). In practice it implies the need for colour correction sliders in the display stretch too, since lots of cameras have a noticeable colour cast and boosting the saturation without fixing the colour cast would produce poor images.

One to consider,

cheers,

Robin
Borodog
Posts: 341
Joined: Fri Jan 01, 2021 7:25 pm

Re: Display saturation stretch

#3

Post by Borodog »

I think having the simple additional software gain for either the blue or green channel that I previously requested would get you most of the way there. The main problem leading to a color cast that has to be fixed in post is the inability to balance the blue to the green because the sensors have poor sensitivity in the blue combined with preferential scattering of blue by the atmosphere. So if you can software scale the blue up to the green or the green down to the blue when the wblue hardware gain is maxed out (at least on ZWO cameras), you can pretty easily eliminate obvious color casts. For example my cheap SVBONY SV305 has color balance controls for R, G, and B, and it's very easy to get a neutral Moon even low in the sky. It's impossible with my ZWO cameras until you get it into post.

Note that there are complications for DSO vs. the Moon and planets; typically you are stretching hard for DSO and you can see the background. In that case you probably want to equalize the left side of the histogram to neutralize the background. But I think you can already do all of this for DSO in the live stacking interface. I'm mainly after being able to turn up the saturation for the Moon and planets during viewing and capture, where the background is usually so dark that you don't really care that it might technically have an excess of blue vs. green and green vs. red. If you stretch the Moon hard (say using the standard gamma = 2.2) you can start to see the sky, but you can't let the perfect be the enemy of the good.
Post Reply