# How can I calculate the dynamic range from a photo?

I've just made an image post-processing to increase a dynamic range.

Here is an original input image

Here is an output image

How can I calculate the dynamic range from a photo? In especially, how do we calculate how much dynamic range has increased?

# update

modify option for detail

original-resized

output-resized

• The dynamic range hasn't increased at all., the amount od visible detail in any given portion of it has changed... not really for the better imho, but the dynamic range is identical [assuming both are actually untagged 8-bit RGB]. Your dynamic range is limited by that definition. Commented Jul 6, 2018 at 16:41
• Also, it looks like you simply took up the shadows and blacks. Your after image lacks contrast to me and the noodles on the right lost detail. Generally speaking, you don't want to lose detail when attempting hdr. Commented Jul 6, 2018 at 16:45
• Possible duplicate of What is dynamic range and how is it important in photography? : it seems that what you need is a good definition :) Commented Jul 6, 2018 at 17:17
• I read your article and am still confused. The article compares cameras in their ability to capture a scene with a wide range of exposure values. This is very different than the HDR process or simply editing to move the histogram around. Can you try to rephrase your question? Commented Jul 6, 2018 at 17:29
• 3.01 dB equals one Ev equals one step in the zone system equals log-base-2 of the contrast ratio numerator. 150dB would be about 30Ev. If you say you can measure the DR of a scene by way of an image (I'm sure CNN could do this emperically or subject-inferentially) then you could compute dB from scene metrics. The answers below are correct, though. The information you've presented does not allow for a measurement of DR. The tonal range / contrast ratio expansion or compression could be calculated but that's not what you've asked for. Commented Jul 9, 2018 at 22:53

The correct answer has been given, the photo does not have a dynamic range, it has only recorded the dynamic range of a scene or the specific portion of it. That being said, I will offer some unsolicited advice.

I would say that understanding dynamic range in general and specifically the dynamic range of the scene you are photographing will serve you much better than trying to do post production on a less than optimum photo. ( i have taken my share of those ) You need to know the dynamic range of the scene you are photographing AND what portion of it you want to capture, because your camera is incapable of recording the complete range of light in some/many situations.

I would suggest you study and understand if not implement the Zone system formulated by Ansel Adams and Fred Archer. You can find much info by more articulate folks then myself but i will try to give you my limited layman's understanding of it.

The Zone system will allow you to assign a reference number to a portion of the dynamic range in the scene you are photographing so that you can adjust your exposure to place that particular part of the dynamic range with the amount of exposure that fits your vision of what the final photo should look like.

Meaning if you want a certain clouds shadow falling on a mountain to be just gray enough to have details but not completely black then you can achieve that by knowing where that shadows falls within the zones of the scene and adjust your aperture and or shutter time to record it perfectly in relation to the dynamic range you can/want to record of that scene.

Another way to put is that your brain knows that your camera may not be able to record the complete dynamic range of a scene so you tell the camera what section of the dynamic range you want to capture and further more make sure that the most important part of the scene is exposed exactly where you want it within the recordable porting of the dynamic range you are recording.

All of that is not to say that post production does not serve a purpose. For Adams and others the zone system was only the first step. Knowing how to manipulate the development of the film and how print The Negative is just as important. Understanding The Camera will help you create the best photo/negative possible.

The dynamic range hasn't increased.

You are looking to extrapolate data that doesn't exist. The dynamic range is dictated by the limitations of the sensor capturing the image. If an area is too dark (or too bright) it zeros out. If you were to just look at the basic RGB of a portion of an image it would look like this:

0,0,0    0,0,0    0,0,0            Visualization
■ ■ ■
0,0,0    0,0,0    0,0,0         <----- ■ ■ ■
■ ■ ■
0,0,0    0,0,0    0,0,0


At this point there is nothing you can do to recover more data.