Help converting dcp to icc using dcamprof

Darktable says it’s unsupported. A similar icc I created using the dcp2icc in the past is about ~216kB, so the size difference is quite large.

I tried using the make-icc (as I put in the example above). I also tried using the json2icc which didn’t generate a vaiid icc as well.

A while back, I made some ICC profiles from Adobe DCPs, my Neutral file made a 524-byte ICC, Vivid made a 224-byte file. My guess is that there are LUT TRCs in them. Open the .json intermediate file with a text editor, and the contents are easily discernable.

I’m not at my regular computer to check, but IIRC the roadblock I ran into was the DCPs did not contain a ForwardMatrix, which is what dcamprof expected to see to populate the color primaries. At that, I gave up and went back to my Argyll-produced profiles, but I plan to restart that investigation now that I’m retired (sort of…)

Edit: My Argyll-produced camera profile is only 3.5kb, so a usable profile doesn’t have to be big…

1 Like

I’m still trying to get it to work. Now darktable loads the icc (I’m not sure what changed), but still something seems off. I’ve tried converting both a Standard dcp and a Vivid one. Both resulted in the same icc. Kind of weird.

The json indeed has a lookup table, but it seems much bigger than something that can be represented in 500bytes.

@ggbutcher Glen did you ever make any progress with this…DCP-ICC

"A while back, I made some ICC profiles from Adobe DCPs, my Neutral file made a 524-byte ICC, Vivid made a 224-byte file. My guess is that there are LUT TRCs in them. Open the .json intermediate file with a text editor, and the contents are easily discernable.

I’m not at my regular computer to check, but IIRC the roadblock I ran into was the DCPs did not contain a ForwardMatrix, which is what dcamprof expected to see to populate the color primaries. At that, I gave up and went back to my Argyll-produced profiles, but I plan to restart that investigation now that I’m retired (sort of…)

Edit: My Argyll-produced camera profile is only 3.5kb, so a usable profile doesn’t have to be big…"

I’ve kinda sidetracked myself, working right now on making profiles from spectral sensitivity data…

However, for this endeavor, since that post I’ve learnt from @Morgan_Hardwood that it’s the D65 ColorMatrix1 that he uses to make the primary sets for camconst.json. With that, I’m not sure why dcamprof wouldn’t make a matrix ICC from a DCP without the ForwardMatrix…

I’m sorta-retired now too, so I have time to pursue all of this. Let me mess with it today/tomorrow (still configuring a new computer, need to find dcamprof and compile it), and report back.

Okay, I just made a matrix ICC profile from an Adobe Standard DCP for my Nikon D7000, and it works fine. Here are the steps:

$ dcamprof dcp2json <filename.dcp> <filename.json>
$ dcamprof make-icc -p matrix <filename.json> <filename.icc>

In the .json file you can see both the ColorMatrix1 and the LUT; -p xyzlut would make an A0toB0 LUT ICC. For this camera, I made the LUT profile to use with extreme colors, works quite well. I made a similar one for my Z6, but for some reason it doesn’t work so well, need to pick at it. The Z6 is what I’m noodling with measuring spectral sensitivity for, as this to me would be the gold standard for camera profiling.

NP thanks so much …just curious……as I have an old Lumia phone that shoots raw and I found a few dcp files for it and thought about trying to make icc files for DT……Enjoy you new computer……

I got back to this and have made progress with my Pixel phone but the old Lumia DNG files have no forward matrix so they just don’t seem to want to convert…I guess I will just stick to what I have and try to get a TC that corrects things …

Can you run a ‘exiftool -G’ against the file? If there’s a ColorMatrix1 or 2 with a D65 white point, I can make a ICC from that, and maybe even a .json file that you could mess with.

Lumia640xl_json.txt (523.7 KB) Lumia640xl.dng (18.0 MB) 640xldngsrc_xml.txt (488.3 KB) Glen that is very generous, I will attach the xml from dcptool , the dng file from the phone and the json file from dcamprof…Its the next step to get to an icc profiie I can’t get to and then of course I might like to tweak it either with the dcamprof tools or in adobe dcp profile editor before conversion to icc…any help would be appreciated…don’t lose any sleep over it but I am very grateful for the chance to learn something from you…best ToddLumia640xl.dng (18.0 MB)

Cool; I’ll probably get to it tomorrow.

Hey NP again thanks for your offer to help…haven’t had time to check out rawproc yet…sadly have to plan the back to work strategy for the lab…not looking forward to this one…makes me want to retire…

Here’s the ICC:
todds-profile.icc (596 Bytes)

The DNG had a D65 ColorMatrix2, so I copied the primaries from it, multiplied each number by 10000, then put them in a colorspace tool in rawproc, which made the profile and embedded it in a JPEG when I saved it. I then used exiftool to extract it.

It’s a linear, gamma 1.0 profile. It’s also a V4 profile, which dcamprof won’t read to produce a JSON of it. I’ll have to look at my code…

@ggbutcher Glen I just noticed this thanks so much I will give it a try…

1 Like

Can somebody explain something? (@ggbutcher maybe? :wink: ).

Just to toy around a bit, I wanted to try some Adobe DCP’s to ICC to use in Darktable. (Particular, to mess with differences using the stda and d65 illuminant, and DT color-calibration uses I was having in the modern wb-workflow).

dcp2icc from here (DCP to ICC camera profile converter download | SourceForge.net) needs to illuminant to use, and clearly writes two different files when saying ‘StdA’ and ‘D65’. But, the highlights seem to be ‘cut off’ in that profile. As if it writes a lut which bunches all the highlight information together.

Now, going the dcamprof dcp2json and then make-icc route, I encounter different problems. Yes, the files are very tiny, but seem to work :slight_smile: .

First, the ‘Adobe Standard’ profile I’m messing with, has two illuminants in there. I want to create an ICC from each. I don’t see an option for this in dcamprof make-icc.

So, I duplicated the json file. And in one, I removed all references to ‘the second illuminant’, and in the first I removed all references to the first, but then changed ‘2’ to ‘1’:

To explain it better than my words :wink: : This is the json how it’s written by dcamprof:
image

with illuminant 1 and 2, matrix 1 and 2, huesatmap 1 and 2…

into this:

and this:
image

but in the last D65 file, I renamed all ‘2’ into ‘1’.

So, now I have a json file with one illuminant for StdA, and another one for D65.

dcamprof make-dcp -m matrix with those, and I get two, very small ICC files.

Which both work! There is also a difference between them (noticeable on skin tones mostly), so it did pick up the two illuminants.

BUT:

Both in the files written by dcp2icc, and in those files created with dcamprof dcp2json && make-icc, the colors are very unsaturated. It’s almost (almost, not exactly) like setting the input-profile to linear 709, like a linear rgb.

I can take color-balanace-rgb and crank the global saturation to 100% to get sort of close. And it’s not unpleasant. But it also doesn’t feel right :slight_smile: .

Am I missing an option in dcamprof, or is this just a side effect of the Adobe DCPs ?

Maybe your missing the tone curve…

I believe you’re supposed to use -p matrix otherwise you get clipping errors… and matrix profiles can’t have tone curves?

I tried with -t acr -p xyzlut, and the colors don’t ‘come alive’ or aynthing, and I do get the clipping issues.

Good hacking, with dcamprof json that’s exactly what I’d have done…

One thing to note is that your rendition will depend on both the camera profile and the destination profile. Camera profiles by definition should be linear (putting “look” modifiers in them is sowing confusion, IMHO), and if the destination profile is linear, that’s what you get.

Even if your destination profile is display-referenced in its tone curve, the image may still look “dark”. That’s what filmic, auto-matched, and all that discretionary tone curve shenanigans is all about.

Post a raw and your two profiles, and I’ll run them through rawproc in order to eliminate the extraneous variables…

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??