RAW vs. JPG – bit depth, in depth

There are two primary reasons why Jenifer and I only shoot RAW files. One reason is really scary – it requires some math – but not to worry, we have a handy chart that has all of the answers for us and we never actually have to get out a pencil or paper. The second reason is a consequence of the first, but let’s start with that.

Jenifer and I shoot under a lot of conditions that require us to use a higher ISO than would be typical during a studio or outside fashion shoot. We shoot under changing lighting conditions, like when the sun does down during a football game. We shoot under high intensity tungsten lights, like those that are encountered in a gymnasium. And just to mix it up, sometime we add our flashes or strobes to really fine tune the lighting. During each of these conditions, an ISO of 1600 or higher combined with the color changes of the lights adversely effects image quality. In addition to the camera sensor noise, there can be multiple color shifts in the image from the different light sources. However, because we are shooting RAW instead of “baked in” JPGS, we can change many of the parameters of the image file during post processing without changing the actual pixels (like we would have to do with a JPG) and therefore damaging the digital information of the image. Changes to settings like color temperature, contrast, black levels and noise reduction are processed through the more powerful programs of our desktop computer systems instead of the very limited processing power in the internal systems of the camera. The main difference between RAW and a JPG file is what makes this all possible. That critical difference is the bit-depth of the images.

JPGs have the advantage of being much smaller and are already processed for viewing, posting to the web and even printing. To achieve this reduction in size, the camera’s processor reduces the bit-depth of the image from its native resolution to 8-bit and then compresses the file. Cameras sensors differ in bit-depth as they do in resolution. However, most of the SLR cameras produced today are 14-bit. Some point and shoot cameras are 12-bit and the highest-end professional cameras can be 16-bit. So what is bit-depth?

 Bit-depth is the number of unique colors available within the image file.

 The higher the bit-depth, the more colors available (as we will see below, a couple of bits make a BIG difference!). The more colors we have available, the better the transitions are between colors, highlights, shadows and edges of contrast. More colors also means better results from noise reduction and tools such as the Photoshop healing brush and cloning stamp. So here is where the math comes in…

A bit is the smallest division of information within a digital system. A bit can be either a ‘0’ or a ‘1’. In terms of a digital image, this means a 1-bit image can be either completely black or completely white. If you want to have both black AND white in the same image, you need a 2-bit image, which would have 4 possible combinations of ‘0’ and ‘1’: 11, 00, 10, 01. What is important about this relationship is that it for each bit-level you increase, 1,2,3,4,5-bit, you double the number of colors. A 3-bit image has 8 possible combinations, so now we can have shades of grey. A 4-bit has 16 possible combinations, further increasing the subtly and smoothing the transitions between colors. As we go higher and higher, especially past 8-bit, we can more accurately describe the colors of the image (To further increase the complexity of this discussion, but only just briefly as an aside, each image file from a digital camera is composed of 3 color channels – RGB. It is actually the combination of all three channels that describes the color of each pixel, instead of just tones between black and white. When referring to bit-depth, we are generally referring to the bit-depth of EACH channel, not the combination of all 3 channels.) So how many colors does an 8-bit file have? How many does a 16-bit image have?

 

Exp Zone* Fraction of tones

8-bit

12 bit

14-bit

16-bit

1

1/2048

4

16

2

1/1024

2

8

32

3

1/512

4

16

64

4

1/256

8

32

128

5

1/128

2

16

64

256

6

1/64

4

32

128

512

7

1/32

8

64

256

1024

8

1/16

16

128

512

2048

9

1/8

32

256

1024

4096

10

1/4

64

512

2048

8192

11

1/2

128

1024

4096

16448

1/1

256

2048

8192

32896

*Based on chart published by Norman Koren at:
http://www.normankoren.com/digital_tonality.html

The zones correspond to the Ansel Adams zone system of black (zone 1) to white (zone 11)

So there are a few things to notice about this chart. First, an 8-bit image has 256 tones per channel. 256 is a magic number worth remembering. It is the number used through out Photoshop to represent colors, even when the image has a greater bit-depth. Further more, the histogram on the back of your camera is a scale of 0-256 (the screen on the back of your camera only shows JPG data and preview, NOT RAW!) At 256 colors per channel and 3 channels in the image, an 8-bit JPG has a possibility of 16.7 million colors (256x256x256).

Comparing 8-bit to the 14-bit native resolution of most digital camera sensors starts to reveal some really large numbers. First, an 8-bit image contains only 3% of the colors per channel as a 14-bit file. In other words, the camera to process the 14-bit file RAW data to an 8-bit JPG throws 97% of the file away. A 14-bit per channel file contains a possible 549 billion colors. Does this mean that EACH file contains that many colors? No. The camera is sensitive enough to define that broad spectrum but each file does not contain that many colors. Even if it did, computer monitors can not display anywhere near that many colors nor can the human eye detect that many colors (this is where color science gets really fascinating and much beyond the scope of this article.) The ability to capture that many colors has some great mathematical advantages in a digital system– particularly for noise reduction and tonal transitions – that enable a better visual representation when the image is displayed on a monitor screen or printed on paper.

There is one other very important fact the chart above reveals: most of the information a sensor captures (exactly ½ of the information in the file in fact) is in the last stop of exposure. If a digital image is underexposed by even 1 stop, fully ½ of the file is lost. An 8-bit JPG file will lose 128 possible tones per channel and a 14-bit RAW will lose 4096 tones per channel. Even so, that underexposed 14-bit RAW file starts with 32 times more information per channel than the JPG which allows a RAW processing program to “recover” information to make a great print where as a JPG would never be able to obtain the same results.

The bottom line for us as photographers is that it is better to have the bit-depth and not need it then to need it and not have it. While it does take more time to process the files and more space to save them, we strive to consistently create the best images possible under all conditions. RAW files are by far the best way to capture images under those conditions.

Advertisements
This entry was posted in Photography technics, RAW vs. JPG and tagged , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s