Understanding RAW to its Core

What is the RAW format good for, what can one get out of it? Photographers using D-SLR camera might have noticed that the difference between film camera and digital camera is not that great after all. Even if the actual progress seems huge, I will point out that the two are mostly identical.

I will start by describing one of the most popular types of image format – JPG/JPEG (Joint Photographic Experts Group). You see, the thing with JPEG is that it comes with some obvious limitations starting with the lossy compression format.

I mean, even if the actual space occupied by a JPEG is 10 ten times or even 20 times smaller than a RAW format, the quality differs as well. Even with low compression rates you are likely to notice some quality loss and when quality matters to the photographer to the millimeter you can figure why JPEG is not necessarily the best option out there. Why so?

Well, because any compression therefore any loss of quality means that the ability to make further post-processing corrections are limited, due to the original damage. A small example may help – assuming you need three tablespoons of coffee to make a great cup, you will notice that there is a serious change in quality with only two tablespoons – and there is nothing you can do about.

You cannot subtract some of the content because it is already absent. Same goes in photography – therefore, the use of the JPEG format is generally recommended if you are not aiming for any other substantial post-processing or in circumstances when post-processing is prohibited.

A great use of the JPEG format is when you are going on trips with your friends and you do not want to have all your pictures in a huge format, since you will not stay and edit each and any one of them until it meets the appropriate quality.

How the RAW works?

However, there is more to RAW than what is not in a JPEG. To better understand how RAW works you will have to understand how digital cameras work (if we were to explain on film cameras, it would become a bit more complicated). All our digital cameras basically shoot in color, right? (with the exceptions of some cameras)

However, did you know that those colors are actually grayscale values? Most of our digital camera sensors are actually black and white and use a thing called Bayer Pattern to capture color photos. The Bayer Pattern is a method patented by the engineers at Kodak that uses a color filter array configuration. This color filter array configuration has exactly 50% green, 25% blue and 25% red. One short note here – you may ask, why more green than anything else? Well, you see, due to evolution, the human eye perceives two times more green shades than blue and red shades.

However, a small joke – due to evolution, in about a million years we shall probably end up seeing only shades of gray due to the color of our environment nowadays. Nevertheless, let us get back to our RAW issues.

This array acts like a series of layers, which contains the RGB pattern in the specified percentages. Up to this point, your picture has some color information, however it is impossible to reproduce the exact colors at this point. This is where a trick called color interpolation (or pattern demosaicing) comes in handy. The thing is that through this particular trick, neighboring pixels communicate and estimate from each other.

For better understanding – think of a glass of water and ink. When you first pour a drop of ink into the water, you can see how the drop of ink loses its consistency and combines itself with the water surrounding it. The process is somewhat similar (obviously, not from a chemical point of view, but that is how you should imagine it)

Now, you are probably wondering – where’s the RAW in all this. Well, a good demosaicing algorithm is actually the method through which RAW data is converted to a full color image. Yes! RAW data is actually grayscale values for each of the pixels, and this is why you are able to perform more adjustments to your pictures while they are in RAW format rather than in any other. You see, any camera shoots in RAW – what happens to it afterwards depends on the vendor. The final version of RAW (the one we open in our Adobe Lightroom, or Nikon CaptureNX) is the original RAW, converted somewhat. This is why low-end cameras do not offer the choice of shooting in RAW – becomes it involves a certain algorithm, which the vendor probably chose not to use.

A few facts about RAW a JPEG

So, let us wrap-up a bit, and say these following facts about RAW:

  • RAW data consists of grayscale values for each and every of the colors used within an image.
  • In order to produce the final version of the image (even as RAW format – this is where you may be a bit confused), these RAW data require a certain amount of processing (demosaicing, as specified above). This is usually done using a RAW converter.
  • JPEG images are further down the options list. In other words, after your camera finished demosaicing you might have the option to obtain a JPG copy. Shooting in JPG is actually shooting in RAW and afterwards the picture suffers automatic conversion.

The following facts are true in regards to camera-produced JPGs:

  • JPG have lower quality than RAW due to lossy compression
  • JPG information is only captured on 8 bits.
  • In-camera RAW converter is often limited, this is why it is recommended to go to JPG using some sort of computer software due to the likelihood of higher quality.

And now, we move on to RAW:

  • No compression – full data as it came out of the sensor (after demosaicing)
  • 12-bit color information (very important in photography of any kind)
  • Powerful and sophisticated RAW converters available (Lightroom/Camera RAW, Nikon CaptureNX etc)
  • The possibility of correcting white balance, exposure, colors, sharpness and noise using your computer (without leaving any artifacts behind, similar to what it would happen if you were to use JPEG)
Tags: