Help converting dcp to icc using dcamprof

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License .

(Hope I did the CC thing right).

_DSC1309.ARW (47.0 MB)
Sony ILCE-7M2 Adobe Standard-d65.icc (212.5 KB)
Sony ILCE-7M2 Adobe Standard-stda.icc (212.5 KB)

Again, I was just toying around. To see if I can get something I might ‘like more’… it’s not that I’m unhappy at all with DT’s default rendering.

So I don’t know what I was expecting, but with just the -p matrix option (and the small ICC filesize) I was expecting not much change compared to what DT is doing with just a matrix. I was expecting to tone-curve or look in both of them (both the default DT ‘input profile’ option, and a converted ICC).

But I wasn’t expecting the loss in saturation like this. Switching the working-profile doesn’t really do much, because DT appears to be ‘converting to’ the working profile (as it makes sense), but that means you won’t (really) see a change of course.

The loss in saturation is with -p lablut, -p xyzlut and -p matrix. But lablut / xyzlut introduce clipping issues, probably because the LUT data just goes between 0 and 1.0, so everything above 1.0 gets clipped to 1.0. So I have to mess with ‘lowering exposure before input profile, then raising it after again’. Which can’t be how other people are doing things when they made a custom profile, right?

When I have explored DCP I try them in Art to gauge how they will look. I recall I exptd with converting some time back and never really got anything too exciting. In Art you see all the components of the DCP ie the tone curve the look table and the base table. I assume unchecking them all leaves you with the basic matrix I guess. in any event the look is very different with the look and or base in checked…I wonder how these are converted to the ICC if you want that or if you even can??

Yeow, these profiles aren’t doing the camera justice…

So, opened the raw in rawproc with default processing, which just gets to the linear RGB. Ignore the magenta sky, I didn’t apply any highlight reconstruction to keep from messing with the overall color. With the libraw-supplied matrix, I get this, rendered to my tablet screen with a sRGB profile:

Then, I switched that out with the D65 ICC you provided:

Definitely something amiss.

What I’d do next is extract the primaries from the ICCs and the libraw numbers, then plot the chromaticity, but I don’t have time today. So, you left the ColorMatrix primaries in the .json; were there any ForwardMatrix primaries in the original? I don’t understand DCP as well as I should, but IIRC ForwardMatrix should be the better representation of the fundamental camera response. Thing is, @Morgan_Hardwood uses the D65 ColorMatrix primaries to make RT camconst.json entries, so that one should work correctly…

My goal wasn’t to get a working profile (like i said , the one in DT is fine for me ).

But I would like to know how to convert dcp files to an ICC that can work in DT, just to get to grips a bit more with the process.

In a thread of mine about the modern color workflow in DT, i got bad results when the shot was taken in tungsten lighting . Applying a daylight white balance to such a shot , applying exposure and input matrix to that, and then expecting 'color calibration ’ to be able to produce nice results was a bit too much. (Shit in shit out principle ).

But… With just setting the input profile to linear rec2020 improved the results quite a bit . And someone mentioned in the thread they used ‘the tungsten matrix’ and got quite ok result.

They never replied , but since then I’m thinking where and how to get ‘that tungsten matrix’ to use it in Darktable .

I can get the matrix numbers through exiftool , but then in still a big step from a working icc file .

I hoped to split the Adobe dcp into the StdA and D65 versions , to get a working tungsten matrix… But so far no luck .

Your endeavor intrigues me, but I’m a little over-booked right now. I recently produced D65 and StdA profiles from corresponding target shots, so I have a baseline to assess variations. I also have Camera Standard ICCs I made a year or so ago for my D7000, need to dig them out to remember how they performed…

Next week… ??

I think this could have been me, but I also did give instructions: just edit your cameras.xml (you might have to do Bradford chromatic adaptation to D65 on your StdA matrix first, as the whole dt pipeline is D65 relative…)

But rather than “hacking” this temporarily (it’ll “mess up” any other imports until you revert the file back), I now have a new idea for you (just to test as POC), since we also improved the DNG handling in the last version:

  1. Convert your tungsten shot to DNG
  2. Remove all D65 profile related tags using exiftool (CalibrationIlluminant2, ColorMatrix2, …)
  3. Let the dt DNG import do its magic (as no D65 matrix will be found, it’ll be forced to use the StdA one and adapt it to D65)

(If deleting tags does not work, adapt the ColorMatrix1 yourself, making sure the 3x3 matrix multiply order is CorrectMat * ColorMatrix1 using Octave/Python/pen&paper/whatever, and write it back to ColorMatrix2 as rounded integers as well)

PS: if that looks funny, you can also try the result of ColorMatrix1 * inverse(CorrectMat)

PPS: There also might be a chance to tweak even further by using ForwardMatrix, but let’s see first if this approach is doing something…

1 Like