Other Free Encyclopedias » Online Encyclopedia » Encyclopedia - Featured Articles » Contributed Topics from A-E

Digital Camera Raw

file color image data

Rochester Institute of Technology

Many innovations have come and gone in digital photography’s brief existence. However, one major advance that has a bright future and offers precise controls to digital photographers is the camera raw file. At its most fundamental level, the raw file produced by a digital camera is a recording of the sensor data. At the time of capture, it is unprocessed data that represents the luminosity values recorded by each photo site. In photographic terms, the raw file can be considered analogous to the latent image on an unprocessed piece of film. Digital raw does have one benefit never available to film-based photographers, which is the ability to infinitely reprocess the image whenever required.

Currently, the two most widely used sensor technologies found in digital cameras are CCD (charge-coupled device) and CMOS (complimentary metal oxide semiconductor). These sensors record the luminosity values of a scene based on the actual number of photons reaching each sensor site. An electrical signal is generated and is passed on the analog to digital converter, which is then recorded in the file as the raw data. The image data that is produced is grayscale and does not contain color information as we might expect to see it.

Color information is created by way of a CFA (color filter array) that is overlaid on the sensor. In most cases, the metadata corresponding to the color values recorded for each sensor site is included in the file. Also referred to as a mosaic or striped array, the most common arrangement is the Bayer pattern. This pattern provides twice as many green filters to simulate the heightened response of human vision to the green region of the spectrum. The arrangement consists of alternating arrays of red/green and green/blue filters. There are variations of this pattern used by some camera manufacturers that incorporate a fourth color such as emerald in an attempt to boost color fidelity. An alternate technology invented by Foveon uses three separate filter layers of photo sensors, which effectively allows for full color data at each pixel and does not require demosaicing.

Demosaicing is the process used to extract the color characteristics and layout of the filter array during file processing. This is accomplished with complex algorithms that must also interpolate missing color information (each pixel or sensor site can only record one color value) from the neighboring pixels to create an accurate representation of the original scene. And depending on the algorithm, the process may also map out “hot” or “dead” pixels that were detected within the image.

For a raw file to become recognizable as an actual photographic image, it must undergo further processing, or conversion. This conversion can take place within the camera using built-in algorithms and settings or by using an external, standalone software program. In-camera processing provides the benefit of files (typically JPEG) that are immediately ready for use without further processing. The downside to this approach is that all of the camera settings (JPEG compression, white balance, tone cure, sharpening, etc.) are then “baked” into the finished file. Alterations to the file must then be performed in an image-editing program such as Adobe Photoshop.

The fullest and most powerful features of the raw file reside with the post-processing potentials afforded by standalone converters. Raw files can be processed any number of times, making the image highly functional in many applications. The actual raw image data is never altered. Metadata descriptions of the edits and adjustments are recorded by the processing software and used for rendering a new version of the file to a format such as TIFF, PSD, or JPEG. This also allows for future reprocessing as conversion software continues to improve and evolve. Imagine being able to go back and process a negative from several years ago with a new developer that can extract more detail than was originally thought possible! This is an advantage that simply does not have a parallel in silver halide-based photography.

A further distinction should be noted about the benefits of post-processing: The only camera settings that truly impact the raw data are ISO, f-stop, and shutter speed—in other words, the actual exposure at the moment of capture. All other camera settings are just recorded as metadata tags and, unless using the manufacturer’s raw converter, will (can) be totally ignored.

At this time, each camera manufacturer typically provides a proprietary software solution for their raw file processing. There are also many third-party converters that can process files from a number of different cameras. The Adobe Camera Raw (ACR) plug-in is a universal raw converter included with Adobe Photoshop. It supports a large number of file and camera types and is updated regularly as new models are introduced.

In addition to the demosaicing, other steps in the conversion process include colormetric interpretation, white balancing, tone mapping (gamma correction), noise reduction, anti-aliasing, and sharpening of the image data.

The colorimetric interpretation is where the RGB values are assigned to each pixel based on the luminance levels recorded through the color filters. This is typically done using a colorimetrically defined color space such as CIE XYZ. These values can then be further converted to a specific RGB color working-space destination such as Adobe 1998, sRGB, or ProPhoto.

White balancing is the process of assigning the actual color of the light under which the scene was captured. This is recorded by the camera via the built-in white-balance feature. Most cameras provide several presets based on typical lighting situations, a custom white-balancing option, and the “as shot” setting, which attempts to read the subject as the exposure is taken. White balance can also be determined and/or reassigned in the post-processing stage, independent of the camera settings.

Raw image data is recorded in a linear fashion (a direct correlation between the number of photons captured by a sensor site and the recorded tonal value) that subsequently requires tone mapping or gamma correction to be opened. If viewed without conversion, the image would appear extremely dark and virtually unrecognizable. A gamma correction remaps all of the tonal values to more closely correspond to the way our eyes might interpret image. The linear response of the sensor is totally unlike film, which was designed to mimic human vision.

Many of the current digital SLR cameras use 12 bits of data to encode the capture, resulting in a total of 4096 possible discreet tonal levels. These cameras also have a dynamic range of approximately six stops of useable exposure. Because of the linear distribution of the levels, half (2048) are contained within the brightest f-stop of exposure. In a logarithmic function, the remaining levels are then halved (2048, 1024, 512, 256, 128, 64) for each stop as you progress downward in the tonal scale. By the time you get down to the last stop, there are precious few levels available for the deepest shadows. This has significant implications for correct exposure, and a new paradigm has emerged: “expose to the right,” or what might be characterized as exposing for the highlight values of the scene.

Fundamentally, the concept is that photographers should expose to fully populate the brightest areas of the scene without overexposing and blowing out the highlights. This is, of course, highly dependent on the scene luminance and dynamic range of the camera sensor. The term expose to the right implies pushing the raw image histogram all the way to the right side, just short of clipping. Clipping refers to pushing highlight pixels all the way to pure white (or black at the other end) and thus losing detail. You then take advantage of this data-rich area of the image and use the tone-mapping controls of the raw converter to more fully populate the mid-tones and shadows. One of the benefits of this technique is that it can help reduce noise in the shadows. Another way of considering this potential is to remember that when working with a raw file, it is almost always better to darken the image (add levels to the shadows) rather than lighten it (pull levels out of the shadows).

Unfortunately, the exposure-metering systems in today’s cameras are still designed to produce a middle gray exposure that will yield a pleasing JPEG when processed through the camera. Exposing to the right requires exposure testing
to determine the response of the sensor so that it can be properly calibrated and matched to the meter’s performance requirements.

Noise reduction, anti-aliasing, and chromatic aberration correction are other functions that can be performed in the conversion process. These can help reduce color artifacts introduced at the pixel level. Sharpening may also be performed at this stage but it is usually global in nature and perhaps best left to more specialized software further down the imaging pipeline.

The term “camera raw file” encompasses a large number of different proprietary file formats produced by the various camera manufacturers. As a consequence, photographers now find a modern-day dilemma that has no parallels in the pre-digital photography era. In almost all cases, these manufacturer file formats are unique to a specific camera model and are not publicly documented. Universal converters such as the aforementioned Adobe Camera Raw have worked around this issue by extensive reverse engineering and decoding of these file formats. There is a danger, however, that proprietary data may sometimes be missing from this process and that only the camera manufacturer’s software can fully interface with all of the camera-specific metadata. This is akin to being forced to use film and processing provided only by the camera manufacturer. A further issue arises: As these cameras cease to be manufactured and, subsequently, supported, these proprietary raw files may become “orphaned” and no longer convertible. There are already examples of this happening and the problem is sure to worsen with time.

A solution to this dilemma has been provided by Adobe in the form of a universal, fully documented, open-source raw file format called DNG (digital negative). Based on the TIFF-EP format, DNG provides a standardized container for both the raw data and also the associated metadata. By insuring that all metadata is written in a standard way and in known locations, it eliminates the danger of files becoming unreadable as older conversion software ceases to function with updated hardware and operating systems. Since it is an open format, any hardware or software vendor can use the provided SDK (software development kit) to build DNG compatibility into their product.

DNG is an evolving specification and provides for backward compatibility with earlier versions. It may very well become the much-needed missing component in raw file archive-ability. Adoption is slowly growing and increased pressure from photographers on the camera manufacturers to adopt a universal standard can only speed this process along.

Digital Camera Testing - Measuring Characteristics, Camera settings, OECF measurements, Resolution [next] [back] Digital Camera Image Processing - CFA Basics, Image Processing for Color Estimation, Camera Image Compression, Video-Demosaicking, CFA Image Indexing

User Comments

Your email address will be altered so spam harvesting bots can't read it easily.
Hide my email completely instead?

Cancel or