[Digikam-users] Dark Images for 16-bit raw and reconstructed highlights

Alex Tutubalin lexa at lexa.ru
Thu May 7 15:36:59 BST 2009


Paul,

to be precise: all LibRaw postprocessing code is derived from dcraw 
sources. The only change is an ability to produce 16-bit gamma-corrected 
data (dcraw's 16 bit output is linear).

 From my point of view, this code is non-perfect in terms of image 
quality. On the other side, LibRaw is focused on RAW/metadata extraction 
and pre-processing (before demosaic stage), there is no (near) plans to 
change postprocessing stage.

> Thanks for the reply, Alex.  So, as I understand your comment, Highlight Recovery shifts the entire histogram to the left, allowing extra capture data in the highlights to roll in.  
Not so easy. Different color channels on (every) digikam have different 
sensitivity. So, when green channel is already clipped, there is some 
details in red/blue ones (for daylight and neutral highlights, just an 
example). So highlight recovery tries to recover clipped green channel 
data via correlation with other channels.

So, we need to rescale data (for example from 0...16383 to 0..8191 to 
get 1 extra stop), then try to reconstruct green pixels above 8191.

> * What happens to the shadow data that was on the left?  Does it drop off and get clipped to 0?
>   
Shadows are compressed
> * Why not fix the highlights and shift the histogram back to where it was?
>   
Imagine some clipped and unclipped highlights. E.g. clipped cloud part 
in range 255-255 (8bit values) and unclipped in range, say, 240-254. If 
you recover clipped part to, say, 245-255, you need to shift unclipped 
part to something like 230-245. If not, you'll get incorrect tonal 
relations.

> * In 16 bit mode, why do we need to shift and darken at all?  The image is 12 bits, so all operations can certainly be performed in a 16 bit space.
>   
before any processing, RAW data converted to working RGB and scaled to 
full range.


-- 
Alex Tutubalin
Web: http://blog.lexa.ru
mailto:lexa at lexa.ru




More information about the Digikam-users mailing list