Replies: 1 comment 1 reply
-
Hi. Will answer here, instead of a slack. Short answer, such workflow of using commercial photographers tool, designed to deliver best looking output, for photometry process is a dead-end. You need to use original raws and follow best hdri practices. And depend on goals, use some shortcuts. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'd like to ask if you have any pointers for working with HDR DNGs produced by Lightroom. My goal is to access the HDR values in a known colour space.
By examining the metadata I've found out that DNGs are following the 1.7.1 DNG specification, contain 3 x 16 bit float samples in a high-resolution SubIFD with
PhotometricInterpretation
set toLinearRaw
, compressed with JPEG XL. There is a thumbnail and more lower-res SubIFDs too, but I am not interested in those.Based on the specification and previewing the values I assume that the data are demosaicked scene-referred linear RGB values. The issue I am facing is that I am not sure what primaries they are using. Once I'd know that I could process the data further with OCIO.
I've tried using a couple of apps for extracting pixels from the DNGs, but each had its own issues:
dng_validate
from Adobe DNG SDK (1.7.1) can export a 16bit int / 32bit float TIFF from the HDR DNG, but unfortunately it clips the highlights, so it's useless in my caseI've gotten the farthest with the tifffile Python library which allows me to access the (unclipped) HDR float samples and e.g. export them into an EXR, but in an uknown colour space.
After reaching out to Adobe's support I was advised that the raw values could be in Adobe RGB or ProPhoto RGB colour spaces, but trying to convert these into sRGB haven't resulted in a correctly looking image.
I've tried doing a camera native colour space -> sRGB conversion as shown here and here, but it hasn't produced correctly looking images either. The IFD0 contains tags with the necessary matrices and the high-res SubIFD doesn't seem to contain any tags indicating primaries.
I am sharing two HDR DNGs and respective EXRs with values accessed by tifffile (and normalized to 0-1) in case anybody would up for the challenge:
It's interesting that the EXR has this typical greenish tint that can be seen in camera native colour spaces (incorrectly) displayed on e.g. a sRGB screens.
Additional info
sRGB un-tone-mapped preview of 1.exr, 2.exr at different exposures, the images were loaded as
Linear Rec.709 (sRGB)
Metadata of 1.dng:
Metadata specific to the high-res SubIFD of 1.dng (accessed with tifffile):
Beta Was this translation helpful? Give feedback.
All reactions