Professional Documents
Culture Documents
Rawesak Tanawongsuwan
ccrtw@mahidol.ac.th
A RAW File
A record of the data captured by the
camera sensor
Unprocessed sensor data
RAW image file
File extension: .raf (Fuji)
.crw .cr2 (Canon)
.kdc .dcr (Kodak)
.mrw (Minolta)
.nef (Nikon)
.orf (Olympus)
.dng (Adobe)
.ptx .pef (Pentax)
.arw .srf (Sony)
.x3f (Sigma)
.erf (Epson)
Digital Camera
Most digital cameras sample an image with
red, green and blue sensors arranged in a
photoreceptor array
Digital Camera
The purpose of the microlens array is
to focus the light onto each pixel
The color filter array changes the
color responsivity of each pixel
Finally, the sensor array captures the
light and generates the electrical
signal
Mosaic Sensor / Color Filter Array
(CFA) Camera
A 2D array to collect the photons that are
recorded in the image
Made up of rows and columns of
photosensitive detectors (CCD or CMOS)
to form an image
Each element of the array contributes on
pixel to the final image
Color Filter Array (CFA)
The sensors count photons, produce a
charge that’s directly proporational to the
amount of light that strikes them
The raw files from color filter array cameras
are grayscale
Grayscale to Color
Each element in the array is covered by
a color filter, so that each element
captures only red, green, or blue light
A Bayer filter pattern
A mosaic of red, blue and green filters in alternating rows of
RG and GB
Twice as many green filters are used as red or blue because
our eyes are most sensitive to green light
Filter patterns
RGB or CMY or 4-color-mix are possible
Each element in the sensor captures only
one color
The red-filtered elements produce a
grayscale value proportional to the amount
of red light reaching the sensor
Same as the green-filtered and blue filtered
elements
Info in the RAW files
The image pixels themselves
The image metadata (“data about
data”)
Records shooting data such as the
camera model, serial number, shutter
speed, aperture, focal length, flash
Additional information that might be
needed to convert into an RGB image
RAW Converter
Demosaicing
To display the image, we must create
an image that has a red, green AND
blue pixel at each location
Interpolate the missing sensor values
Demosaicing Illustration
An example reconstruction
Demosaicing Illustration
A zoom-in version
original reconstruct
Demosaicing Algorithms
Nearest Neighbor Replication
simply copies an adjacent pixel of the correct color
component
Simple interpolation
Bilinear, Bicubic, Spline, Laplacian interpolation
Synthetic field based interpolation
Compute an alternate representation
Hue interpolation, Log hue interpolation
Adaptive
Adapt their method of estimation depending on features
of the area surrounding the pixel of interest
Proprietary
Commercial products
Raw Conversion
In addition to demosaicing
White balance
Colorimetric interpretation assigns the correct,
specific color meanings to the “red,” “green,”
and “blue” pixels, usually in a colorimetrically
defined color space such as CIE XYZ, which is
based directly on human color perception
Gamma correction is done to redistribute the
tonal information so that it corresponds more
closely to the way our eyes see light and shade
Noise reduction, antialiasing, and sharpening
Benefits
Finer control is easier for the settings
For example, the white point can be set to any value, not
just discrete values like "daylight" or "incandescent"
The settings can be previewed and tweaked to obtain the
best quality image or desired effect
Camera raw files have 12 or 14 bits of brightness
information
JPEG loses fine details and is ill-suited for major color or
brightness changes
The working color space can be set to whatever is desired
Different demosaicing algorithms can be used, not just the
one coded into the camera
Drawbacks
Camera RAW files are typically 2-6 times larger than
JPEG
Fewer images can fit on a given memory card
It also takes longer for the camera to write raw images
to the card
fewer pictures can be taken in quick succession (a sports
sequence)
No single widely-accepted standard raw format
Adobe's DNG format has been put forward as a
standard, but is not adopted by major camera
companies
Specific software may be required to open RAW files on
some systems, as opposed to JPEG or TIFF
Time taken in the image workflow
Software Supports
Dcraw
Adobe Photoshop / Adobe Photoshop Lightroom
Microsoft's Digital Image
Mac OS X
added raw support directly to the system
which adds raw support automatically to the majority of
Mac OS X applications (such as Preview, Mac OS X's PDF
and image viewing application)
Helicon Filter
Bibble Pro
Picasa
a free image editing and cataloging program from
Google, but only limited tools for RAW processing
UFRaw is free software based on dcraw
References
Adobe.com
Wikipedia.org
http://www.imageval.com/public/Products/ISET/ISET_Manual/Demo
saicing.htm
http://photo.net/learn/raw/
http://www.cambridgeincolour.com/tutorials/RAW-file-format.htm