Saturday, August 05, 2023

RawTherapee Color Management ~ looking for solutions to a problem

Opening Comment: In talking with a friend, I realize I should mention how narrowly defined this color management problem and solution are.  I've limited myself to trying to get the colors to match between cameras with different sensors at the initial stage of image processing.  I have done _nothing_ to address the issues of display to display, nor display to print color variations.  Those two topics are equally thorny and well beyond the scope of this series of blog entries.

I use RawTherapee to convert SONY RAW and to do most of the image processing "heavy lifting".  

The software became my preferred image processing application after years of hoping the good people at the Gimp could expand the color space and add RAW support on file open.  A few years ago they successfully expanded the color space (up to 32bit floating-point), but continue to recommend using RawTherapee to open and convert RAW files.

Among many many wonderful features, RawTherapee comes with a very powerful Color Management system.  It uses single and dual luminant .dcp files, has a "Curves" option and an additional "Lookup Table" that can, when available, further refine image colors.  There is a default color scheme for cameras that aren't directly supported.

To recap, .dcp files are used to take whatever information the sensor stores for colors and luminosity and modifies them to a reference set of colors and luminances.  It's like using a well controlled set of "offsets" to go from the sensor colors in a RAW file to something that matches reality.  In this way, the colors across different sensors, camera models, and camera manufacturers can be corrected and matched.

My color management problems are several fold.

I do not use Adobe products.  They cost too much for not much additional benefit.  LightRoom and PhotoShop both use .dcp color management configuration files, which could be of benefit.  Adobe has to keep up with all the latest/greatest imaging devices so they tend to provide color management support as soon as cameras are available.  

On the downside, Adobe provides _single_ luminant .dcp support, only.  As we'll recall, single luminant .dcp files provide sensor corrections for daylight color temperatures only.  So the further a scene's color temperature wanders from 5500 to 5700 kelvin, the greater the chance that the .dcp file "offset" information is not as accurate as it could be.

Dual luminant capable RawTherapee can use files that specify color "offsets" at daylight and tungsten Kelvin temperature values.  These specify more accurate color "offsets" across a broader range of white balance temperatures.  Having two points on a slope is more accurate than having just one.

But, and this is my second problem, it turns out that RawTherapee does not come with as complete a set of .dcp files as Adobe products.  In my case, the Sony A7, NEX-7, NEX-5T, and A5000 cameras are not supported with their own .dcp files.  These cameras default to something called "Camera Standard."  "Camera Standard" is a generalized color "offset" corrector that attempts to make things "better" without knowing what a specific sensor requires.  Close, perhaps, but not "spot on" accurate.

There are at least two ways to resolve the .dcp RawTherapee problem  One would be to borrow the Adobe files.  I can't find an online resource for them, so that's completely out. The other solution would be to make them myself.  Fortunately someone posted a nice set of instructions on how to do this.

I followed the outline of the process.  The details are a bit different as the software listed have been updated.  Further, I tried doing all this using Wine on Linux, but failed.  So... here is specifically what I did.

Starting with an old Windows 7 box:

1) .dcp file generation requires two applications, Adobe DNG Converter and ColorChecker Camera Calibration.

  • Search for and download Adobe DNG Converter from Adobe's website
  • Install Adobe DNG Converter
  • Search for and download ColorChecker Camera Calibration software from XRite's website
  • Install ColorChecker Camera Calibration software

2) Downloading RAW files with XRite color chart embedded.

Repeat for the cameras you want to ultimately create .dcp files for.

3) .dcp file creation

  • Open Adobe DNG Converter
  • Select the directory the RAW file(s) is(are) downloaded to
  • Create DNG file(s)
  • Open ColorChecker Camera Calibration
  • Drag and drop one of the DNG files just created
  • Run "Create Profile" being sure to select an output directory you know how to get to

Repeat this for as many times as there are .dng files.

4) Write the .dcp file(s) somewhere/somehow that can be read by Linux.  Because I'm an Old Fart I used a thumb-drive.  You can just as easily send it to yourself as an email attachment or upload it somewhere on a cloud-drive.

Moving to Linux and RawTherapee -

  • Copy the .dcp file(s) to a location in the Linux file system that you can easily access (ie: easily remember where it is so you can grab the correct file when the time comes).
     
  • Open RawTherapee
  • Open desired image file
  • Click on "Color" tab (commonly found between "Detail" and "Advanced" tabs)
  • Scroll down to "Color Management"
  • Select "Custom"
  • Click on "Select your own DCP..." box what has a directory symbol on the right edge
  • Navigate the directory structure of your system and select the .dcp file for the camera that made the image

To confirm that the colors are indeed changing, you can click back and forth between "Custom" and "Camera Standard."  The differences may be subtle. 

What this implies is that for cameras that don't have out of the box .dcp support in RawTherapee, you'll need to specify the correct color management file each time you load images from the unsupported camera.

There are, of course, ways of making this easier to set up.  If you don't already know how to use the various image settings management tools, let me know and I'll try and point you in the right direction.

Which leaves us with one last question.  Does all this Monkey Motion yield better color correlated images?  That will be the topic of the next post.

 

la traversee de Paris estivale ~ 2023

 

Resources -

Adobe Color Management System

RawTherapee Color Management System

How to get LCP and DCP files into RawTherapee

 

No comments: