Calibrating images with colorchecker reference

calibrate images colorchecker

If you shooting for texture reference or lighting acquisition (hdri), you may want to keep your images  as “raw” as possible. This means keeping your images linear and the colors/exposure correct. In this post we discuss a basic workflow for calibrating raw images with colorchecker reference, using Nuke.

Shoot RAW

The first step is to shoot your images in RAW mode, this way you have always more control and range over your colors, and there’s no gamma curves or compression to compromise your final result.

Processing RAW images

Since we can’t open by default a RAW image in Nuke, we need to use a raw converter to create a 16bit Tiff. You have several options here, convert using the camera software that comes with your camera (for canon Digital Photo Professional), Photoshop, Lightroom, etc. But there’s also another option that some softwares like PTGUI uses, DCRAW.

So for comparisson we will use photoshop and dcraw. In photoshop make sure you keep the image curve linear (may default to medium contrast preset).

photoshop linear image

For dcraw you will need to download and install it, you can copy the .exe file to your c drive root or add the path to your environment variables.

dcraw linear tiff

After that open the command line or powershell, navigate to your image folder (ex: cd imagePath) and then use this command:


    dcraw -v -w -H 1 -o 0 -q 3 -4 -T IMG_1735.CR2

# This will output a 16bit linear Tiff

Basically we are telling dcraw to output a linear 16bit tiff, there’s some other variables like highlight uncliping that you may want to use. For a completye reference read here.

Calibrating colors in Nuke

In order to calibrate the colors without manually grading or color correcting we will use a Nuke gizmo called mmColorTarget, you can read about it here and download from nukepedia. Read the install info and requirements on that page.

mm color target nuke

Now create a mmColorTarget node and connect your image as source. Align the source points like a corner pin to your colorchecker. You can increase the sample size, to average more the colors.

nuke calibrate colors

In this case we won’t use a target image, instead check the box “Use Reference Values as Target“, this option uses the colorchecker original colors as target. The final step is to press the magic button Calculate Matrix. This will do some color transformations to your image in order to match as close as possible to the true colors of the color chart.

Dcraw linear vs Photoshop linear

dcraw vs photoshop raw

The final step is to compare the results of the dcraw and photoshop linear tiff’s. After some tests on different images there’s definitely a pattern:

dcraw nuke

It’s obvious that dcraw is giving us a better linear tiff than photoshop. If you have a look at the greyscale samples which most of the times is what we need to match when lighting with hdri’s, the photoshop tiffs are not even closer to the dcraw result. This still needs some further experiments, and I would like to know about your own workflows, leave a comment below.

Thanks for reading!