Photoshop: why does HDR Pro tone map each image differently?

  • 1
  • Question
  • Updated 3 years ago
  • (Edited)
HDR Pro processes sets of bracketed exposures differently, depending on the content of the source images. There is some sort of auto exposure compensation in HDR Pro that reduces the brightness and contrast of a merged set of images if the source images contain a bright point of light like the sun. This completely ruins any attempt to create a photomerge panorama out of a series of HDR images if they are all processed differently because some of them have the sun in the frame and some don't. How can I make HDR Pro ignore the content of the source photos and process them according to my saved presets only?
Photo of Allan Shook

Allan Shook

  • 10 Posts
  • 0 Reply Likes

Posted 7 years ago

  • 1
Photo of Brett N

Brett N, Official Rep

  • 2258 Posts
  • 114 Reply Likes
Could you post an example of this happening?
Photo of Allan Shook

Allan Shook

  • 10 Posts
  • 0 Reply Likes
www.flickr.com/photos/allanshookphoto...

Here is a link to my example I posted on flickr...

You will notice that all of my source images are exposed equally, -2EV, 0EV, and +2EV, but the resulting HDR image with the sun in the frame is darker, as if Photoshop compensated for the brightness of the sun and reduced the exposure of the HDR image, and I have no control to manually set the exposure for all images I apply a saved preset to. HDR Pro seems to automatically darkens bright images.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
The HDR values should be the same, but the default toning of the HDR image will be different because one contains much brighter values. Try changing the view exposure slider, or using an exposure adjustment to give them the same viewing range.

In short: the image should be the same, but you're just looking at different previews.
Photo of Allan Shook

Allan Shook

  • 10 Posts
  • 0 Reply Likes
Thanks Chris,
Yes, the set of images with the sun does have much brighter values, it's supposed to, the sun is supposed to be bright. Why is HDR Pro lowering the overall exposure of that image and overriding the saved setting of that parameter? I have saved a preset based on the image without the sun, and applied that preset to the image with the sun, and it doesn't use the same parameters when creating the HDR composite of the shot with the sun in the frame because HDR Pro look s at the values of the image and makes a judgment call on its own and reduces the brightness by some arbitrary amount because it thinks the image is too bright? That's not right.
There is no "View Exposure", just Exposure, and I have tried to change that in the sun shots, but I can only estimate by eye to compensate for the reduction in brightness that HDR Pro shouldn't be doing on it's own.

Yes, the images should be the same, but they are not. I am looking at the finished exported HDR merge, not a preview.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
The exposure in the source images has little to do with the exposure used to preview your HDR result.

And unless you have a very expensive HDR display, I doubt you are looking at the full HDR image. You are almost certainly looking at a preview of the HDR image tone mapping for your Low Dynamic Range display.

Your darker image might have values from 0 to 10. The brighter image might have values from 0 to 10,000. To provide a reasonable preview of the image, MergeToHDR looks at the range of values and chooses a default exposure for the preview of those values. Again, it's just the preview. Yes, it sounds like it's doing the right thing, but that you are missing some fundamental concepts of using High Dynamic Range images. The values are probably the same, even if the preview is different.
Yes, there is a view exposure -- otherwise you wouldn't be able to see anything in most HDR images (they'd be too bright or too dark). Check the status bar at the lower left of the image for the view exposure slider, and see the slider in MergeToHDR when you convert to a 32 bit document.
When you tone map the HDR document down to 8 or 16 bits/channel, there are additional exposure adjustments, or local adaptation (which will make the images differ, because the content differs).

It sounds like you might want to read up on what High Dynamic Range images are, how they are created, previewed, and tone mapped down to Low Dynamic Range (your monitor and print).
Photo of Allan Shook

Allan Shook

  • 10 Posts
  • 0 Reply Likes
This is like pulling teeth, isn't it? Maybe I should explain what I am trying to do so you understand the problem I am having.
I am making panoramas with photomerge out of a series of HDR images I am making with HDR Pro. I need all of the HDR images to be processed the same way, regardless of their content, so they create a seamless panorama, so I don't have some shots darker and with less contrast just because they have the sun in the shot.
I have shot everything in RAW on my Canon 60D, all of the settings in the camera are set to manual, with no highlight tone priority or exposure compensation. I am using CS5, selectiong the RAW files in Bridge, selecting Tools, Photoshop, Merge to HDR Pro, and using the 16-bit, local adaptation mode, and saving the result as a .16-bit .psd file. I am then using Photomerge to stitch together all the .psd's in to a panorama.
How would you do this, if you had a series of bracketed exposures, some with the sun in the frame, and some without?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
They are processed the same way. Just because the preview is different, or the tone mapping is image specific, does not mean that the HDR result is different..
You seem to be confusing the on-screen preview, and possibly a tone mapped result, with the actual HDR values.
Photo of Allan Shook

Allan Shook

  • 10 Posts
  • 0 Reply Likes
Here is a youtube video from a guy who is doing the exact same thing I am doing.
https://www.youtube.com/watch?v=tGfLyL...
Image you get to the part where you apply your preset in HDR Pro to your remaining sets of bracketed exposures, repeating the exact same step for each set, but the resulting images with the sun in them are darker than the others. What went wrong?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
"apply your preset"? You don't apply anything when creating an HDR image.
The presets in MergeToHDR are for tone mapping your HDR image down to a Low Dynamic Rage version. The default tone mapping is local adaptation, which is very image content specific. If you want the tone mapped images to match, then you would need to use a tone mapping algorithm that isn't so image dependent, or images that are more similar in content.

HDR images are 32 bits/channel.
That then gets tone mapped into 16 or 8 bits/channel.
Photo of Allan Shook

Allan Shook

  • 10 Posts
  • 0 Reply Likes
Yes, Exactly. I agree with you. You are right. Correct in every way.

I am making panoramas out of my 16-bit Low Dynamic Range .psd files, that I get as a result of clicking the OK button in HDR Pro.

The resulting 16 bit low dynamic range .psd files that I open in Photoshop that have the sun in them are darker than the ones that don't have the sun in them.

How would you use HDR Pro to make a series of.16 bit .psd files to be stitched in to a panorama that wouldn't have lines between lighter and darker images.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
Yes, because you chose a tone mapping algorithm and settings that make it darker. Either merge the HDR photos instead of tone mapping them, or use a tone mapping choice that matches between photos.

Again, you don't seem to understand HDR or the controls available to you for tone mapping.
Photo of Allan Shook

Allan Shook

  • 10 Posts
  • 0 Reply Likes


Here is an example of a panorama made from four images. each of the four images was exported, rendered, merged, or otherwise made with HDR Pro. You'll notice the sky on the left side of the image is bright blue and the grass and plants are bright green. Toward the center and right side of the image the sky is darker blue/grey and the plants are darker green. The two shots on the right have the sun in them and are noticeably darker. because the resulting images I got by using HDR Pro were darker.

What would you have done differently?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
What would I have done differently:

2) Merge the 32 bit documents then tone map, instead of tonemapping then merging.
1) Don't use a local tone mapping algorithm if I was going to tone map then merge.
3) Read up on HDR and the available controls.
Photo of Allan Shook

Allan Shook

  • 10 Posts
  • 0 Reply Likes
I'm sorry to be dragging this out, when you say "Don't use a local tone mapping algorithm", do you mean don't use the local adaptation method in the HDR toning window when converting a 32-bit HDR image to a 16-bit image? Would you use Exposure and Gamma, Highlight Compression, or Equalize Histogram instead?

I know it must be very frustrating talking to a photographer who doesn't understand the technical intricacies of Adobe software, but I just want to select a preset from the drop-down list and have my sets of bracketed exposures processed identically so I can make a panorama out of them.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
Exposure and Gamma would be the best choice of those.
EqualizeHistogram is also image dependent.
And Highlight compression is a pretty bad tone mapper (just there for quick previews).

And it's not about Adobe software.
It's like you are trying to follow someone else's recipe without knowing the language they're speaking.
Photo of Allan Shook

Allan Shook

  • 10 Posts
  • 0 Reply Likes
Most importantly, whatever I do for one set of exposures, I need to copy, or apply, or just do to all the other sets of exposures to achieve the same result across my panorama.

Would you agree that Adobe Photoshop HDR Pro, although it is working properly, and the way it was designed to, is not an appropriate tool to use to make HDR panoramas because it will give you inconsistent results when you have some shots in the panorama that have very bright areas and some don't? Unless you make changes to individual images, attempting to judge by eye the relative brightness between resulting images, through trial end error.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
No, MergeToHDR is quite appropriate for making an HDR panorama, people use it all the time. The inconsistency is because you don't know how to use the tools.

But it's like someone walked up to a metal lathe and want to make a candle holder, but don't know what the controls do, and the most likely outcome will involve stitches.
Photo of Brett N

Brett N, Official Rep

  • 2258 Posts
  • 114 Reply Likes
Just want to put in a "minor" interjection...

We aren't talking about the technical intricacies of Adobe Software, but the technical intricacies of 32-bit images. You monitor doesn't support the number of colors possible in a 32-bit image. To display a 32-bit image on your screen it has to be simplified, this is referred to as "tone mapping". You are mapping the number of tones in use to the smaller range of those available. This can make your image appear in unexpected ways, such as when you are trying to display an image with some very bright tones verses those that don't.

Let's use a little math to better explain what and why this is happening:

In a 8-bit image there about 16.8 million possible colors. This is because the image has 8-bits of data per color channel. 8-bits gives you 256 possible values (0-255). Thus 256 Red, 256 Green, and 256 Blue. Multiplied out is 16.8 million.
In a 16-bit image there are about 281 trillion possible colors
In 32-bit, this number is referred to as floating point, because the scale of values is mind-boggling. 79.2 Octillion colors (real number, look it up).

Monitor's generally can support a range of colors equal to 16-bit images ("But wait", you might say, "My display settings say 32-bit". This is not the same thing, because this value is not "per channel", but all the channels added together, or "per pixel")

So lets say your image with the sun in it has some really bright values, say way up near white at 79 Octillion for each of the R, G, and B channels. But it also has some really low ones in the shadow area closer to 2000 for RGB. But in your images without the sun, the greatest (brightest) value is 65 Octillion but you have the same 2000 as your low point. The range of colors you have to deal with is different. So if you map them the same way down to 16-bit the dynamic range suffers, all darker and midrange values have to be lowered even more in an image with higher overall values to fit into that same smaller range.

Perhaps an easier way to visualize what is happening would be this:
Imagine you have 5 sponges stacked up that you have to squeeze into one small container. Separately, you have another 7 sponges stacked up but you have to squeeze them into another container that is the same size as the first. Now, because the sponges are very flexible, you can pretty easily get both sets of sponges into their respective containers. However, the 7 sponges will be flattened thinner than the 5.

In other words, you are compressing (mapping) more information (colors) into the same amount of space but expecting them to look the same. When you use the local tone mapping method, it uses local (i.e. information within the file) to determine how the mapping will proceed. (In the analogy of the sponges, mapping is determining how thick each sponge is squeezed to).

The lesson here is that you can't treat different images with different ranges of dark and light values the same and expect the same result. Each will have to have different settings to get the same results in the end.

I agree with Chris, EqualizeHistogram may be a good option for you. But if you want more control over what the final outcome is going to look like, use Exposure and Gamma. In the end, there is no way to automate this (which is what you are trying to do). Basically, I'm saying HDR is complicated work.
Photo of Allan Shook

Allan Shook

  • 10 Posts
  • 0 Reply Likes
Thank-you Brett,
You have confirmed what I know about 16-bit and 32-bit images. Very well said.

Your final statement,"you can't treat different images with different ranges of dark and light values the same and expect the same result. Each will have to have different settings to get the same results in the end.", is exactly what I needed to have confirmed by an expert.

I have found, through further research, that there is a method to achieve consistent results when making HDR panoramas with the sun in some of the frames. The "theory", as I have been able to assimilate from several photographers instructions is this:

When shooting bracketed exposures that contain the sun, the exposure bracketing needs to be wider, and with possibly more than three exposures. Five exposures, -4, -2, 0, +2, and +4EV might be suitable, or even more exposures and wider bracketing than that. And, in the +4EV (or higher) shot of the darkest area of the sky, the entire sky needs to be completely overexposed, just by one f-stop, just off the end of the histogram, clipped completely. By doing this, the sun shots, and the no-sun shots have the same (or very close) range of values, and therefore when tone mapped down to 16-bit images using the same preset, will have the same (or very close) appearance when compared to each other.

I will continue to test out this theory, but thanks for your help.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
No, that theory is still off.

The range of values in the images determines only part of the tone mapping - the actual image contents determine the rest. As long as you use a tone mapping algorithm that changes results based on the image contents, the results can differ between images.
Photo of Rich Powell

Rich Powell

  • 15 Posts
  • 0 Reply Likes
I regularly make the sort of images you are trying to make.
Examples:
http://i198.photobucket.com/albums/aa...
http://www.360cities.net/image/sydney...

The process is:
Start with Raw files. Apply identical development settings to all of them (white balance, contrast, etc). Enable chromatic aberration correction as it cannot be applied later.
Create 32bit HDR images using HDR Pro and save them as TIFF or EXR images.
You must then use specialist software to blend them together: Hugin or PTGui. If you are using TIFF format the resulting 32bit image cannot be more than 4GB in size.
Then, once you have the full dimension 32 bit photo, you then tonemap it. Photoshop does a good job of this.
Disadvantages: PTGui is expensive. Hugin can be buggy for HDR imaging.
Both pieces of software are very time consuming to learn enough to get high quality results.

Those photos you have taken will make an excellent picture when finished.
Photo of Rich Powell

Rich Powell

  • 15 Posts
  • 0 Reply Likes
Some tutorials you can refer to are:
Hugin: http://wiki.panotools.org/HDR_workflo...
PTGui Pro: http://www.ptgui.com/hdrtutorial.html
Photo of dbur

dbur

  • 34 Posts
  • 2 Reply Likes
The HDR merging of LR6 appears to preserve the setting for each independent HDR image so that manual exposure adjustment matching (except some profile vignette correction) is not required. Also no nasty PS sky banding. Hooray.

https://flic.kr/p/s3EWg9

This image was HDR merged, stitched and tone mapped entirely in LR6. Only the border was done in PS. No manual adjustment of any image was done before stitching. PS was a manual adjustment mess to get this looking OK, and could not successfully stitch the full size HDR.

I did have to set the lens profile correction vignette removal to 49% to get even exposures form image to image.