Dual-illuminant camera profiles without DCP in darktable

I find that darktable’s single-illuminant approach to camera calibration is hugely impractical as it requires a camera calibration per lighting condition. I don’t do my shooting in a few controlled environments so I can’t realistically create a profile for the range of lighting conditions I face and the cameras I have.

The dual-illuminant DCP profiles that Adobe and RawTherapee uses solves this problem by only needing two measurements per camera which it interpolates (?) between. It worked very well for me in Adobe land.

I know that darktable is ICC, not DCP based. But, would it not be possible to extend the color calibration module to be able to take measurements from two lighting conditions and to interpolate between these in a similar fashion to the DCP approach? Such a feature would be a dream come true and I can’t seem to shake this idea, hence my post. :slight_smile:

I know that single single-illuminant profiles are technically more accurate. But the motivator for me to calibrate my cameras is not primarily to achieve the ultimate color accuracy, but to normalize color rendition between cameras. I don’t want my Sony raw file colors to look completely different from my Fujifilm and Canon raw files. It makes my editing a lot more complicated than it needs to be.

And when it comes to color accuracy I’d rather have a good (dual-illuminant) profile that works for most lighting conditions than a (single-illuminant) profile that is near-perfect for one lighting condition but lacking (or unusable) for the rest.

I don’t think it’d be quite that easy. Why not shoot a color target if you’re that worried? Then you could be absolutely sure.

I’m curious - you have demonstrated color consistency from the Adobe products with respect to your various cameras? I’ll say I’m not a fan of dual-illuminant interpolation based on what I know about divining color temperatures after-the-fact, but that’s only a feeling. I’d like to have that feeling substantiated or trounced by objective demonstration…

You are not alone! I greatly prefer specific WB presets plus intelligent adjustments (mine) if considered necessary.

You might find this of interest:

http://kronometric.org/phot/color/Not%20all%20white%20balances%20are%20created%20equal%20-%20X3%20magazine.htm

Thing is, there are two corrections going on in white balance: 1) the illuminant, and 2) the uneven spectral response of the camera. Adjusting for temperature doesn’t take into account the latter.

The technique for normalizing color between multiple cameras involves constructing a LUT from a ColorChecker target shot for each camera to slew to one of the cameras designated the baseline:

https://www.youtube.com/watch?v=6er_PI8XqvI

Shoot a color target in every new lighting situation? Sure, that would work for a photo session, but I always have a camera around my neck and I shoot throughout the day, every day. It would obviously not be a practical approach for many types of photography.

Also, how would I go about applying the “take a new ColorChecker picture in every scene” to my raw archive spanning 23 years back? I can’t travel back in time. :slight_smile: Many photographers work by creating new series and bodies of work by mixing old and new. If there was support for dual-illumination support I could create new profiles today and use them retroactively. That’s one of the greatest strengths of dual-illumination profiling as I see it. I’ll try to remember to take two colorchecker pictures with a camera before I sell it, so I can apply this process if support ever comes to darktable or if I switch to a raw converter with support for dual illuminants.

Yes, I used this process to create the profiles and I found that it worked great for normalizing colors between cameras. I don’t want a “Sony look” or “Canon look”, I want a common look for all my cameras as a starting point. I can then apply the same style of processing to all images, instead of trying to develop different tweaks for different cameras, fighting their individual color quirks.

The fact that raw converters usually don’t care about normalizing the output of different cameras is the reason that even raw shooters buy cameras based on their “color science”. It doesn’t have to be this way. :slight_smile:

You may want to check the following open issue in GitHub:

1 Like

I’m sort of curious if people think this standard will get traction and is it something that might be easier to integrate into DT…

Do you have an image comparison between, say, D65 profiles and dual-illuminant ones? I spec D65, because that’s the convention established by David Coffin of dcraw fame, extended to most collections of camera matrices used by all the FOSS software I know and probably a lot of commercial offerings. I’m looking for a real comparative dataset of some sort, dE measurements at best, but I’m willing to consider just poking around image renditions…

Here’s the thing: just using a dual-illuminant profile for each camera is only going to adjust color for the divined illuminant, not for any individual camera’s spectral response. To really normalize cameras to a specific color response requires picking an arbitrary reference and developing “skew” LUTs to pull the individual cameras to that reference. All of the techniques I’ve seen to do this choose one of the cameras as the reference…

Could you possibly make a LUT for each camera type that aligns to the Adobe Standard DCP or something along those lines? Eg, extract the lookup table part of the DCP.

Someone asked just that at one time…

Color calibration would not be the place to add this, as it doesn’t work with profiles at all. Instead it takes D65 input and applies a chromatic adaptation transform, which is, roughly speaking, a more accurate white balance. To what extent the CC algorithms relies on the input being D65, I don’t know, but it specifically always uses (how?) the standard matrix in input color profile “for consistency” even if another profile is chosen.

If dual illuminant (DI) profiles were to be supported, it would have to be in input color profile and probably white balance as well (if I understand things correctly).

Whether CC would benefit from DI profiles is an open question that I have yet to see an answer to, although some have suggested that it would (but without going into any detail how).

Have you tried creating custom WB coeffs, as described in this video?

That should at least get you consistent white balance output.

Do DI profiles actually provide enough correction to achieve that?

That seems to be specific to Sigma’s software and its quirks.

I actually proposed a possible solution, that would work with color calibration, in this thread: Create ICC or DCP Profile with costum linear Matrix
But I don’t think he ever made a feature request.

Sigma converts the camera raw to XYZ. Then, in meta-data, the WB presets are supplied as 3x3 correction matrices, still in XYZ space. Transformation to RGB comes later.

I’m wondering what’s quirky about that …

The firs step is straightforward, the essence of ICC transforms. The second step is novel, performing white balance as a chromatic transform rather than the oh-so-coarse per-channel multiplication. Actually, I found you can do WB chromatically with a ICC camera profile, just don’t white-balance the target shot prior to making the profile. Not sure specifically how it works, but it does…

With later Sigma models, the cam-to-XYZ step disappeared from the meta-data becoming swallowed up by color modes and other stuff. I still have a utility written by CEZEO Printing that shows a 3x3 transform for cam-to-RGB which you could edit prior to conversion to RGB, a la 3-channel color mixer but with numbers not sliders.

1 Like

I came across this…

1 Like

Wow, a python program I actually want… :laughing:

2 Likes