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
Always worth reading here
http://www.photonstophotos.net/GeneralTopics/Sensors_&_Raw/Sensor_Analysis_Primer/Photographic_Dynamic_Range_Summary.htm
and here
https://clarkvision.com/articles/index.html
Not really the answer but this may also help https://www.fredmiranda.com/forum/topic/1611318/2#14966174