Color 'Round Linux

To content | To menu | To search

Monday, January 8 2007

IO Files Settings Advanced Options: How to get the most out of your pictures?

After an introduction to a full workflow using Digikam for processing RAW pictures, it is time to have a closer look at the various advanced options the IO Files Settings has to offer. To open the IO Files Settings, go to the Configuration > Digikam Configuration > IO Files tab.

Highlights

Default is here to consider highlights (read: part of your pictures that are burned due to the inability of your camera to capture the highlights) as plain / solid white (solid white option). You can get some fancy results with the Unclip option which will paint the hightlights in various pinks. At last you can try to consider recovering some parts of the missing information from the hightlights (reconstruct option).

This is possible because the blue pixels tends to saturate less quickly than the greens and the reds. Digikam/Dcraw will try to reconstruct the missing green and red colors from the remaining none saturated blue pixels. Of course here everything is a question of tradeoff between how much color or white you want.

If you select reconstruct as the option, you will be given the choice to set a level. A value of 3 is a compromize and can/should be adapted on a per picture basis. Given my (limited) experience these past 3 months, 3 gives good results most of the time. A small warning here, for the few curious that have read the man pages of Dcraw, the author says that 5 is the compromize, 0 is solid white and 1 unclip. This is because in Digikam 0 and 1 are the "solid white" and "unclip" options in the drop down menu (if you select these, the level slider will be grayed out). Therefore, the slider in Digikam with the "reconstruct" option will let you choose between 0 to 7 (instead of 0 to 9 in Dcraw command line) where 3 is the compromise instead of 5 in "native" Dcraw command line tool.

Set the luminosity to your taste, you probably need to go a little higher than the default 1. But this can be adjusted later with the image options in the Digikam image editor. Given the cost in time for demosaicing, I would be relatively conservative here.

Quality

This is an interesting part, because we are going to set which algorithm will be used to demosaice our RAW pictures. Wikipedia has a very good article on what is demosaicing, briefly, as set in the introduction of the article:
A demosaicing algorithm is a digital image process used to interpolate a complete image from the partial raw data received from the color-filtered image sensor internal to many digital cameras in form of a matrix of colored pixels. Also known as CFA interpolation or color reconstruction.

Digikam and Dcraw offer us three alternatives: bilinear, VNG interpolation, AHD interpolation. Which one is the best? It seems that AHD interpolation (for Adaptive Homogeneity-Directed) is the best choice for quality according to some test that I have performed and the paper of the person that implemented it. VNG interpolation (Variable Number of Gradients) was the first algorithm used by Dcraw but suffers from color artifacts (to understand how color artifacts appears on the edge of a picture depending on the demosaicing algorithm you use, you can have a look at this explanation). Bilinear is interesting if you are looking for speed with a acceptable result (if you would like for instance to print your image in a small format, or for the web).

Interpolate RGB as four colors

If your pictures suffers from patterns (mazes, grids, etc.), if the automatic color balance didn't improve anything, you may try to set this option to on.

Enable Noise Reduction

While demosaicing your picture, you can also ask Digikam / Dcraw to perform a noise reduction. This option apply a noise reduction algorithm while your picture is in CIE Lab color space. Because the noise is only applied to the Luminosity layer (the "L" of the Lab), it is said to not blurr your picture as traditional noise reduction algorithm does in RVB mode.

Default options Domain (sigma_h or sigma_domain) set to 2 and Range (sigma_s or sigma_range) set to 4 are the default recommended options.

Wednesday, January 3 2007

Color Management Workflow using Digikam

Digikam is a Photo/Picture Management software. It's aim is to help you organize your photo albums, manage tags... Since the recently release 0.9 (Xmas '06!), Digikam is also able to handle 16 bits pictures, raw format, and, thanks to lcms, color profiling.

This small howto will present what would be a color management workflow using Digikam starting from a raw camera file to a final png/jpg picture. I will not cover for now the ability Digikam offers to automate the process but rather focus on how to do it manually. But let's start...

New Digikam Options

Quite obviously you will need to have a running 0.9 Digikam (either unmask it, enable beta repositories, etc. depending on your distro) and install it. Done? Ok let's start it and begin with adjusting various new options Digikam now offers.

IO Files Settings

These options enable raw decoding by Digikam. For this Digikam embeds the dcraw engine. Dcraw is a powerfull (albeit slightly complex) tool for raw picture processing. Hopefully, Digikam hides most of this complexity:

Let's keep it basic for now, I will explore the various options in an other post, later:

  • enable 16 bits color depth and the use camera white balance options.
  • Set Highlights to reconstruct, with a level of "3" and a luminosity to 1. This has to do with picture saturation. As you might have notice if you have a picture with both deep area of shadows and a bright sky, the file generated by the camera either give priorities to the shadows and the sky is white (highlights are "burned") or the other way round and shadows are dark without any details. However, there is a solution to recover some of the highlights in the first situation (burned highlights). The blue pixels saturate less quickly than green and reds. From this information, Dcraw will try to recover some information by reconstructing the lost green and red information. This solution gives reasonably good results. Of course it is said to be less interesting than what the "fuji" sensor provides (if you have such a camera, you may be interested in turning on the Use Super-CCD secondary sensors).
  • At last, set the Quality option to "Bilinear interpolation".

"Color Management"

Also new in Digikam 0.9 is the ability to color manage your pictures. Why so? Because raw files are not color managed at all. Your camera provides the data it has captured in a raw format and will let you manage all the processing. Each cameras have its specificities regarding how it captures color information, therefore you will need to apply a profile to the pictures you want to process, then translate those colors into an other profile with a wider gamut in order to be able to adjust the colors with more flexibility.

Basically, a profile "maps" the color information and gives information on how one should render them. It gives also information to lcms (and Digikam) on how to translate the color information from one space to an other in order to keep the colors as accurate as possible.

Here, the options you would like to set are the following:
Color Management Policy:

  • Enable Color Management (obviously)
  • Behaviour: Ask when open an image in image editor / Launch Color Management plugin with RAW files

Color Profiles Directory:

  • set this to the Directory where you stores all your profiles... I'm using "/urs/share/color/icc" but it's not compulsory

ICC Profiles Settings: Here you are given the ability to provide "default" choices for your profiles. Everything is adaptable at the opening of a RAW file with the Color Management plugin...

  • provide a workspace profile (such as Adobe RGB or sRGB). If you want to go to print with your pictures, you may want to go to Adobe RGB, if it is only for web publishing, sRGB is better (Adobe RGB will be displayed slightly dull in non color managed enable software such as browsers). However you may change this later of course, therefore Adobe RGB can be a good choice for storing and picture handling as you can always change it to sRGB before releasing a picture for your blog...
  • input profile should match the camera maker you are using. I am the (happy) owner of a Minolta 7D and I therefore use a minolta profile.

There are some other options such as the soft proof profile which enables you to emulate, granted that you have a profile for it, how your picture will render for a particular device. It is useful before printing for instance because your printer has a smaller gamut than your camera and some colors might look saturated. You may want to fix this manually instead of relying on the "blind" algorithm of your printer.

The Use color managed view is an alternative to using Xcalib or Argyll. Only your picture will be color managed, not your entire screen! Despite the warning, this option should run smoothly in the final 0.9 release according to the Digikam team.

Process a raw picture

From there everything is simple, select a RAW picture and open it in the editor (double click, etc.). The color management plugin will be displayed after the picture has been processed in order to adjust color rendering. Without color management all pictures are very dark, this is normal.

You can experiment the various profiles you have in order to select the best input profile according to your picture (some tends to be very neutral, even a bit dull, some gives more saturated results, etc).

To do list

After this introductory post, I will explore in more details the Color Management and IO Files options (and their effects) provided by Digikam. Stay tuned.