Czech version
logolink

< Back to the list of lessons

RAW Format and Its Properties I

digitální fotografieContent of the lesson:

  • What Is RAW Format
  • Examples of Possibilities to Adjust RAW Photos
  • Properties of RAW Format
  • Standardization of RAW Format
  • Bayer Mask
  • Bayer Interpolation
  • Color Bit Depth
  • Size of Photo in RAW Format

What Is RAW Format

Many digital cameras allow you to save the captured photos to the RAW format (along with the standard JPG format). The file in RAW format is sometimes called a digital negative which has to be developed in a specialized program called "RAW convertor".

It is a file which stores only minimally edited raw data from the sensor in your camera and also metadata. To be able to understand it you should know the process of taking and saving photos.

Individual Task

Find out what does the term "metadata" mean. Try to concretely describe what is metadata in digital photography.

Examples of Possibilities to Adjust RAW Photos

As an illustration of wide possibilities of editing photos in RAW format we can use a wrongly exposed photo (the flash was not recharged and did not fire - the amount of light is not enough because the exposure automatics counted with the flash).

Adjusting Photo in JPG Format

Try to adjust the following file fotografie-raw-1.jpg as well as you can in Adobe Photoshop. Which tools will you use?

Vstupní fotografie ve formátu JPG

Try to get the best result - as in the following image:

Zpracovaná fotografie z formátu RAW

Properties of RAW Format

Standardization of RAW Format

RAW format is unfortunately not standardized (what does it mean?) so there are many RAW formats from all manufacturers (these RAW files have different extensions):

  • .cr2 - Canon
  • .dng - Adobe
  • .nef - Nikon
  • .orf - Olympus
  • .raw - Panasonic

The only way to standardize the RAW format was opened by Adobe Systems which offered an opened standardized format .dng (Digital NeGativ). However, camera producers can decide whether they want to add support for this format or not of course.

Bayer Mask

When talking about the available bit depth of RAW format, you should know how the image is stored inside a file.

You can imagine the sensor of camera as a rectangle which consists of square fields which are sensitive to light and can catch its intensity. There are several millions of fields in sensors nowadays (usually 8, 10, 12, 16, or 24 million). It might be logical that the camera divides image to this number of pixels and each field will catch one RGB (Red, Green and Blue) color. However, the real situation is different.

Fields cannot recognize any color, they only capture the intensity of light. To be able to create a color photo, another set of transparent fields is placed above the sensor (there are R, G, B colors) [see Bayer mask]. It is important that a human eye is more sensitive to green color so the number of fields with green filter is double than the number of fields with blue or red filters. Interesting, isn't it? :)

Bayer Interpolation

If you realize that every fields can catch filtered brightness of one color that you can wonder how the final color of each pixel is obtained. This is solved by a simple calculation which creates the final color of each pixel (the name of this calculation is Bayer interpolation: http://www.digineff.cz/art/titulka/071009interpolace.html).

The final color is mathematically computed from the surrounding fields. You can see detailed description here: http://www.fotografovani.cz/art/fo_upravy/rom_proces4.html.

Color Bit Depth

You know from informatics that a bit is the basic unit of information. You should also know what is the bit depth of raster image (digital photography).

In digital camera, every field of sensor gets an amount of light. This field then contains information about the amount of light which fell on it - this is a number which shows the level of recorded brightness. Each field can recognize only a particular range. In case that the value is stronger than the field can process, the field is blinded and such a pixel is overexposed. It is essential how many levels of brightness can the field recognize - how much it is sensitive. In case we had a 1bit field, this field would be able to recognize only black or white color. In case of a 2bit field, it could recognize white, black and two levels of gray color (4 possibilities in total - 0,0; 0,1; 1,0; 1,1 - all possible combinations of 2 bits). You can see that the bigger is the bit depth, the more levels can be recognized by the field.

bitová hloubka

Individual Task

Try to answer the question what is an overexposed photo.

You should know that JPEG can store the bit depth of 8 bits (256 levels), the RAW format can store 12 bits (4096 levels) or 14 bits (16384 levels). The RAW format is able to store much more levels than the JPEG because it is theoretically possible to store 16384 levels of brightness in the RAW format).

Especially in photos which contain many levels of one color (of black and white photos) you can see "posterization" when using 8 bits. Find an example in the Internet.

Individual Task

Try to compute the file size of uncompressed JPG file from 6MPx camera (3000x2000px). Realize that each pixel contains RGB information (it contains three 8bit parts).

Size of Photo in RAW Format

It is clear that the RAW format requires more space than JPG because it stores additional information than JPG files do. In case you decide to photograph into the RAW format it is a good idea to let your camera save images also to JPG (you can use lower quality) because cameras are not able to view RAW formats, they can only display JPG photos (RAW is a digital negative so you have to develop it in RAW convertor at first - a RAW convertor is a program which can display RAW photos, adjust them and save them in JPG for example - it will make the Bayer interpolation etc.).

It is clear that if you decide to take photos to RAW format, you will need much more space (even more if you decide to save to JPG too) and will not be able to view this format using your camera. The most often used RAW converter is the module Adobe Camera Raw.

Realize that converting RAW to JPG is a mathematically difficult operation which has to be done very quickly inside your camera to be able to take next photos. Another advantage of processing RAW data inside a computer is that it allows you to use more performance and time - more quality and demanding algorithms are used so you can get better results.

Individual Task

Imagine that you photograph an image into uncompressed TIF. Try to find such an image (at least 6 MPx) in the Internet and convert it to JPG (quality 95). How much data is saved after this compression? Compare the differences in quality between TIF and JPG - can you see any?

Additional Texts

Links

Questions

  1. Characterize the difference between RAW and JPG.
  2. What is the RAW format of digital photos?
  3. What is Bayer mask and interpolation?
  4. Is there any standardization of RAW format?
  5. What is a bit depth?
  6. Can I take photos only to RAW format?
  7. Explain what is a RAW convertor and give an example of a quality RAW convertor?
webdesign, xhtml, css, php - Mgr. Michal Mikláš