Display stretch histogram vs Simple background offset

A place to report problems and bugs in SharpCap
Forum rules


If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs

Please also read about Troubleshooting USB Issues before posting.

*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***

Please include the following details in any bug report:

* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
Post Reply
lowenthalm
Posts: 143
Joined: Mon May 07, 2018 12:27 am

Display stretch histogram vs Simple background offset

#1

Post by lowenthalm »

I am using the latest Sharpcap, version 4.0.9246.0, but am pretty sure I have noticed this behavior before.

Hitting the display histogram stretch does not work reliably when in live stacking mode. Sorry for the long description, I'm trying to be precise about the conditions that produce the bug as possible. The dark subtraction issue described below is a problem generally, but might be a red herring in terms of the display histrogram issue...

Imaging conditions under which issue occurred:
Background Subtraction (Simple Offset) was turned on. I was using a Duoband (Ha/OIII/Hb) narrowband filter and using short exposures (usually less than 6s). After dark subtraction, 0 or negative pixel values can be produced because the sky background is so dark when using these filters. Zero or negative pixel values can also occur under a very dark sky with wide band filters and short exposures, but will not occur under light polluted conditions. I began experimenting with simple offset background subtraction to eliminate this issue. I do not know if negative pixel values in the image are required to reproduce Display histogram stretch problem described below.

Description of the problem:
When live stacking, I switched to viewing "individual images" to monitor image drift visually. When I clicked on the Display Histogram Stretch button (the little lighting bolt button), the live individual image was stretched as expected, but then when the next image came in the entire view turned white. I could see the white curve peak point bouncing left and right in the Display Histogram after each new image came in from the camera. Clicking the lighting bolt button again fixed it for one image, and then the all white image reappeared. To fix this, I closed live stacking, then clicked the Display Histogram Stretch button, then opened live stacking again and resumed live stacking. The individual images displayed correctly stretched and stable from one image to the next and the image display histogram curve peak no longer jumped back and forth.

You can see the same white image effect when not live stacking if you hit the display histogram stretch button and then turn on Background Subtraction. Clicking the display histogram stretch button again will correctly stretch for the new black point. It only seems to not be stable when in live stacking. I did set the Background Subtraction (Simple Offset) mode before I started live stacking (or at least before I reset the live stack to begin a stacking run).

Note that it is very difficult to use the live stack histogram when an image has a lot of negative values. Using background offset makes adjusting the histogram much easier, as it brings all the image pixels up into the live stack histogram.

As a side note about dark subtraction and negative pixel values:
I am really not sure how else to cope wiyh negative image pixel values after dark subtraction. Changing the offset ("brightness" of my ZWO ASI294 MC Pro Cooled cameras) requires changing the offset to the same value when capturing lights, darks and flats in order for flat correction to function properly. This just floats all the boats to a new "sea level". So, in the end, you just end up with negative values again after dark subtraction for short exposures!

I suspect negative values might be interfering with flat correction completely removing the very darkest of dust mote shadows in images with very dark sky backgrounds. It also seems that imaging at bin 2x2 made this problem worse when I was capturing images at a dark sky site recently, while bin 1x1 was less affected.
User avatar
admin
Site Admin
Posts: 13177
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Display stretch histogram vs Simple background offset

#2

Post by admin »

Hi,

thanks for the report - I think this is probably one of those things that I am going to have to try to make happen myself to understand what is going on (since I am unable to be sure if negative pixel values are anything to do with it based on the above info). If you happen to have the raw frames (and dark/flat) that you were capturing saved and could share them with me then I would most likely be able to replay the situation in the folder monitor camera and understand the issue that way. A handful of light frames along with the dark/flat would probably be sufficient. Since they would be too large to upload here, it would be best to share them via dropbox, google drive or onedrive and post a sharing link here.

The white (or black) image when you turn on/off background subtraction or other controls that alter the background level of the image after stretching is expected behaviour. The auto stretch sets the stretch parameters for the current image. If you then increase the background so that all pixel values go up 10% then it's quite likely that you will get a mostly white/all white image. The same can happen when live stacking - if you are watching the stack and some thin cloud comes in, new frames will have a brighter background, which will slowly brighten the background of the stack as more and more of these brighter frames are added. Over time you will need to adjust the stretch to accomodate this, but I don't expect it to go from OK one frame to white the next.

Similarly, you may find a different display stretch is needed when switching raw frames <-> stack in some cases, but once you are on the raw frames it shouldn't need changing every frame... Odd.

cheers,

Robin
lowenthalm
Posts: 143
Joined: Mon May 07, 2018 12:27 am

Re: Display stretch histogram vs Simple background offset

#3

Post by lowenthalm »

Yeah, the white image wasn't a surprise, but the frame to frame issue when viewing individual frames while live stacking really confused me. No clouds were anywhere to be seen, and I don't think there was a camera hardware issue since I was able to circumvent the problem as I described.

It seemed easy to reproduce for me, so I will capture some image data as you describe that triggers it next clear night (tomorrow?). I'll also throw in the dark and flat I am using and put all on dropbox. Hopefully that will help you reproduce the problem. I'll see if I can save the settings to a file and provide that too.
Post Reply