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.