Since ColorMatrix1=the identity matrix, and CalibrationIlluminant1=D65, I expected that RT would interpret the color as XYZ.D65 = [0x7FFF 0x7FFF 0x7FFF] / 0xFFFF = [.5 .5 .5]. Converted to sRGB.D65, that’s [0.799 0.718 0.704], and therefore that’s what I expected RT’s output image to be filled with. I arrived at that value using:
But instead of my expected value, RT outputs sRGB=[0.737 0.737 0.737] (with all image processing disabled, except de-bayering).
Would anyone happen to know how RT arrives at that value, and what exiftool/RT settings I need to get RT to output the expected sRGB color? (I’ve tried many exiftool and RT settings, but RT’s output never matches my manual calculation.)
I am no expert but since your DNG does not appear to have directories my guess is that RT interprets your image as a thumbnail in its final color space. I believe raw data is supposed to be in the first SubIFD or however specified in the DNG Spec.
Very partial answer. II let proficient people give complete answer.
color model
There is no XYZ color model (Color model - Wikipedia) at the input of RT. Input can be either RGB color model for demosaiced photo or camera space for raw.
Your input is thus interpreted as RGB values (0.5, 0.5,0.5).
XYZ can be used inside some processing (for instance as connection space)
If you use as input profile “no profile” and as output profile “no profile”, with no processing, the pipeline is a pass-through.
The output file will be RGB (0.5,0.5,0.5)
The values shown are 0.5 corrected with a 2.8 gamma. Note: I think this gamma correction made by design on the WS values is a bad choice.
Furthermore, I am not sure that your DNG metadata can be interpreted by Rawtherapee. A test case should be compliant with what the software is made for (here process raw files and demosaiced files).
Output colors depend upon the processing you did. It’s either aimed at being realistic or being artistic. If you look at the playraw here, you will see lots of different processing.
Even the camera jpeg as they are processed inside the camera, have a specific manufacturer look.
see Editor - RawPedia
The best should be to upload an example of raw photo with pp3 sidecar were output colors are not what you expect.
I was trying for the latter: give RT values in camera raw space, and since ColorMatrix1=identity, they’d be interpreted as XYZ.D65 values (since the DNG spec defines ColorMatrix1 as translating between XYZ and camera space).
Anyway, since I couldn’t get the DNG fields to work as I expected, I created a custom ICC profile containing my color matrix, and fortunately that works.
In case it helps someone else, I’ve outlined my steps below, which allow you to:
control the color matrix that RawTherapee uses for interpreting raw CFA data, and
independently verify RawTherapee’s color math.
Controlling the color matrix that RawTherapee uses to interpret color filter array data
Given a 16-bit image filled with [0x7FFF 0x7FFF 0x7FFF]/65535 = [.5 .5 .5], RawTherapee should output sRGB = [0.744 0.726 0.812] = [190 185 207], assuming the ICC profile contains the identity matrix. Other color values (using the identity matrix) can be verified using this color calculator: