Oct 23

Camera Raw – Part 1: Indoor photography

In this series I will examine the use of camera raw as a storage format choice. This first article will discuss camera raw in general, and then examine the use of camera raw format in low-light conditions, such as indoor photography, both with and without flash.

What is Camera Raw?

Camera raw is a generic term for the storage of images from a camera or scanner that has minimal processing. All the information from the image sensor is put into the image file for processing at a later time by image processing software. This is compared to a JPEG or TIFF image file in which the camera – or some other processing software – has taken all available information from the sensor, processed it in some way and stored it in a standard image format. Within a camera, standard image processing includes white balance, contrast, noise reduction, and sharpening. All of this occurs in a mostly transparent, if not invisible, process to the user. Camera raw files are sometimes called digital negatives because they store all of the information possible, but are not viewable directly until they have been processed in some way.


Fig 1 - Intensity information is received from millions of positions on the camera's sensor.

A camera sensor receives image information very differently than is stored in a digital photograph. A camera sensor is actually millions of individual sensors, each one capably of reporting how much light it receives during the exposure (Fig 1)

Fig 2 - A Bayer pattern of red, green, and blue filters

To capture a color image, each sensor has a red, green, or blue filter (other filter colors are possible, but these are the most common) and so the amount of red light is received by one sensor, the amount of green light by another, and the amount of blue light by still another (Fig 2). The pattern contains twice as many green sensors as red or blue because our eyes are most sensitive to the green spectrum.


Fig 3 - Color intensity is recorded through the Bayer filter

These red, green, and blue sensors are not all in the same place! This means that the actual color reading for any given pixel is only accurate for one of the three color components; the other two are interpolated from the pixel’s nearest neighbors (Fig 3). When the camera saves an image, it has to calculate the red, green, and blue value for every pixel in the image based on the raw information that was received by the sensor.

Fig 4 - The finished image in full color

The red, green, and blue values that are stored for any given pixel in a finished image range from 0-255 (Fig 4). The actual measurement from each pixel sensor, however, might range from 0-16383 or even more in a modern DSLR. This might seem like a huge difference, but because light is perceived in an exponential manner, this should translate into about a 6-stop additional range (a camera typically captures about 6 stops of light). That should be about 50% more room on the bright and dark ends of the dynamic range to draw from as the software creates the final image. That’s the theory anyway. We’ll look at the reality in a later article.

White Balance

Another major operation that occurs in-camera for JPEGs is white balance. Our brains are terrific at interpreting a variety of lighting conditions and perceiving things in their true color. Reds still look red, although they might be a bit purple in some light, greens still look green, although some light might make them appear more muddy. The light in the middle of the day is quite warm and is more reddish than light from a regular light bulb that is much more blue. Yet, due to the marvelous adaptability of our brains, we perceive things in both lighting conditions as being a consistent color. The camera doesn’t have the luxury of having the viewer correctly translate changing color conditions – it needs to interpret the color in the given lighting conditions and lock it down as an absolute value, for ever and ever. To do this it takes the information about the lighting – usually from the user’s white balance setting – and shifts the color spectrum appropriately.

In addition, the camera also applies a contrast profile to the image. This may make the light colors a bit lighter, and the dark colors a bit darker.

Once all these operations are done, the camera discards the ‘extra’ information from the sensor and writes out the JPEG file with each pixel represented by three numbers – red, green, and blue – each having a value of 0-255. The camera may also perform noise reduction and sharpening on the image, which takes the image further from the source information, and the original data is lost forever.

This isn’t as bleak as it seems. Actually the camera does a pretty darn good job of capturing the image. But if you are trying to make the best image possible – whether you are presenting yourself as a professional or just want to capture the best possible image – then camera raw may be the way to go.

Camera raw saves all of the information that was available from the sensor so that it can be interpreted at a later time. Software such as Adobe Lightroom can read most camera raw formats and make modifications based on the entire camera raw data, including data that would normally have been discarded if a JPEG file had been produced. This allows the software to shift the exposure and white balance, compress the lighting information and perform other operations that would not be available in a JPEG file that didn’t have all of this extra data.

So what does this mean in real life? How does camera raw differ in the final image?

Fixing White Balance

To do these comparisons I took a still-life photograph under incandescent lighting. The lighting was a little dimmer than normal household light at a dinner table, but not by much. The camera was mounted on a tripod, the focus was fixed on the figure in the foreground, and the camera was in Av (Aperture Priority) mode at f/4. Since my camera supports it, I chose Automatic ISO mode for all images. I took all photos in combined RAW+JPEG format, so the same image that was saved as a camera raw file was also saved as a JPEG image. Before processing I modified the raw images by applying the standard Canon camera calibration to the photo. This is another thing that is automatically done by the camera when it saves a JPEG image. This simply adjusts the color balance a bit so that it should match the JPEG image more closely.

Fig. 5a - Post-processing an incorrect white balance using camera raw. 1/15 sec. @ f/4, ISO 3200

The first photo was taken with the white balance set to Shade (6000K) – which is where I usually set and forget my white balance (of course I also shoot only raw, so it doesn’t matter much – as you will soon see). Because the image is actually illuminated with a cooler incandescent light, the image appears much warmer than it did to my eyes. The image on the far left was camera raw, then I applied the standard camera calibration for my camera, which is supposed to bring the color inline with what how the camera processes JPEG images in the camera (note: it doesn’t match exactly, but it gets pretty close). The third image was the calibrated raw photo after applying the Tungsten (2850K) white balance to it in Lightroom. The final photo was with a custom (2400K) white balance in Lightroom obtained by sampling the paper surface on the left side of the table. This tells the software what grey, i.e., colorless, should look like and removes any color cast from the lighting (Fig 5a).

Fig 5b - Post-processing incorrect white balance using a JPEG image.

The second series of photos was based on the same image stored as a JPEG. The first image was the original, straight from the camera. The second was using the custom white balance setting in Lightroom and sampling on the paper, and the third was obtained by sampling the white balance on the figure’s blouse (which should be a cream color) and then warming the white balance somewhat to make the blouse more cream colored. For comparison, the fourth let Lightroom perform an Auto white balance adjustment on the photo (Fig 5b).

Fig 5c - The final result when fixing an incorrect white balance in raw (left) and with a JPEG (right)

Compared side-by-side, here is the camera raw difference (Fig 5c). Remember, these were the exact same image. The camera raw image has much better color range, finer lighting and contrast details. Hands down, it can definitively be said that if you use the wrong white balance indoors, you will get a huge benefit from shooting in raw mode.







In this next comparison, I took the same photo with all the same settings, except that white balance was set to Tungsten (3200K). Under incandescent light, this is the proper white balance setting when not using a flash.

Fig 6a - Raw (left) and JPEG (right) images with a correct Tungsten White Balance setting

These are the photos as they came out of the camera after applying a camera calibration to the raw photo (Fig 6a).  I will spare you the intermediate steps, but again I converted the raw image by sampling the white balance point (2350K) and did the same with the JPEG file (sampling on the paper, as the white balance was much closer to the actual image this time).






Fig 6b - The final result with a proper white balance for raw (left) and JPEG (right)

The result is much closer, but again you can see that the RAW photo has better tone throughout and the colors are actually closer to those that I perceived (Fig 6b).








In the next two sets of photos, I performed the same experiment, but using the on-camera flash. The white balance was first set to Shade (6100K). This first set shows the photos as they came out of the camera (Fig 7a). Since the Shade (6100K) setting is  close to the Flash (5500K) setting, you would expect these pictures to look pretty good with the flash, if perhaps a bit warm – which they do. Because I was using my Auto ISO setting, the ISO values for the flash photos was 400.

Fig 7a - A close white balance setting before processing of raw (left) and JPEG (right) files

Performing a custom white balance adjustment on both of these (based on the inside of the candle holder on the right), they both cool down, but even so the raw photo comes across with richer colors and nicer tone throughout (Fig 7b).

Fig 7b - After processing with a good starting white balance - raw (left) and JPEG (right) images but even so the raw photo comes across with richer colors and nicer tone throughout (Fig 7b).

Fig 8a - An incorrect white balance with a flash before processing raw (left) and JPEG (right) images
















In this last set, the on-camera flash was used, but the white balance was set to Tungsten, which is considerably cooler (3200K) than the Flash white balance (5500K). This results in a cooler photo (Fig 8a).







Fig 8b - White balance correction for a flash image with an incorrect white balance for raw (left) and JPEG (right) images

After adjustment, again the raw image appears richer with nicer tones across the scene (Fig 8b).

Now it is worth pointing out that insofar as taking either JPEG or camera raw when you are using the correct white balance setting goes, there really isn’t that much difference between the photos. If you are only looking at the JPEG photo, then it can appear to be quite nice and, with perhaps a bit of added contrast and saturation, could be nearly as good as the raw image. BUT, if you happen to use the wrong white balance, then camera raw will be able to give you a great image, whereas JPEG will fail.





RAW vs JPEG at High ISO (Noise)

I’m going to explore one last thing. How does camera raw compare with JPEG when you are taking your camera to the limits of its ISO ability? To test this I set my camera to its highest ISO setting – 12800 – and took a picture using the correct white balance setting (Tungsten) without any flash at all. The images actually come out amazingly well, considering how high the ISO is. Looking at the detail tells a little different story though.

Fig 9a - High ISO noise before processing raw (left) and JPEG (right) images at 100% (click to enlarge)

Zooming into the detail of both images, you can see that the JPEG image definitely has some noise reduction built into it. Unfortunately, the result is uneven and a little blotchy. By comparison, the raw image has quite a lot of noise, but is much smoother (Fig 9a).













Fig 9b - Comparison of noise reduction at high ISO for raw (left) and JPEG (right) images at 100% (click to enlarge)




After applying the best noise reduction to both images I could, this is the final result. To get rid of the JPEG blotchiness I had to increase the noise reduction to the point where some of the detail was also getting lost. The camera raw side is still showing a tiny bit of graininess, but the detail is still visible (Fig 9b).















Fig 9c - Full-size images taken at high ISO in raw (left) and JPEG (right) format

So how do the images look full size? Judge for yourself. In my opinion, both images are completely satisfactory (Fig 9c).









If I was sure I would be using the white balance as set by the camera then there is no compelling reason to use camera raw. However, in light of the enhanced tonal quality and flexibility of camera raw, I would still choose camera raw if I wanted to create the best possible image.



1 comment

  1. Admin do you want unlimited content for your wordpress blog?
    Type in google:
    Nysrisar’s tool

Leave a Reply

Your email address will not be published.