New Background tab in Live Stacking

Discussions of Electronically Assisted Astronomy using the Live Stacking feature.
Post Reply
MarMax
Posts: 130
Joined: Sun Sep 19, 2021 11:43 pm

New Background tab in Live Stacking

#1

Post by MarMax »

Robin,

Can you please explain the new Background tab in the Live Stacking menu and how it relates to the choices made with Preprocessing under Camera Controls? Thank you.

Mike
User avatar
admin
Site Admin
Posts: 15625
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: New Background tab in Live Stacking

#2

Post by admin »

Hi Mike,

sorry, I keep meaning to write a little something about that new 'Background' tab, but haven't got around to it for one reason or another...

The preprocessing controls don't try to bring the background level down to zero, just bring it to a consistent value - trying to bring it to zero with no user input is fraught with dangers (ending up going too far and black clipping the background, conditions changing and the amount of shift that worked nicely previously not being correct any more, etc). So, the preprocessing still leaves in a constant background offset in the individual frames that is usually dealt with later in processing.

However... when you are using a colour sensor and trying to colour balance a live stacked image, any background offset is a problem - if the background is say 1000 units and the nebula you are trying to image is only 100 units, applying a white balance adjustment of 1.05x to the blue channel will boost the nebula from 105 to 105, but the background it sits on from 1000 to 1050 - this can make it almost impossible to get good white balance for both the background and the nebula/galaxy at the same time with the conventional white balance controls in live stacking.

The background subtraction in live stacking aims to help fix that - it is a constant subtraction (one value per colour channel) applied to the stacked image during the processing of that image to view/save - first the background subtraction values are subtracted from the data, then the colour balance multiplications are applied, then the stretch, then sharpening, etc. This has lots of advantages:

* It's applied to the processed data not the raw frames, so if you make a mistake you just adjust again and see the right results - the actual stacked data is unaffected by your mistake

* You can set the 3 colour channels of subtraction to remove not only a background level, but also any colour cast in the background (say due to yellow light pollution)

* Once almost all the background is removed, the remaining background level is neutral coloured and very small - the normal colour balance corrections are now *much* easier to adjust to get the target colour right (for instance if your camera is very green sensitive) - no need to make very tiny colour balance adjustments any more

The process you should apply is

* Leave the background subtraction in preprocessing at your normal setting if you use one of the non-linear ones or the gradient removal - you can turn off blended or simple offset

* Turn on background subtraction in live stacking

* Adjust the offset of the 3 channels to put the adjusted histograms so that the peak is just a tiny bit separated from the left side and all three adjusted peaks align (the auto adjust button will try to do this for you)

* Now adjust the live stack stretch to match the changed position of the histogram peak due to subtraction

* Finally adjust the live stack colour balance controls to colour balance the target (possibly tweak the stretch and come round again).

Note that as the stack gets longer and the noise in the image reduces, the histogram peak will narrow, meaning you can actually move it further left in the background subtraction and still be fine in terms of not black clipping. At some point in the future I hope to automate some of the consequential adjustments (ie the histogram stretch needing to change when the background subtraction is adjusted).

Hope that helps,

Robin
MarMax
Posts: 130
Joined: Sun Sep 19, 2021 11:43 pm

Re: New Background tab in Live Stacking

#3

Post by MarMax »

Robin,

I've spent a few nights now working with the Background Subtraction (Bsub) tool and I'd like to get a bit more clarification on fine tuning. One of the things that I try to avoid is black clipping and as such try to use a Brightness/Offset appropriate to the camera and settings. For example, using the 294MC-Pro Bin2 with my C11 at f/6.3 I'm using a Brightness/Offset value of 10 for gains of 200 and 350.

In making adjustments as the stack develops to the Bsub settings as well as the Histogram color balance, it seems like I'm following your recommendations for the tool. I'll save a PNG with adjustments before moving on to another target. The next day when I start reviewing the PNG's in Photoshop I notice the image Histograms are cut off on the left.

M63_CutOffHistogram_Sm.jpg
M63_CutOffHistogram_Sm.jpg (74.09 KiB) Viewed 597 times

The cut-off histogram is something I encountered in the past with the camera control background subtraction options. One time at a dark site I had to greatly increase the Brightness/Offset and not use background subtraction to get a "normal" histogram (not cut off on the left).

Should I be increasing the Brightness/Offset setting when using the Bsub tool? I've always followed the Dale Ghent method to determine Brightness/Offset values to use with my kits.

https://daleghent.com/2020/08/understan ... era-offset

Mike
User avatar
admin
Site Admin
Posts: 15625
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: New Background tab in Live Stacking

#4

Post by admin »

Hi Mike,

if you use the auto-adjust function in live stacking background subtraction then it shouldn't lead to black clipping of the image, as it tries to leave enough space for the left hand tail of the distribution after the subtraction has occurred. If you set a higher offset on the camera then the auto-adjust in bsub will subtract more, if a smaller offset then it will subtract less. Of course, if the offset is too low then the individual frames could be black clipped before they get to live stacking and there is nothing that processing can do to rescue that, but I don't think that's what is going on here...

However, there are more things to be aware of...

* Obviously if you manually adjust the background subtraction levels then you can push them too far left and get black clipping

* If conditions improve (or the sky darkens) over the time you are stacking, the perfectly reasonable amount of background subtraction set up at the start of the stack may later be too much and be causing black clipping (adding the new, darker, frames will pull the average background levels down until they are too low relative to the bsub settings)

* If you are saving the stack as seen (presumably, since otherwise in the 16/32 bit stack saves you don't get the background subtraction included), then the stretch levels can lead to black clipping - after all, you are saving a stretched image, so if the black level is set too high when pressing the save button then there will be pixels at zero brightness.

I wonder if it is the last one that is actually catching you out here?

cheers,

Robin
MarMax
Posts: 130
Joined: Sun Sep 19, 2021 11:43 pm

Re: New Background tab in Live Stacking

#5

Post by MarMax »

If something is getting me I'd agree it's most likely the last one. Now that you have introduced the colour calibration which integrates background subtraction it should simplify my use of the tools. I've not used colour calibration yet but will give it a go next time out.

As always, thank you for the feedback and continuing to make SharpCap better.

Mike
Ehud
Posts: 52
Joined: Fri Nov 24, 2023 1:09 pm

Re: New Background tab in Live Stacking

#6

Post by Ehud »

Hi Robin,
Great feature - I am in Bortel 9, using Hyperstar, and seems that I need this!
Yesterday I tried the feature. After using Auto adjust, the selection on the Histogram went much to the right' and I needed to auto-adjust the histogram too. Eventually after few iterations the result stabilized. Is this what I need to do? And will it remain through the whole stacking period, or do I need to re-adjust after a while?
User avatar
admin
Site Admin
Posts: 15625
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: New Background tab in Live Stacking

#7

Post by admin »

Hi,

yes, if you use the background adjustment (either manually or the auto adjust) then you will need to adjust the histogram stretch to match the changes you have made. You will find that the background needed probably will drift over time (as the light pollution levels change for instance), so a re-adjust will be needed if you start noticing the background becoming either too dark or too light.

The very latest version of SharpCap now includes an even more powerful function - stellar colour calibration - that combines this auto adjust of the background with an auto adjust of the colour balance and an auto stretch, so a 'one click' way to get a decent image - see viewtopic.php?t=8796

cheers,

Robin
Post Reply