How to correctly calculate the Dynamic Range of an image

Started by GiamBoscaro, October 03, 2019, 04:35:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GiamBoscaro

I'm trying to compare the dynamic range of a correctly exposed LDR picture with the dynamic range of the HDR image obtained with 3 LDR pictures.

Right now I'm calculating the DR as:

stops = log2(max) - log2(min);

Where

max = maximum pixel value found in the image
min = minimum pixel value found in the image

The reference correctly exposed image is an 8 bits Jpeg, so the dynamic range is always 8 stops, since the values goes from 0 to 255. The HDR image is an RGBe radiance map, so the values are 32 bits floating point.

I was wondering a few things:

Is this the correct way to calculate the dynamic range from a picture?
All jpg files have pixel values from 0 to 255, so every correctly exposed jpg will have the same dynamic range. Is this right?
Sometimes the calculated dynamic range of the HDR image is lower than the original. How is this possible?
Thank you for your help