HomeEnglishPrestationsCMP ArgentiqueBoutiqueConcours PhotoArticlesGalerie Liens LégalDans la presse

infos@cmp-color.fr


Paypal  gasket       



move your mouse over the picture

Raw RGB levels and their interpretation

The software Raw Digger ( see here ) allows the analysis of raw RGB data contained in the raw files generated by our cameras. In fact, this software allows you to directly open raw files and displays the histograms of raw datas Have access to the raw data allows the analysis of the behavior of our raw development softwares by comparing the developed files and the raw datas. It should be understood that the software used to convert raw files into final images interprets raw data files and each software has his own behaviour, chosen on aesthetic and technical requirements.

In this page, we'll try to see how are rendered RGB levels contained in the raw files, primarily in midtones and highlights since these values are most subject to interpretation.

CMOS or CCD sensor "see" light with a gamma 1 and the raw data from the sensor are representative of this characteristic: when you double raw RGB value (for example RGB from 1000 to 2000) it means the sensor has received 2 times more light, whether 1EV (1 diaphragm or to put it more simply). From these raw datas it is easy to connect the photographic units (Ev or diaphragm) and digital RGB datas.


Ev 0 was arbitrarily set to 2000 in Raw Digger to simplify the reading of this graph
we clearly see that doubling the raw value (bottom number) means +1 Ev (top number)

Actually, electrical signal from sensor is usually sampled in 14 bits, it means that each photosite can output 214 values, or 16385 possible values (0 to 16384). Bayer mosaic used on the majority of current sensors provides twice more photosites filtered in green than red or blue photosites. The resulting raw datas contain twice more "green" datas than "blue" or "red" datas.
To
simplify demosaicing
operations, these  "green" datas are grouped into two same size layers, the raw file contents is 4 ( not 3! ) distinct layers:
       - layer
R (red),
       - layer
G1 ( green 1),
       - layer
B (blue)
       - and finally the second layer
G2 (Green 2).

It is for this reason that the
histograms displayed on this page show two green layers, one red layer and one blue layer, these four layers have the same number of pixels.


Level analysis of a raw file


CMP Digital Target 4
Nikon D700, flash lighting, raw mode

We study here a raw file shot of the CMP Digital Target 4 ( used to calibrate the camera - see here ), the shot was made with a Nikon D700 and flash lighting. The exposure was set at the limit of clipping in highlights, to have a proper exposure and a complete histogram in the highlights.

The screenshot below ( made with Raw Digger ) shows the raw RGBG histogram of the shot above. We see clearly that the highlights are not clipped and the exposure is correct: on the green channel 2, the maximum is 14,319 while the maximum theoretically possible is 16384 (data is in 14 bits so 2 14 = 16384) or 0.20 ev below the maximum and there is more room on the other channels.



raw datas histogram -  CMP Digital Target 4 shot
Nikon D700, flash lighting
horizontal axis: raw value in 14 bits: 0 to 16384

This file was developed in 8 bits TIFF - adobe RGB 98 in the following configurations:

 

Visual comparison of these 6 images shows that interpretation of the same file vary quite considerably depending on the software used. Despite the fact that the original file is well exposed and that no data is clipped in highlights, rendering varies greatly, much more than I imagined before performing this test.
 

visual analysis:

- Adobe Camera Raw 6.7, default settings, process 2010
The configuration used here is standard. Highlights are very compressed, even mid grays are largely higher than they should. this output could make you think that there is an overexposure problem on this file, but remember the raw datas histogram of this file was perfect, with no clipping !

- Adobe Lightroom 4, default, process 2012
This new 2012 version introduces a new rendering process named process 2012, there is actually a slight density difference with the 2010 process (see Camera Raw - process 2010), highlights are slightly less compacted to high values and the transition between the mid values and the high values is more gradual. Shadows and mid values appear comparable to previous process.

- DxO Optics Pro 7 "natural color" preset
DxO " natural color " rendering is
less exaggerated
than adobe's renderings. Medium and high values are pushed upwards but to a lesser extent.

- DxO Optics Pro 7 "no correction"preset with custom ICC profile (performed on a linear export), white balance
Here we disable DxO defaut rendering with a custom ICC profile inserted in the workflow: this profile allows to largely minimize the highlight compression and restore a more natural look with finer nuances in the highlights. This output shows exactly the contents of your raw file.

- Capture One 7, standard film  curve
The contrast curve "film standard" is selected by default in Capture One, the output is more contrasted than adobe's or DxO "natural color" output. Highlights remain largely compressed to the top end.

- Capture One 7, linear contrast curve
The curve "linear contrast" respects the original raw datas and the rendering is good. A very good initiative from Phase One in my opinion: this linear curve applies only a 2.2 gamma and color correction on the file. This type of rendering lets the photographer to see what is exactly on his raw files.

Quantitative analysis:

A selection of 8 gray patches was made on the central part of the CMP Digital Target 4 as follows:


average levels of raw datas for selected patches
This value is the value of each patch on the raw file ( 16 bits )
To determine the value, an average was performed on the 4 layers RGBG.

The RGB levels of the 8 selected gray patches ( see above ) were observed on the output tiff files of each software, the following graph results from this study:


horizontal axis: initial raw data RGBG (average of 4 values)
the vertical axis represents the 8 bits RGB value (average of 3 values) after development in adobe RGB 98 color space

The chart above helps to understand what was the developer's intent: these curves are a reflection of the internal processing of each software with a standard configuration.

The flattening of the curves in the highlights is representative of visual sensation of compression in the highlights on all outputs, except Capture One / linear contrast and DxO with custom ICC profiles:

Capture One / linear contrast: as its name indicates no correction other than the gamma correction 2.2 is performed on the raw data ( and of course color correction ). This results is lacking contrast but totally neutral and respecting the datas on your raw file. This atypical rendering requires a little work on your part to find the appropriate corrections to your file (contrast, curves ...).

DxO with CMP custom ICC profiles: this rendering is halfway between Capture One "linear contrast"curve and renderings with a flattened top end curve, it is a good way to maintain natural highlight  while having enough contrast. In my opinion this type of rendering is much more universal as basic rendering to start work on a picture. This is why I chose these kind of curves in my ICC profiles.


Thoughts on developer's choices for highlights rendering

Many developers made a deliberate choice to compress highlights to the top end. It can be explained in the case raw file contains strongly overexposed areas: the transition between highlights and clipped areas is smoother and becomes indetectable to the eye since the curve has no sharp angle on the clipping point (255 in 8-bit RGB).

One the example below, some parts on clouds are clipped (green channel 1 and 2, red arrow).

- developing with Capture One linear contrast curve , the blue sky and white clouds are well rendered but the clipped area has a slight color shift: cyan appears on the edge of the clipped area.


- developing with Capture One standard film curve, the problem is
"solved" since everything becomes almost white !!

This latter choice is rather radical, selected as standard curves by the majority of developers ( adobe, dxo, ... ). It can provide good results and solve problems in some cases ( overexposure, clipped areas ) but it is unfortunate that all raw files are processed in this way (since it is made the default choice or requiring custom profiles ), all not requiring such treatment!

Have the choice of curves when you develop your files allows you to ajust highlights rendering very easily according to your file content.

  
 RGBG raw histogram - clipped area in the clouds             move your mouse over the sample              
 



Examples

On examples below, developments done with Capture One linear contrast and DxO + ICC custom profile were corrected with exposure correction ( around  +0.6 Ev ) to correct the loss of overall density due to the flatter curves , these are the only corrections done on the files. For other versions, default softwares settings have been applied. It would have been possible to manually optimize all developments settings but the purpose of this article is to try to understand the behavior of each software, so I chose to use the default settings without any manual tweaking.

Henri Culubret photography - Nikon D300 - Japan, Kyoto

raw histogram of the picture above, the nikon D300 body was set to 12 bits, the RGBG max value is 4096 ( 212 )
we can see clearly that this shot is well exposed and there is absolutely no clipping in highlights

Henri Culubret photography - Nikon D300 - Japan, Kyoto

 


Henri Culubret photography - Nikon D300 - japanese Alps, Shirakawa

raw histogram of the picture above, the nikon D300 body was set to 12 bits, the RGBG max value is 4096 ( 212 )
we can see clearly that this shot is well exposed and there is absolutely no clipping in highlights

Henri Culubret photography - Nikon D300 - japanese Alps, Shirakawa
 
 


Michel Billi? photography - Nikon D700

raw histogram of the picture above, the nikon D700 body was set to 14 bits, the RGBG max value is 16384 ( 214 )
we can see clearly that this shot is well exposed and there is absolutely no clipping in highlights

Michel Billi? photography - Nikon D700

 

 


Copyright (c) 2014 christophe metairie photographie - Tous droits reserves