Is there a way to convert the LookTable from a DCP-derived json file (dcamprof) to the more general dcamprof lut format?

With dcamprof you can convert a DCP file to a JSON containing the look table. Then, you can convert that json profile to an ICC using make-icc or json2icc. However, dcamprof does not construct an ICC LUT from the dcp-derived-json file – you only get a matrix profile. I have specific DCPs that I’d like to snag the LookTable from to make into an ICC profile since Darktable does not (and does not seem to ever intend to) support DCPs.

dcamprof’s LUT format is very different, being based on the YUV color space, while the dcp format divides the HSV color space into segments of the hue wheel, saturation, and value. YUV is similar to LAB, with Y being a Luminance channel, U being a blue-green hue axis, and V being a red-green hue axis.

Below is a snippet of an actual dcamprof LUT.

“ChromaLUT1”: {
“compressFactor”: 0.8,
“regularization”: [ 0, 0, 0 ],
“uvL”: [ 0.251231, 0.502677, -0.00487878, 0.253645, …],
“uvU”: [ 0.251231, 0.502677, 0.0123759, 0.253645, … ],
“uvV”: [ 0.251231, 0.502677, 0.00908009, 0.253645, …]
}

Meanwhile, the LookTable in the json created from a dcp has the typical dcp format

“ProfileLookTable”: [
{ “HueDiv”: 0, “SatDiv”: 0, “ValDiv”: 0, “HueShift”: 0.000000, “SatScale”: 1.000000, “ValScale”: 1.000000 },
{ “HueDiv”: 0, “SatDiv”: 0, “ValDiv”: 1, “HueShift”: 42.461941, “SatScale”: 3.022016, “ValScale”: 1.000000 },
{ “HueDiv”: 0, “SatDiv”: 0, “ValDiv”: 2, “HueShift”: 17.916750, “SatScale”: 2.613974, “ValScale”: 1.000000 },
{ “HueDiv”: 0, “SatDiv”: 0, “ValDiv”: 3, “HueShift”: 17.860065, “SatScale”: 1.775180, “ValScale”: 1.000000 }, …

Does anyone know of a way to convert the LookTable to a dcamprof chroma lut, so I can create an ICC with the same look? I know dcamprof does not have this feature, but perhaps someone here knows a clever way to do it.

Perhaps ArgyllCMS?

I don’t think Argyll has that ability. I don’t see anything related to DCP / DNG Profiles in is online manual

Load the DCP in RT…use with an identity clut. Save it and apply as a lut in DT …might work

$ dcamprof make-icc -p xyzlut...   ??

I’ve recently used this with the -g parameter to have dcamprof calculate a gamut compression LUT from a cc24 target shot.

ooops. cat walked across keyboard and deleted my response!

What I am wanting to do is take a look table from a DCP with a subjective look and use it in an ICC profile for programs like darktable among others that lack DCP support.

So instead of the ICC make a lut from it…You can apply your DCP to an identity png file in RT and then export the png after applying the DCP file as a lut. You can use this lut in DT…in the end I think this should provide a similar result…

See this for the general idea
https://rawpedia.rawtherapee.com/Film_Simulation

1 Like

I had tried that initially, but for whatever reason when I load a DCP on anything other than a raw file in rawtherapee, the DCP just doesn’t do anything. I can disable and enable the tone curve, etc, and nothing changes. There also is no visible change when first applying the DCP. I’m running Rawtherapee version 5.8 on Windows 10

What type of file were you trying to load it over…pretty much everything else will have that information baked in no??