How do I use dcamprof to color match to the color target values?

I have a color checker passport and I wanted to create a camera profile that color match to the reference values in the color checker. That is if the white patch on the checker is 95% white, I wanted to match the white patch in my shot to 95%.

I’m using RawTherapee and I have followed the guide to create a tiff file of the color checker using the neutral profile. Also the color that I’m shooting may have larger gamut than sRGB, so should I set the “working profile” and “output profile” both to ProPhoto when saving the reference file?

Creating DCP profiles using DCamProf

Welcome to the forum. What you want is for no profile to be set for output; the working profile doesn’t matter here, but the output profile should not be set. You want the original camera colors and tone to go to the TIFF used by dcamprof to make the profile.

What dcamprof commands do I need to use? The one from the guide did not match to the reference brightness.

What parameter are you looking at for this? The ‘brightness’ you need is a function of camera exposure, and the key thing is that it not blow out the high values. I’ve underexposed for target shots and made acceptable profiles.

Color temperature of the illumination on the target is what’s important. You want the dcamprof -i parameter to match, it’s D65 by default, corresponding to a sunlit target.

Regarding commands, I just use the ones from this section of the documentation:

https://rawtherapee.com/mirror/dcamprof/dcamprof.html#workflow_icc

Here are the relevant ones, copy-pasted from the prose:

scanin -p -v -dipn target.tif ColorChecker.cht cc24_ref.cie
dcamprof make-profile -g cc24-layout.json new-target.ti3 profile.json
dcamprof make-icc -n "Camera manufacturer and model" profile.json profile.icc

I use them so much I made a bash script…

I think an RGB curve would be needed. But then when I checked the documentation, it said that they don’t do RGB curve in their profile making. So it’s a no go for dcamprof?

You can insert a “look” curve in the make-profile step, mentioned in the doc I linked earlier. Things is, I think you may need to make a matrix profile instead of a LUT one, so the color management system uses it…

I’m shooting to archive some color chips, so I need match them accordance to the absolute values on the color checker.

A LUT profile will get you closer, but you’ll not get an exact match. ‘-p xyzlut’ will put a LUT instead of a matrix for the color transform, but to get much better than the matrix you’ll need to use spectral data instead of the target shot for the camera measurement. What’s your camera make/model? I might have data…

‘-r reports’ will make a directory of that name and deposit a ton of metrics and other data, particularly deltaE differences between the patch reference values and what the profile will produce for each patch. It’ll also produce synthetic TIFFs showing the patch differences in actual color.

I use a Canon EOS R100.

Sadly, no joy. A rather new camera, not much opportunity yet for some crazy spectral data nut like me to get hold of one to measure.

A bit dodgy, but the data from another related Canon camera (24MP sensor… ??) could be used. The manufacturers tend to specify their CFA filters consistently; I’ve used my Nikon D7000 data to make a profile for my Z 6 and it worked okay. Really though, it’s best to measure the specific camera model.

If you’re interested in a close deltaE spectral data is the way to go. There are other benefits: no fiddley target shooting, you can make profiles for different illuminants with the same data, and you can use various training datasets to make profiles tailored to specific shooting, e.g., profiles trained with the Lippman 2000 skin tone dataset for portraits. An optical lab setup with a monochromator is the gold standard for measurement, but costly to assemble if you can’t borrow one (local university?). I measured my cameras with a simple spectroscope setup (wooden box with a diffraction grating on one end and a slit on the other, about $130US investment) and I was able to make profiles within about .1 max dE of monochromator-based profiles.

Cogitating after the last post, decided to retrieve and post the dE TIFFs for my D7000. First, the monochromator profile based on the rawtoaces project data:

patch-errors-DE_rawtoaces.tif (2.5 MB)

And, the spectroscope profile I measured with my wooden box:

patch-errors-DE_spectroscope.tif (2.5 MB)

I don’t know much about monochromator profile, how is it different from the color target + color matching method?

I don’t know if it’s relatable but I have tried the Colormunki Photo, Spectro 1 spectrophotometers and they both have problems with brighter/saturated color like pink and orange in my color chips.

I didn’t know jack about it about 4 years ago, then started working on an image where blue LED lighting was horribly posterized…

Long story short, simple matrix profiles based on a color target shot don’t usually handle extreme hues well, no information to inform pulling them into gamuts like sRGB with a bit of gradation. So, found out that you can make camera profiles with a LUT color transform replacing the matrix transform, and that LUT can be structured to do a better job with the extreme hues. But, informing that LUT with a simple 24-patch target shot doesn’t do much better than the 3x3 matrix of primaries.

Enter camera spectral data. Essentially, you measure the color filter array of the camera at the range of wavelengths comprising visible light. Since that filter array has three “channels”, so-called red, green and blue corresponding to high, medium, and low ranges of the visible spectrum, you’re measuring three values for, say, 10nm wavelength intervals between 380nm and 730nm. For my Nikon D7000, a lab measurement campaign by some smart people produced this data:

380,0.016100,0.032400,0.032200
385,0.012500,0.024700,0.027200
390,0.009000,0.017100,0.022100
395,0.007100,0.010000,0.016700
400,0.005200,0.002900,0.011200
405,0.004500,0.004500,0.019400
410,0.003800,0.006100,0.027600
415,0.024600,0.043100,0.237900
420,0.045400,0.080100,0.448300
425,0.052100,0.109800,0.598200
430,0.058700,0.139600,0.748000
435,0.055000,0.152200,0.791000
440,0.051200,0.164800,0.834000
445,0.044300,0.181000,0.873800
450,0.037400,0.197200,0.913600
455,0.035300,0.227500,0.933700
460,0.033300,0.257800,0.953700
465,0.036600,0.324000,0.942400
470,0.039900,0.390200,0.931000
475,0.041900,0.423600,0.897700
480,0.043900,0.457000,0.864400
485,0.042100,0.465400,0.801700
490,0.040300,0.473800,0.738900
495,0.041800,0.555100,0.619400
500,0.043400,0.636400,0.499900
505,0.049600,0.717700,0.417500
510,0.055700,0.798900,0.335100
515,0.070200,0.859500,0.278000
520,0.084700,0.920200,0.220900
525,0.096400,0.960100,0.188700
530,0.108100,1.000000,0.156500
535,0.084100,0.971300,0.127200
540,0.060100,0.942700,0.097900
545,0.047400,0.906800,0.079800
550,0.034600,0.871000,0.061700
555,0.036600,0.812000,0.045100
560,0.038600,0.753000,0.028400
565,0.071700,0.687100,0.022900
570,0.104800,0.621200,0.017300
575,0.254800,0.554300,0.014700
580,0.404900,0.487400,0.012000
585,0.570400,0.415500,0.010200
590,0.735900,0.343500,0.008300
595,0.720900,0.273000,0.006600
600,0.705800,0.202400,0.004900
605,0.648600,0.153100,0.004100
610,0.591400,0.103700,0.003200
615,0.538900,0.082300,0.003100
620,0.486400,0.060800,0.003000
625,0.439600,0.051600,0.003100
630,0.392900,0.042400,0.003200
635,0.358200,0.037800,0.003400
640,0.323600,0.033300,0.003600
645,0.281900,0.028100,0.004200
650,0.240200,0.022900,0.004700
655,0.209400,0.020500,0.004700
660,0.178600,0.018100,0.004800
665,0.138300,0.015300,0.004100
670,0.098100,0.012400,0.003400
675,0.064000,0.008800,0.002400
680,0.030000,0.005100,0.001400
685,0.018400,0.003300,0.001000
690,0.006800,0.001500,0.000700
695,0.004400,0.001300,0.000700
700,0.002000,0.001000,0.000700
705,0.001800,0.000800,0.000700
710,0.001600,0.000600,0.000600
715,0.001400,0.000600,0.000600
720,0.001200,0.000500,0.000600
725,0.001000,0.000500,0.000500
730,0.000900,0.000400,0.000500
735,0.000700,0.000300,0.000400
740,0.000600,0.000300,0.000300
745,0.000400,0.000200,0.000200
750,0.000200,0.000100,0.000100
755,0.000200,0.000100,0.000200
760,0.000200,0.000100,0.000200
765,0.000200,0.000100,0.000200
770,0.000200,0.000100,0.000200
775,0.000200,0.000200,0.000200
780,0.000200,0.000200,0.000200

Looks more interesting if you graph it:

Nikon_D7000

The beauty of this data is that dcamprof can use it instead of a target shot, particularly to inform a better LUT for the color transform.

But this is still going to fall back into the limit of dcamprof that it can only do the color transformation with no RGB curve?

With the -t parameter in either make-icc or make-dcp, you can supply a JSON-formatted tone curve that’ll take the image data out of linear. Format for the JSON is illustrated in data-examples/tone-curve.json.

I’m looking for the program to do it automatically, like Silverfast or 3D LUT Creator. They color matched the color target image to the reference values of the target in both brightness and color.

Ah, got it. Out of my wheelhouse…

There is a commercial version of dcam… lumariver. You can see much of the capability visually here… dcam should be able to do pretty much all of this but you just need to master the command line…

You can see it Martin’s video example with capture 1… lightness and color are matched… you just have to know how the raw software you use applies any tone curve…

If you don’t pay for this version well then of course you need to workout the command line workflow…

The second video was not matching the brightness to the color target, he did not create the curve using the color target. He was using the curve from one of Capture One’s profile and he was matching the brightness to what was shown in Capture One.

Now, matching manipulating the tone (“brightness”?) and color are two distinct things. Which are you after?