What causes highlight clipping to gray in hdr mode?

168 views
Skip to first unread message

Matija Kogoj

unread,
Aug 15, 2018, 5:47:34 PM8/15/18
to hugin and other free panoramic software
Hello.

This screencap at the following link was snipped from Luminance, but it opens the same in other software as far as I could test: https://www.dropbox.com/s/e7zjcaln4xdjke1/artefact_brightness.JPG?dl=0

The panorama was shot in 7 .jpg pictures with single stop difference, and mostly everything worked fine, except for the gray area where the sun should be.
Processing was Nona - builtin - enblend, output to EXR. I also output layers to (8bit) TIFF to try other approaches.

I wanted to try other settings but now the stitcher fails every time. I'm not sure if the same thing happens with TIFF, but I need this to be in 32bit EXR in the end.

Additionaly -
recently I opened a different topic featuring a panorama of a riverbed (https://groups.google.com/forum/#!topic/hugin-ptx/aRAfBvEwRdk), and it suffers from the same issue. I thought it was due to inadequate amount of bracketing or something at the time, but this latest panorama did not share this shortcoming.

Thanks.

David W. Jones

unread,
Aug 15, 2018, 6:00:46 PM8/15/18
to hugi...@googlegroups.com
On August 15, 2018 11:47:33 AM HST, Matija Kogoj <mkogoj...@gmail.com> wrote:
>Hello.
>
>This screencap at the following link was snipped from Luminance, but it
>
>opens the same in other software as far as I could test:
>https://www.dropbox.com/s/e7zjcaln4xdjke1/artefact_brightness.JPG?dl=0
>
>The panorama was shot in 7 .jpg pictures with single stop difference,
>and
>mostly everything worked fine, except for the gray area where the sun
>should be.
>Processing was Nona - builtin - enblend, output to EXR. I also output
>layers to (8bit) TIFF to try other approaches.

Hmm. Why shoot JPG? Before you even start HDR processing, you've lost most of the dynamic range. I think that would particularly affect the extremes - such as the sun.

I shoot RAW format. On my camera, that's 48-bit color (16 bit per channel). Then I use Rawtherapee to convert to 48-bit TIFF and continue from there.

I also use 2 stop differences (base 0EV, +2EV, +4EV, -2, -4).

Since your goal is EXR, I think it better to start with an HDR format and keep it that way all the way through.

>I wanted to try other settings but now the stitcher fails every time.
>I'm
>not sure if the same thing happens with TIFF, but I need this to be in
>32bit EXR in the end.
>
>Additionaly -
>recently I opened a different topic featuring a panorama of a riverbed
>(https://groups.google.com/forum/#!topic/hugin-ptx/aRAfBvEwRdk), and it
>
>suffers from the same issue. I thought it was due to inadequate amount
>of
>bracketing or something at the time, but this latest panorama did not
>share
>this shortcoming.
>
>Thanks.


David W. Jones
gnome...@gmail.com
wandering the landscape of god
http://dancingtreefrog.com

Sent from my Android device with F/LOSS K-9 Mail.

Matija Kogoj

unread,
Aug 16, 2018, 6:39:16 PM8/16/18
to hugin and other free panoramic software
I used jpgs because they cost much less memory, which could be important when you have dozens of photos per end panorama. Since each jpg should cover at least 8 stops of exposure, so spacing them a single stop from one another should allow for adequate interpolation - or however hdr merging works. Basically it should be enough.

Regardless, it didn't work with TIFF either. To my knowledge each raw-exported tiff was 16 bit, but end result is basically the same. There is less of the grey, but still too much - and the fact it has underexposed spots in the shadows (admittedly it could be due to people moving under the stand) it looks like the restored areas are consequence of shifting the overall exposure.


I just need to know if this can be fixed in hugin, Or Luminance. Maybe i'm completely wrong and I need to make only 3 images spread at +-2 (which didn't work last time but who knows, maybe next time).

Don Johnston

unread,
Aug 16, 2018, 8:22:04 PM8/16/18
to Hugin Pano, Hugin Pano
Share your image with the lowest EV, i.e. the darkest image, so we can see how the sun and its reflection look. Are they still over-exposed?

David W. Jones

unread,
Aug 17, 2018, 5:13:13 AM8/17/18
to hugi...@googlegroups.com
On 08/16/2018 12:39 PM, Matija Kogoj wrote:
> I used jpgs because they cost much less memory, which could be important
> when you have dozens of photos per end panorama.

I once made a panorama covering 8-10 miles of the Victoria, Canada,
coastline. The final image came to approximately 1GB. I generated the
first version of it on an old Celeron system with 2GB of RAM. I let it
run overnight.

> Since each jpg should
> cover at least 8 stops of exposure, so spacing them a single stop from
> one another should allow for adequate interpolation - or however hdr
> merging works. Basically it should be enough.

Yes, when starting with JPG, you need more photos to cover the same
dynamic range. You need 3, in fact, since 48-bit has 3x the dynamic
range of JPG. Or is it 2x?

> Regardless, it didn't work with TIFF either. To my knowledge each
> raw-exported tiff was 16 bit, but end result is basically the same.
> There is less of the grey, but still too much - and the fact it has
> underexposed spots in the shadows (admittedly it could be due to people
> moving under the stand) it looks like the restored areas are consequence
> of shifting the overall exposure.
>
> https://www.dropbox.com/s/iqg0t088p039dyc/artefact_brightness2.JPG?dl=0
>
> I just need to know if this can be fixed in hugin, Or Luminance. Maybe
> i'm completely wrong and I need to make only 3 images spread at +-2
> (which didn't work last time but who knows, maybe next time).

It looks to me like an HDR image before adjusting levels on it in
Luminance. After you made the HDR (TIFF based) image and opened it in
Luminance, did you adjust levels? That would take the brights up to
brights again, and the blacks to black.

--

Matija Kogoj

unread,
Aug 17, 2018, 6:56:34 AM8/17/18
to hugin and other free panoramic software
The image in the original post,


has another image at the side - that is the darkest exposure I made.

I tried adjusting levels, but the main problem remained in that the highlights around the gray area clip sooner than the gray goes to white. I recorded the process, you can find the file at https://www.dropbox.com/s/78db4w7dc5rr94r/luminance_manipulation.zip?dl=0 .
The video is a little wonky, it only recorded part of my screen, but it shows the issue is not related to levels in Luminance. The password to the zip is hugingroup,

In fact, I noticed that the grey area looks somewhat like the areas at the base of the image - among the rocks. It is as though parts of the image were masked out.

I uploaded the work files and photos as well, under the same password https://www.dropbox.com/s/20zs4rdm17mbg0h/20180812_files.zip?dl=0 - note that mapped, 8bit tif layers are exported properly.

Matija Kogoj

unread,
Aug 21, 2018, 4:39:19 PM8/21/18
to hugin and other free panoramic software
I believe to have figured this out - colour space.

Working on other scenes in the meantime I found that jpgs from my camera were written in AdobeRGB97, which is proprietary. Using 16bit TIFF files, exported from RAW, resulted in the same issue but once those were written in sRGB colour space solved the whole thing.

It would be best if someone could confirm this.

Greg 'groggy' Lehey

unread,
Aug 22, 2018, 12:56:58 AM8/22/18
to hugi...@googlegroups.com
On Tuesday, 21 August 2018 at 13:39:18 -0700, Matija Kogoj wrote:
> I believe to have figured this out -* colour space*.
>
> Working on other scenes in the meantime I found that jpgs from my camera
> were written in AdobeRGB97, which is proprietary. Using 16bit TIFF files,
> exported from RAW, resulted in the same issue but once those were written
> in sRGB colour space solved the whole thing.

Interesting. Of course, if you had used raw images, this wouldn't
have happened.

> It would be best if someone could confirm this.

I do this kind of thing all the time, and I have no issues. As I
mentioned earlier, I do three shots at 3 EV intervals: +4.7 EV, +1.7
EV and -1.3 EV. I take a separate shot with the sun blanked out and
then merge them, using only the area round the sun for the shot that
includes the sun. This is not for exposure purposes, but it gets rid
of flare in the shadows.

Greg
--
Sent from my desktop computer.
Finger groo...@gmail.com for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed. If your Microsoft mail program
reports problems, please read http://lemis.com/broken-MUA
signature.asc
Reply all
Reply to author
Forward
0 new messages