Page 2 of 2

Re: Any recom for HDR (6x2EV) and batch proc?

Posted: 2020-02-20T09:14:15-07:00
by Skygaze
Got it! I decided to keep playing with the notion of working in "high float" without dividing by 65536, so instead I chose the white threshold to be 15270 x 65536 -> 1000734720. I used 15270 since my previous guess at true saturation was 15284. Then snibgo's saturated count gave me:
MIN=1.30025e+08 MAX=1.03037e+09 SAT_PC=0.0157063 much more reasonable percentage of saturated. Now, as expected, the mask looks like what I would do if I was picking pixels manually!

Oooof. Thanks again for helping get through this part of the quagmire. I need to look more closely at the choice of value because I have a lot of pixels that blow out in the red before they do in G,B. As well, I need to play with the amount of blur on the mask to start accounting for bleeding. I am well on my way now! I am sure I will have more questions to follow...

Re: Any recom for HDR (6x2EV) and batch proc?

Posted: 2020-02-20T10:21:59-07:00
by snibgo
Note the divisor or multiplier should be 65537, not 65536. This comes from the Q32 QuantumRange divided by the Q16 QuantumRange: (2^32-1)/(2^16-1).

The difference is small, of course.

Re: Any recom for HDR (6x2EV) and batch proc?

Posted: 2020-02-25T22:23:38-07:00
by Skygaze
Some progress, some odd results. https://sites.google.com/site/alistarga ... t-moon-hdr. The image I posted shows that I need to blur the mask, but
magick mask_I1fh.tiff -channel A -virtual-pixel transparent -morphology Distance Euclidean:4,10! mask_I1fb.tiff
appear identical and I cannot see any difference in the final composited image. Does blurring and alpha channel work differently in floating point space?

The other, bigger problem, is that when I multiply an image, then use auto-levels (or not) and convert down to sRGB, the non-blown out part is now blown out. I start with
dcraw -v -W -w -o 5 -4 -T IMG_0102.CR2 (to XYZ) and rename to I2_XYZ.tiff
magick I2_XYZ.tiff -set colorspace XYZ -profile sRGB-elle-V4-g10.icc
-evaluate Multiply 4.0 -set gamma 1.0 -define quantum:format=floating-point -depth 32 I2_XYZ4x.tiff

Even if there was nothing blown out in I2_XYZ.tiff, I2_XYZ4x.tiff is blown out after auto-levelling back to sRGB:
magick I2_XYZ4x.tiff -profile sRGB-elle-V4-srgbtrc.icc -auto-level view_auto_I2f_4x.tiff
Am I missing a set colorspace for the return leg?

Re: Any recom for HDR (6x2EV) and batch proc?

Posted: 2020-02-26T03:32:04-07:00
by snibgo
Skygaze wrote:Does blurring and alpha channel work differently in floating point space?
They work the same.

I2_XYZ4x.tiff uses sRGB primaries but has no transfer function, so it is linear (scene-referred). Hence it has no maximum value, there is no concept of "brightest white".

When you want to make an output-referred sRGB image, which does have a concept of "brightest white", you need to first bring it into the range [0,1]. "-auto-level" should do that, making the minimum value 0.0 and the maximum value 1.0 (as multiples of QuantumLevel). If you still have an alpha channel, remove this before auto-levelling. Then after converting to sRGB all pixels should be in range [0,1].

Re: Any recom for HDR (6x2EV) and batch proc?

Posted: 2020-03-01T17:21:51-07:00
by Skygaze
And there was much rejoicing (ref to MP & Holy Grail).
I still have a slog to reach the final answer but I figure I now have enough knowledge to get there.
I was on the verge of asking for more help, when I realized that I still had a floating point image. After a quick search on forum, I found I had to add a "-depth 16" along the way. Here the noa suffix means I have already removed the alpha.

Code: Select all

magick I2f_noa.tiff -profile sRGB-elle-V4-srgbtrc.icc -auto-level -depth 16 view_auto_I2f.tiff
My compositing of "push the short exposure through a mask of the blown-out area of the longer exposure and put it on top of the longer one so nothing is blown out" was however puzzling me, because the bright zone was now darker. After playing around with multiplication factors (I thought I had to multiply/divide by 4 to compensate for the 2 EV difference), I realized the best factor was 1.0 and that the dcraw conversion to XYZ adjusts for exposure differences on my behalf! So I am awarding myself 5 points for figuring this out without help.

And yesterday I managed to blur the mask, but not using blur itself since that did not want to work on a binary tiff. Instead,

Code: Select all

magick mask_I1f.tiff -negate +level 0,100 -white-threshold 99 -morphology Distance Euclidean:4,5! -negate mask_I1fb.tiff
.

The rest is now a "simple matter of adjusting parameters until happy". I will post something later in the week.
Once more, thank you snibgo for your invaluable assistance!
Have a great week everyone!
Alister.

Re: Any recom for HDR (6x2EV) and batch proc?

Posted: 2020-03-03T23:11:08-07:00
by Skygaze
Well all right! I have now gone through a full pass from start to finish, and the second attempt is posted here:
https://sites.google.com/site/alistarga ... t-moon-hdr. It's shown at 200% or 300% of full size so the warts are in one's face.

The big unexpected thing is that the crescent is less bright in the middle. But the size of the crescent is well-controlled (not blown-out!). I will take a closer look in the upcoming days to see why that might be so and adjust the blur amount on the masks and perhaps a first step at reducing bloom. As it stands the red fringe is significantly mitigated.

Closing in thanks to you.
Alister.

Re: Any recom for HDR (6x2EV) and batch proc?

Posted: 2020-03-05T00:29:53-07:00
by Skygaze
It's getting better all the ti-i-ime. Magnified like this it is easy to see the warts, but it is so much better than earlier attempts!
Image
If that link does not show here, it can be viewed here: https://sites.google.com/site/alistarga ... t-moon-hdr

I've tried a fair bit to get the earthshine to show, but even in GIMP with curves it is very hard keeping the bright crescent from blowing out while earthshine is brightened. Although I fixed the dimming in the middle of the crescent, it seems dependent on personal choices - there's a good chance I made a mistake with filenames and processing along the way.

Next step is to try some anti-blooming, and bringing the blur size down to 3 from 5.
Alister.