PDA

View Full Version here: : Stretching in 32bit


Capella_Ben
24-06-2018, 01:56 PM
Hi,

I've always had trouble with getting good luminance in my backyard in Brisbane (not surprisingly). Have been experimenting with various ways to stretch an image and retain enough detail.


I don't have Start Tools or PixInsight so have previously been doing this in Photoshop. It does not handle 32bit image at all well so looked around for alternatives. GIMP does handle 32bit quite well so have been using that as well.

Attached are before and after images using a technique of many iterations of:
1. Adjusting Gamma (via levels) to darken a little
2. Stretching using Curves a little

Image is a stack of 300 second and 0 gain from an ASI1600mm-Pro on a 200mm F5 Newt.

If you ignore the artifacts caused by dust and insufficient flat fames, I think it is OK.

Your thoughts?

Placidus
24-06-2018, 02:59 PM
It is much, much, much easier than that. You certainly don't need an iterative, fiddly approach. Ignoring the jargon of any particular program, you just need to:

(1) Subtract the brightness of the black background. This is the same as setting the zero point or the black point. The way I do it is to look (with extreme accuracy) at the histogram, and find the darkest value that has a relative frequency above zero. That is exactly the same as subtracting the brightness that causes the "foothill" of the histogram to touch the y-axis.

The point of this step is that it removes any "astronomically meaningless" brightness from the image, without the loss of any meaningful data.

(2) Use an arcsinh curve to make the image as a whole look about the right brightness.

The point of this step is it makes the midtones brighter without burning out the highlights.

Best,
Mike

Capella_Ben
24-06-2018, 03:38 PM
Hi Mike,

I'd love to give it a go, but I can't download using that link (folder not found). How else can I get a copy to try?

I have tried similar methods in the past. Was trying to experiment with a different method that didn't involve setting the black point and hence any black clipping.

Also agree a dark site is best. Bit hard to get away (and a bit too cold for camping!)

Capella_Ben
24-06-2018, 04:12 PM
Not sure I know what you mean by "Relative frequency above 0".


Is this right (see attached)?

Note: logarithmic y axis on histogram.

Nikolas
24-06-2018, 06:53 PM
I found this guy's video invaluable 8 minutes in for stretching
https://www.youtube.com/watch?v=jqZREcJ54tY&t=8s

Placidus
24-06-2018, 08:12 PM
Hi, Ben,

Just back from 3 weeks of European castles and cathedrals, and hopelessly jet lagged and struggling to think straight.

In the attached, the top panel shows the very bottom end of the histogram for my M83 after stacking. (The horizontal scale is 0-4096 out of 65535, so we're looking at the blackest of blacks out here at the farm).

The point labelled with a yellow arrow is what I call the foothill of the histogram. The histogram shows that there are no pixels (or hardly any, say less than 0.1 percent) that are darker than this.

The bottom frame is after correctly setting the black point accordingly. The foothill is now almost (but not quite) hard against the y-axis. Thus we know that we have not clipped the data, but there is no milky haze either.

Your histogram looks very different. It seems to have two quite separate contributions to the dark background. It can happen if you are doing a mosaic for example, where some frames were done under moonlight. In the case of a mosaic, you fix it by normalizing the panels to each other, effectively choosing a different black point for each panel. But in your case, you are not doing a mosaic, so it is hard to see how it happened and hard to see how you could fix it. One wonders about some faint extraneous light source which is only illuminating part of the image, but with a rather hard edge. Vignetting could do it, but I don't see any evidence of that in your image.

The above comments apply no matter what package you use. The histogram indicates a problem with the underlying data at the time they were taken.

You'll have to experiment where to put the black point to produce the best results. If it was vignetting, I'd start with placing it where you indicated. I had a go using your 8 bit JPEG and it looked very promising. Should work much better on the real data.

Very best,
Mike