Raw Image Format - Processing

Processing

See also: Color image pipeline

To be viewed or printed, the output from a camera's image sensor has to be processed, that is, converted to a photographic rendering of the scene, and then stored in a standard raster graphics format such as JPEG. This processing, whether done in-camera or later in a raw-file converter, involves a number of operations, typically including:

  • decoding – image data of raw files are typically encoded for compression purpose, but also often for obfuscation purpose (e.g. raw files from Canon or Nikon cameras).
  • defective pixel removal – replacing data in known bad locations with interpolations from nearby locations
  • white balancing – accounting for color temperature of the light that was used to take the photograph
  • demosaicing – interpolating the partial raw data received from the color-filtered image sensor into a matrix of colored pixels.
  • noise reduction – trading off detail for smoothness by removing small fluctuations
  • color translation – converting from the camera native color space defined by the spectral sensitivities of the image sensor to an output color space (typically sRGB for JPEG)
  • tone reproduction – the scene luminance captured by the camera sensors and stored in the raw file (with a dynamic range of typically 10 or more bits) needs to be rendered for pleasing effect and correct viewing on low-dynamic-range monitors or prints; the tone-reproduction rendering often includes separate tone mapping and gamma compression steps.
  • compression – for example JPEG compression

Note that demosaicing is only performed for CFA sensors; it is not required for 3CCD or Foveon X3 sensors.

Cameras and image processing software may also perform additional processing to improve image quality, for example:

  • removal of systematic noise – bias frame subtraction and flat-field correction
  • dark frame subtraction
  • optical correction – lens distortion correction, vignetting correction, and color fringing correction
  • contrast enhancement
  • increasing visual acuity by unsharp masking
  • dynamic range compression – lighten shadow regions without blowing out highlight regions

When a camera saves a raw file it defers most of this processing; typically the only processing performed is the removal of defective pixels (the DNG specification requires that defective pixels are removed before creating the file). Some camera manufacturers do additional processing before saving raw files; for example, Nikon has been criticized by astrophotographers for applying noise reduction before saving the raw file.

Some raw formats also allow nonlinear quantization. This nonlinearity allows the compression of the raw data without visible degradation of the image by removing invisible and irrelevant information from the image. Although noise is discarded this has nothing to do with (visible) noise reduction.

Read more about this topic:  Raw Image Format