A Primer on Raw

Introduction

There are a number of advantages to shooting in RAW - getting the most out of these is easier when you really get into the nitty gritty of understanding what the data recorded in RAW and JPEG formats actually is.

But the big disadvantage is in the time consuming work flow involved in transforming the RAW files into finished image files.

RAW images record much more information than JPEGs. The camera sensor collects a huge amount of information at the point of image capture but the act of saving a file as a JPEG throws away a huge amount of it. The reason serious digital photographers shoot RAW is that they are then in control over which of the recorded data to keep and which to discard.The downside is that this takes a finite amount of time for each image processed, even when using batch processing facilities.

Colour Depth

One of the areas where that matters most is colour depth. Most camera sensors capture at least 12 bits per colour channel for a possible 4,096 levels in each channel. The human eye can’t appreciate that many levels of tones (though it’s better at differentiating detail in light than in shadow areas of a scene or image) but, as much of the post-processing we apply in programs like Photoshop results in discarding some of those levels, it’s good to have as many as possible at the starting point. A RAW file stores 12 bit colour depth, a JPEG file format is limited to 8 bits per channel so fifteen sixteenths (15/16) of the information captured is thrown away !

(In fact if you want to get more technical, which you probably don’t, a RAW file doesn’t store colour information at all.) Sensors are just photon receptors – they record how much light they receive, not what colour the light is – so the value they record is grayscale not colour. Filters are applied over the sensor array alternating red, green and blue; there are twice as many green ones as red and blue as human eyes are more sensitive to greens so it’s most important to ensure accuracy in greens. The RAW file records the information from each colour channel as greyscale values. As the filter organisation is known, it’s then possible to create a colour image by recreating missing colour information.

If the image needs post-processing (adjustments to contrast, colour balance etc.) that limited information is sometimes stretched to the point that uneven gradations (posterisation) between tones/ colours become clearly visible.

White Balance

Another important area to consider is white balance. WB is related to the colour of the light under which the image was captured. In real life situations our eyes automatically adapt to different lighting situations and we compensate for the colour of the light without really noticing. We interpret the brightest thing in the scene as white and everything else accordingly, even when that brightest thing actually has a blue or yellow tint from the light colour. The trouble is we don’t do that when viewing printed images or video recordings.

White balance settings allow us to tell the camera what colour light is lighting the scene so that the camera or conversion software can compensate accordingly.

If the lighting is blue, the colours can be shifted towards the yellow slightly. If the lighting is yellow, the colours can be shifted towards the blue slightly. This restores the colour balance to a more neutral one.

When saving a file in JPEG the camera applies the WB setting to the data as it records it. Although one can adjust colour balance within a JPEG file using most image processing sofware applications, it’s much harder to achieve consistent results and again, you often end up condensing/ stretching the limited information you have leading to image degradation.

In a RAW file, no adjustment is made to the information recorded – the camera’s WB setting is recorded alongside the picture information. When you convert the file using a RAW converter you can either choose to apply the camera’s WB setting or discard it completely and specify your own. You are not limited to the settings provided on most cameras (cloudy, shaded, daylight, tungsten) but have very fine control indeed.

Dynamic Range

Dynamic range refers to the number of stops between the dark and light areas of the scene to be recorded that a given camera is sensitive to/ can record. At either end of the range the data is less reliable than the data further away from the edges. In the highlight areas the sensor may have managed to pick up information in only one or two rather than all three colour channels. In the shadows the sensors are recording many less “hits” on their photon receptors and a few stray “hits” are enough to skew the value recorded.

A JPEG excludes these extremes completely. A RAW file includes them. A RAW convertor allows you to adjust exposure up/ down (to include or exclude more of the highlights information) and to adjust shadows up/ down (to include or exclude more of the shadows information). Unlike playing with exposure when working with film (when decreasing exposure at highlights end means losing more detail from the shadows end too) these two controls can be moved independently to each other (compressing or stretching the data) to provide a greater control over dynamic range.

Whilst the sliders provide +2/ -2 (or even more) of exposure compensation in practice I have found that I can recover no more than half a stop or so of highlights and similarly little in shadows. However that half a stop is enough to recover blown highlights (or what would be blown highlights in a JPEG file).

Getting the most from the RAW format involves really getting your head around this feature and even shooting a little differently. Because shadows are so noisy, it’s not good to rely on recovering lost shadow detail whereas recovering highlights detail is usually more successful. For that reason it makes sense to “shoot to the right of the histogram” when working with RAW. You still need to take care not to overexpose but will see benefits from setting exposure so that your recorded data is as far to the right of the histogram as it can be without clipping. This is made harder to judge by the fact that on-camera histograms tend to be RGB combination histograms and don’t show information for each colour channel separately.

Sharpening, Noise, Saturation etc.

Most digital cameras have a range of additional processing that they apply when saving images as JPEGs including sharpening, noise reduction, boosting saturation and so on. Many cameras do allow these to be turned off if preferred.

None are applied to a RAW file which is just a data dump of what the sensor records. This does mean that the photographer needs to apply any such processing changes to the images manually, which is more time consuming but gives greater control.

Lossy versus Lossless

The RAW format is lossless – that is to say that all the data is retained within the file. JPEG is a lossy format – its compression algorithms throw away some of the data when saving. Choosing lower compression settings does result in less data loss but some still occurs.

Every time you open a JPEG file, make changes to it and then resave it you will likely degrade the image further as the compression algorithm will run from scratch each time.

For those who shoot in JPEG but wish to minimise further loss, I would recommend converting the JPEGs to TIFF files. TIFF is a lossless format even when LZW compression is applied as this compression does not throw away data but simply rearranges how it is stored. Of course a TIFF takes a lot more space than a JPEG so again, there are advantages and disadvantages. However it does at least mean that each time the file is opened, changed and closed, no further data is lost. The finished file can always be saved out as a JPEG as the final step before sending to a printer if the printer you use can only accept JPEGs. If you’re working with layers in a photo editor software, try to choose a file format which keeps your layers (eg PSD). Saving in TIFF will lose that information and make further editing harder as it won’t be possible to restore any information which was lost through the layer modification.

Article written by Kavey

 
post_processing/raw.txt · Last modified: 2006/03/23 00:18 by lee
 
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki