Raw2hdr and output color space

Hello everyone,

From previous posts (and hdrgen/raw2hdr/dcraw documentation), I understood that the default output color space used by raw2hdr is sRGB (same for hdrgen).

  1. Is it the same for Photosphere?
  2. How do the merging algorithms infer the native color space of the camera in order to transform sensor response to sRGB values ?

Thanks in advance for your responses,
Best regards,

Coralie Cauwerts
FNRS postdoctoral researcher, Eng. in Architecture

Hi Coralie,

Photosphere has little choice but to accept whatever color space the camera provides, and most provide sRGB (or something related) in their JPEG images. The only exception I know of is some DSLRs, which may alternatively provide Adobe RGB color space, which is also recognized. However, none of the camera color spaces are particularly accurate. I have found Canon with a “Neutral” capture setting to be the most faithful.

The bottom line is, if you really care about color, you should use raw2hdr, which employs Dave Coffin’s amazing dcraw tool to convert to a reliable color space. It also accepts options for different color space outputs with the -c option, which can be set to “sRGB” (default), “AdobeRGB”, or “XYZ”. I haven’t found the “XYZ” setting to be very reliable, however. Even sticking with sRGB, your colors will be much more accurate using raw2hdr, because it bypasses the camera’s built-in color operations, which are tuned to please the eye rather than for accurate reproduction.