RAW Loader

courtesy by Glass LanternAn Image Pipeline converts the raw output of the digital camera’s sensor into an image that can be shown on the monitor. This pipeline consists of a number of non-linear operations that are designed to give a visually pleasing image. Additionally the operations are dependent on the camera manufacturer and RAW format. The goal of the RAW loader is to visualize most of the common RAW formats.

Within nomacs we are using libraw to get the RAW data of the RAW formats (*.nef, *.crw, *.cr2, …). libraw is based on the source code of the dcraw utility, which has implemented an image pipeline to be able to display the RAW image in an interpretable way. The drawback is the speed of the library. Therefore we’ve implemented a “rough” image pipeline which is doing the following steps:

  • Black Point Compensation
  • Dynamic Range Normalization
  • White Point Correction
  • Gamma Correction
  • Demosaicing: convert the Bayer Pattern (defined in the EXIF Data) to an RGB image using cvtColor(img,img, CV_BayerRG2RGB).

This allows showing RAW image formats within an acceptable time. However depending on the RAW format and the camera the color of some images look lusterless.

Tasks within the RAW loader project

  • Get familiar with the image pipeline
  • Get familiar with the specifications of different camera manufacturers
  • Adapt the imaging pipeline within dcraw to nomacs by emphasizing on speed and color corrections
  • Alternatively develop your own image pipeline
  • According to your interests you can also emphasize on the Demosaicing Algorithm: Study State of the Art Literature and implement the “best” algorithm.