Hi, I’m trying to work out a workflow and it feels like I’m banging my head against a brick wall every time I revisit this.
In my industry, there’s a regular need to take photos for record keeping, archival reasons, and information sharing. Accurate colour capture is important a lot of the time, and it’s essentially an industry standard to take photos with four-panel colour checkers like these:
I have worked in RAW for a long time, and I’m comfortable with the workflow required for a 24 or 48 panel colour checker, but I’ve found a backlog of unprocessed RAW photos at my current company where, it turns out, no one at the company knows how to process RAW photos. They just use the camera JPEG outputs.
I have not corrected colour from a four-panel colour checker before, and I cannot find any information on using them for colour correction. With a 24/48 panel checker in Darktable, it’s easy as there are built-in workflows; but I can’t find any way to pick a known colour, indicate a specific colour value, and calibrate around that.
I have the CMYK values of the cards used, and have converted them to the RGB and hex values. But I cannot work out a way to calibrate the colour using these cards other than by eye.
N.B. I am not referring to white balance correction with the grey patch; I am specifically interested in colour calibration from the r/y/g/b panels.
Welcome to the forum.
I’m not really in a position to say much about this, but the spot color mapping in the color calibration apparently accepts direct input in Lch - darktable 4.4 user manual - color calibration (about halfway down this page).
The problem I see is that this will only work on one color at a time - i.e. it will try to match one of your four colors with disregard for the rest… not much help probably.
I’m not sure the values from something like that are rock solid so I would use a tool and just open the vectorscope and draw a selection over the 4 patches and then rotate the hues so that red green blue and yellow line up in the vector scope… this is a common thing done in video… often a hue vs hue tool is used but the new primaries curve and or channel mixer could likely easily do it… THere is hue rotation in color balance but you might need 4 instances for that…
Hi @paperdigits, my counterpoint to that would be that non-standard colour checkers have a range of uses in scientific applications. A great example - and the closest similarity I can find (though I still can’t find any information on their workflow and approach) is the various designs of colour calibration target used on NASA’s Mars rovers, like this one and this one. Note especially that the first one featured in the first link has four colours, two grey values, and white and black - only one more value (and a grey value at that) than the card above. The one in the second link has just six panels, one of which is specifically for IR wavelengths anyway. I’ve also found a few medical studies that use other configurations of up to nine colours to good effect.
They’re a seemingly common tool across a range of scientific disciplines, but I’m struggling to find any examples of workflows for handling them. 24/48 colour calibration would be my preference, and in my wheelhouse, but since this is data I didn’t produce I had no say in it.
@rvietor I don’t know 100% for a fact that they’re meant to be used for calibration/profiling, but everyone I’ve spoken to believes that’s what they’re for, and the NASA examples above would seem to corroborate that.
As I read the article from planetary.org, those targets are used with a calibrated system to account for environmental variations.
If those raw images you have to process are taken under standardised conditions, and the system to acquire them is still in use, the easiest solution might be to get a shot from a 24 or 48 panel colour checker, get a profile from that shot, and then use that profile. Then use the 4-patch chart to check in the individual images.
With only 4-7 patches, you just don’t have enough information to create a reliable profile, unless you assume linear responses for each colour channel. Then you’d need at least 5, and probably 7 data points:
a camera offset (zero point) for each colour channel
a slope for each colour channel, but you may be able to just use R/G and B/G values
where A and c have 12 degrees of freedom, -1 if you adjust exposure to taste later. c in Darktable is usually taken care of in the camera profile, leaving A 9-1 df, so you need at least as many color swatches.
But in practice, way more because of noise. 24 is the practical minimum.
@rvietor and @Tamas_Papp thank you for such informative answers. So, if I understand right, the four-panel swatch on the scale card above should be used with a calibrated system and it can then be used to check, in post, that the colour values are correct - but not to adjust them? What does calibration entail in DSLR photography in this sense?
I have been pushing for ages for broader internal adoption of 24-panel colour checkers, at least in a lab setting and in a specific set of field settings where colour is important too, so hopefully this gives some more weight to my argument.
This all depends on what you know (control, assume) about your light source and the camera, the spectrum of your light source, the colors you are photographing (do any of them have a very narrow spectrum that has only partial overlap with the light source? this can happen with led-based lights not intended for photography) and how much you care about color reproduction.
Of course every single calibrated swatch adds some information. You could project into a subspace with some norm and minimize that… but you have to be very careful since (because of noise, etc) the system can be very ill-conditioned and you could easily end up with worse colors than simply doing nothing. I would not pursue this.
Given how cheap you can get a 24-swatch color checker, I think the most efficient use of your (and your coworker’s) time would be to just use one. Eg every time you photograph a bunch of objects, take a shot first for a specific camera and a specific light, then make a preset and apply that to all photos.
In darktable, you can just use a feature in the color calibration module, to create a module preset that’s correct for that camera under certain lighting conditions, as @Tamas_Papp mentioned.
Or more universally, you can create ICC profiles that can be used as input profiles in darktable or other software, although even these can need differences depending what software will be using them. I have used Lumariver profile creator, which is a paid version of the opensource DCamProf software, to create profiles for my main cameras. Incidentally, the Lumariver website has some quite good explanations on how it’s done and how it works…
Edit: There’s not much difference, technically speaking between these two methods - the all-in-dt approach has the benefit of being able to make new presets “on the fly” as it were, if you just take a snap of your colour checker whenever you end up with a new light source. It’s detailed fairly well in the darktable manual, in that page I linked above. Does need careful reading though…
Here is my question and I am happy to be shot down in flames by more knowledgeable people. If you matched the grey patch to neutral grey would not the other colors set themselves correctly? This seems to be the principle used in set a manual white balance in cameras. Yes I appreciate that color saturation would also come into play to get the correct ‘vibrancy’ to the colors.
So the images are already taken using this card? Did the team use different cards (ordered at different dates, kept in different location)?
Calibrations in general need a repeatable and traceable standard. If the images are taken using different cards, then you introduce an error (in this case color error), when you use card A vs card B. Card A could be from a different lot of cards with slightly different colors than B OR someone forgot about it in the car and it was exposed to UV light for some time, OR it is a 3 year card and the plastic degraded or the color degrade (they proudly describe the card as biodegradable) OR the card has dirt… I think you get the point. Unless the cards are controlled, old ones thrown away, you might not get consistent results.