DCamProf, open-source camera profiling laboratory

0
886

Following the release of the latest versions of RawTherapee, we are gradually seeing how we begin to have access to very high-quality open-source tools for digital image processing. Especially for those of us dedicated to scientific imaging, rather than seeking creativity.

However, for tasks related to color management, although we have had ArgyllCMS for many years, something similar was lacking for the development and design of camera profiles (Adobe DNG Camera Profiles). These, although an invention of Adobe, are nowadays supported by other free software tools such as RawTherapee.

It should be remembered that ArgyllCMS is a color management suite exclusively oriented towards the International Color Consortium world, but aside from its application to printers and displays, much of digital production is done with DSLRs and not scanners, so it is not especially interesting for color management during raw development, unless we use ICC profiles.

To address those DSLR users and free software enthusiasts, especially in digital and scientific imaging research, Anders Torger from Sweden provides us with a fabulous utility called DCamProf. That is, a complete tool for designing, analyzing, and creating DCP camera profiles.

Installation of DCamProf

DCamProf is distributed exclusively as source code, meaning it must be compiled. So far on Mac OS it has given me some headaches that I have not yet solved; fortunately, Howard Moftich maintains a precompiled version for Mac. On Linux, its compilation is very simple:

On one hand, ensure that libtiff5-dev and liblcms2-dev are already installed, and then a simple “make” in the root directory with our source code is enough to compile everything without problems; this will produce a binary called dcamprof that we can save wherever we prefer or perform a “make install”.

Usage of DCamProf

One of DCamProf’s features is that it can work with camera characterization functions or Spectral Sensitivity Functions (SSFs); however, this type of characterization requires complex equipment, and the most common approach is to start from an image of a simple color chart such as Colorchecker.

To extract colorimetric data from an image, DCamProf must use Scanin from ArgyllCMS, so we also need ArgyllCMS installed on our system.

The workflow with DCamProf would be as follows:

1º Take a test image of our color chart

2º Develop our image. For this, the author proposes simply using DCRAW to create an image without white balance, color management, or gamma correction:

dcraw -v -r 1 1 1 1 -o 0 -H 0 -T -W -g 1 1 _DSC6257.NEF

This step is quite critical, as we will start from a TIFF and not a DNG as is usual in these processes. If we introduce any type of adjustment such as contrast or color management in this development, our camera characterization will no longer be representative. Therefore, it is highly recommended to use DCRAW or RawTherapee to create a truly reliable characterization image.

3º Extract the colorimetry of said chart with the command:

scanin -v -dipn  _DSC6257.tiff ColorChecker.cht cc24_ref.cie

Remember that scanin must be given the description map of our chart (ColorChecker.cht), which comes with ArgyllCMS, and the reference file of that chart (cc24_ref.cie), which in this case comes with DCamProf or also with ArgyllCMS.

Scanin will produce a file of the type .ti3 with the colorimetry of the chart and the colorimetry of the image.

4.- Create the camera profile with DCamProf. In this first phase, the information from the Ti3 file is computed into a JSON file that we can review and edit manually if necessary.

dcamprof make-profile _DSC6257.ti3 profile.json

5º.- And finally, compile our JSON file into a DCP

dcamprof make-dcp -n "Nikon D90” -d "D90-Profile" profile.json profile.dcp

This ultimately produces a .dcp file valid for use in Adobe Camera Raw, Lightroom, or RawTherapee without needing to resort to the typical X-Rite or Adobe tools only implemented for Mac and Windows and quite limited in terms of editing a camera profile.

Finally, if we want to check the accuracy of our process on an image, we can use:

dcamprof test-profile _DSC123.ti3 profile.json

Where _DSC123.ti3 is the colorimetry of the image to analyze and profile.json is our camera profile. This generates a detailed Delta report that provides information about the margins of error committed.

Conclusions

Although designing a camera profile with these 4 steps is highly straightforward, DCamProf has numerous tools to refine our camera profiles, which we will test in successive articles; among them, I initially highlight:

a.- The possibility of applying weighting concepts when designing our LUTs, that is, giving more weight to certain color sets over others in order to achieve greater precision in certain regions of the spectrum.

b.- The possibility of working with tone curves within camera profiles. The author himself dedicates several chapters within the tool’s documentation to highlighting the significance and paradoxes of using tone curves during raw development, as well as the possibility of creating profiles with linear curves or the characteristic ACR curve.

c.- The possibility of integrating exposure correction factors within a camera profile

Regarding profile design, we have a multitude of parameters to optimize LUTs, introduce the spectra of our illuminants, and a long list of possibilities to refine and specify our camera profiles.