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);
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
EDIT: adding an image to better explain my reasoning
Left: standard correcly exposed image - Right: HDR image blended from 3 bracketed photos