Display stretch histogram vs Simple background offset
Posted: Wed Aug 17, 2022 6:54 pm
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.
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.