Thursday, August 03, 2023

RawTherapee Color Management ~ a problem

Colors between identical scenes taken with different cameras vary from sensor to sensor.

I first noticed this when comparing the RAW file output of a Sony A7S to a Sony A7R.  The A7S was visibly "cooler" looking on my Linux-based RawTherapee system.  I had _assumed_ that colors were being correctly managed by the software and that what I was seeing was differences between the sensors.

This color difference therefore puzzled me as I thought a Sony sensor was a Sony sensor and the colors and luminance would match across their product line.  The software wouldn't need to do much, and if it did, there certainly would've been a decent correction applied.

Years ago when working with Canon 5D MkII RAW files that I made in the studio I could see they were visibly redder when selecting "Flash" color temperatures using Canon software than when I set the color temperature to 5500Kelvin (which is the temperature where many flash units operate).  Canon had made a color choice and I assumed (there's that word again) that all that had been baked into the system and was somehow "correct" by the manufacturer's standards.

For years I've read where one sensor gave a beautiful rendition that others couldn't match.  There's been a long and hairy discussion over the years about Sony's "color science" compared with Canon's.  Some fanboys adore Canon, while others point out certain strengths in Sony "color science."

I felt Sony cameras dealt with this out of the box "color science" much much better than Canon.  Honestly, I don't think all that much of Canon's often vaunted "color science."  I thought Sony and Nikon do a better job out of the box.  Well, it's actually not that easy and the babbling brawling masses who've taken it upon themselves to comment at length on the topic are, well, under-informed.

Recently I noticed subtle color and luminance variations between my various Sony cameras, such as between the early NEX-5T, NEX-7, A7 and the more recent A6000 and A6300.  It was never anything that stopped me from doing what I do, but it is something I noticed and wondered about.

Digging around a bit I had the opportunity to learn a lot.  For instance, there is no standard for colors and luminance.  It's up to the hardware and software designers to decide how to handle these things.  Image processing software does its best to make things look "good."

One of the ways Photoshop and Lightroom have done this is to take a known set of colors (think XRite, Panatone, etc) and to tune an image to match the colors in a chart.  The result is written to a file that is then referred to in the software's Color Management System.  The file type is specified as .dcp

In my case, I use OSS applications and rely heavily on RawTherapee for my RAW file processing.  It uses the .dcp filetype to tune the colors of an image.  So, in concept, RawTherapee could come with .dcp files from Adobe (assuming there are no sharing restrictions) and all the colors should be the same between the various sensors and camera models.

Interestingly, RawTherapee implements a broader set of color management specifications than does Adobe.  RawTherapee comes with three additional features that can be specified in a .dcp.  One is something called dual luminant.  Another is a lookup table the fine tunes colors.  A third is the specification of a luminance curve.  

The look-up table and curves capabilities should be self-explanatory.  The difficult sounding dual luminant spec, it turns out, is pretty easy to understand.  All it is the inclusion of two color management specs, one for daylight and the other for tungsten color temperatures.  It turns out that different sensors react differently to variations in color temperature.  The dual luminant specification allows color management software to more accurately place colors by interpolating color information using two color temperatures.

With these additional capabilities, RawTherapee could, if properly configured with all the right .dcp files, be more color accurate than the industry standard Lightroom and Photoshop applications.

So, what's the problem?  The Sony sensors I have vary from model to model in what I assumed (ack! that word again!!) was a fully color managed software.  To confirm this I went looking for the .dcp file list to see which cameras my version of RawTherapee supported.

On my system, .dcp files are in the following directory - 

/var/lib/flatpak/app/com.rawtherapee.RawTherapee/current/active/files/share/rawtherapee/dcpprofiles

Scanning the list I saw that several of my Sony cameras were not in the directory.  Specifically, there is no file for the NEX-7, nor the NEX-5T, nor the A5000, or, surprisingly, the Sony A7 (generation one) cameras.  This, then, pointed to the subtle color variance I was seeing.  It also explained how the old Canon 5D MkII and Canon 7D images looks differently from my Sony files.

The question quickly became, how do I solve the problem?  Can I find .dcp files pre-made that I could copy directly into RawTherapee?  If not easily acquired, how do I create them?  

Here are the topics for the next RawTherapee Color Management blog entry.  

Stay tuned.


les jardins Marqueyssac ~ Perigord Noir 2023

 

Resources -

Adobe Color Management System

RawTherapee Color Management System

How to get LCP and DCP files into RawTherapee

No comments: