Is it possible to tweak ColorMatrix in DNG to get a certain style?

I’m trying to play with the ColorMatrix1 and ColorMatrix2 in the DNG.

Modifying them does affect how it’s rendered, but I cannot find a pattern to get the result I want.

Even after reading the PDF spec, I still get no clue…

Anyone knows how it works?

I don’t use DNG but you can think of changing a 3x3 matrix as being similar to changing a three-channel color mixer in most editors.

This matrix does nothing, what goes in comes out.
1 0 0
0 1 0
0 0 1

This one swaps red and blue

0 0 1
0 1 0
1 0 0

1 Like

Would this help you to get the look you want…

1 Like

I think the easiest way to mung a DCP is to use command-line dcamprof, or its GUI sister Lumariver. Anders give you a number of parameters to confidently modify the “look” delivered by the profile.

1 Like

The purpose of those matrices is to get the colors into a more-or-less standard color space.

For aesthetic purposes, I would proceed from there, eg use the color calibration module in Darktable. If you dial in your look (in a separate instance, preferably after using the same module for WB), you can save that as a preset.

(Also, note that in the Play Raw category, people usually post a raw file for others to edit.)

1 Like

Thank you for the info provided, but i don’t know which category should i put this post in.

I changed it to “processing”.

1 Like

I knew, but for example, let’s increase the 5th value of both the CM1 and the CM2.

The result photo won’t increase the GREEN saturation as it should be.

That’s why I cannot get understand how to tweak the ColorMatrix to reach a specific target.

Thank you, i’ve installed the dcamprof, it’s too powerful and i’m still trying to check if it support to mod the ColorMatrix only to reach my target.

To get more green, you can increase the 4th and sixth values.

Original:

More green:

In RawTherapee, increasing the green slider (equivalent of the 5th value) does put more green into the review image, much like the above.

You might find this of interest - some three-channel mixer examples to achieve a particular effect:

In case you don’t already have the dcamprof docs:

https://rawtherapee.com/mirror/dcamprof/dcamprof.html
https://rawtherapee.com/mirror/dcamprof/camera-profiling.html

A relevant quite from the second link:

" DCamProf actually makes three matrices, one “ColorMatrix” which is only used for light temperature estimation (that is no real color reproduction), one “LUTMatrix” which is a technical matrix only used for avoiding clipping in a DNG pipeline. You don’t need to care about those two, just look at the “ForwardMatrix”, it’s that that is the matrix."

1 Like

It might also be useful to peruse this:

https://rawtherapee.com/mirror/dcamprof/camera-profiling.html#subjective_look

Yes, dcamprof is a bit obtuse. Anders Torger, its author, wrote a GUI shell around the dcamprof engine, called Lumariver. It costs money, but it would probably be a better way for you to address your need without having to learn command line switches.

While its not a matrix adjustment in the sense of directly tweaking the numbers I get a sense that the free profile editor provided by Adobe, will likely do what the OP wants visually and quite easily esp is a color chart is used as the source image…but I could be wrong…

1 Like

So, to directly respond to the thread title, I’d say yes, if you want very slight color changes due to a slightly different matrix for the computed color temperature. Note that a lot of us use the D65 matrix for our camera in (insert favorite FOSS software) no matter what color temperature was the light, and we don’t notice a deficiency.

If one wants to tweak the matrix (ForwardMatrix, in DCP-land), the dcamprof options allow a bit more intuitive control than just changing the numbers around, albeit command-line obtuse. And, obtuse themselves, as controlling color is not a straightforward task.

I don’t know the Adobe profile editor, so I can’t help with asserting its appropriateness. Can’t be bad, after all it’s Adobe… :crazy_face:

Going from Robyn’s video I linked above…its really easy to use and powerful…when I say visual…you are making changes in real time that you can later apply and you can see all the shifts on the color wheel… this might be easier for someone out of the gate…

You can edit the curve in the profile.


the primaries and wb

And samples from the image

Each can be tweaked…

And you can show the scope of what gets adjusted…

And you could use a color chart to target patches

2 Likes

Excellent tutorial, Todd!

Yes, I also can achieve this with channel mixer, but if I directly mod the ColorMatrix data in the DNG, it fails to look like the result from channel mixer.

I know DNG profile editor is very useful, but I only have mac on my hand currently.

Adobe seems to stop providing the standalone DNG profile editor…

Do i have to subscribe the Adobe Lightroom to access the app?

Looks like I can not help further as I never use DNG and can only offer general advice. Sorry.