FACTOID # 140: In Switzerland, the average person has to work for 102 minutes to buy a kilogram of beef - one of the longest times in the developed world. On the other hand, they only have work 14 hours to buy a refrigerator for it.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Demosaicing

A demosaicing algorithm is a digital image process used to interpolate a complete image from the partial raw data received from the color-filtered image sensor internal to many digital cameras in form of a matrix of colored pixels. Also known as CFA interpolation or color reconstruction, another common spelling is demosaicking. In mathematics, computing, linguistics and related disciplines, an algorithm is a procedure (a finite set of well-defined instructions) for accomplishing some task which, given an initial state, will terminate in a defined end-state. ... Digital image processing is the use of computer algorithms to perform image processing on digital images. ... A raw image file contains minimally processed data from the image sensor of a digital camera or image scanner. ... Hello--80. ... A pixel (a contraction of picture element) is one of the many tiny dots that make up the representation of a picture in a computers memory. ...


Many modern digital cameras provide a raw file with data in a filter-mosaic format; the user can demosaic it using software, rather than using the camera's built-in firmware. Mosaicing refers to the process of undoing the in-camera interpolation, recovering the RAW data from a JPEG image, and is usually done by reverse engineering the camera.[citation needed] In computing, firmware is software that is embedded in a hardware device. ... Reverse engineering (RE) is the process of taking something (a device, an electrical component, a software program, etc. ...

Contents

Goal

The Bayer filter mosaic. Each two by two submosaic contains 2 green, 1 blue and 1 red pixel
The Bayer filter mosaic. Each two by two submosaic contains 2 green, 1 blue and 1 red pixel

There are a number of different ways the pixels are arranged in practice, the most common being the Bayer filter similar to the image at right, alternating values of Red (R) Green (G) for odd rows and alternating values of Green (G) and Blue (B) for even rows. Image File history File links BayerPatternSimpleMosaic. ... The Bayer arrangement of color filters on the pixel array of an image sensor Front page of Dr. Bryce Bayers 1976 patent on the Bayer pattern filter mosaic, showing his terminology of luminance-sensitive and chrominance-sensitive elements A Bayer filter mosaic is a color filter array (CFA) for...


Since each raw pixel of the sensor is behind a color filter, the output is a mosaic of monochrome pixels in one of the color components (e.g. red, green, or blue). Thus, an algorithm is needed to estimate for each pixel the color levels for all color components, rather than a single component. Mosaic is the art of decoration with small pieces of colored glass, stone or other material. ... Something which is monochromatic has a single color. ...


Tradeoffs

Some methods may produce better results for natural scenes, and some for printed material, for instance. This reflects the inherent problem in estimating pixels that we do not really know for certain.


Naturally there is also the ubiquitous tradeoff of speed versus quality of estimation.


Illustration

To reconstruct a color image from the data collected by the color filtering array, you need to fill in the blanks. The mathematics here is subject to individual implementation, and is called demosaicing. If you have a RAW image, you can use different demosaicing than what is built into the camera, often yielding higher quality. A raw image file contains minimally processed data from the image sensor of a digital camera or image scanner. ...


In this example, we use Adobe Photoshop's bicubic interpolation to simulate the circuitry of a Bayer filter device such as a digital camera. In a typical commercial implementation, low pass anti-alias filters will be added that make the artifacts shown here less pronounced, with a corresponding reduction of sharpness. This article or section does not cite its references or sources. ... A SiPix digital camera next to a matchbox to show scale. ...


Image:shades_aa.jpg colored, anti-aliased, made with Adobe Illustrator File history Legend: (cur) = this is the current file, (del) = delete this old version, (rev) = revert to this old version. ...


This is the original image, made with Adobe Illustrator. On a perfect digital camera with perfect optical lens that can measure every pixel's exact Red, Green, and Blue components, the resulting image will probably look like this. Adobe Illustrator is a vector-based drawing program developed and marketed by Adobe Systems. ...


Image:shades_bayer.png Image File history File links Shades_bayer. ...


This is a simulated sampling taken by a Bayer filtered sensor array. Each pixel only has a value of either R or G or B.

Frame enlargement
Red Green Blue


A digital camera has certain circuits to reconstruct the whole image using above information. The resulting image could be something like this: Image File history File links Shades_framed_bayer. ... Image File history File links Shades_bayer_r. ... Image File history File links Shades_bayer_g. ... Image File history File links Shades_bayer_b. ...


Image:shades_dc.jpg What a digital camera could possibly see. ...

Frame enlargement of the original. Frame enlargement of the reconstructed image.

The reconstructed image is accurate in uniform-colored areas, but has a loss of resolution (detail and sharpness) and has edge artifacts (for example, the edges of letters have visible color fringes and some roughness). Frame enlargement of the original. ... Frame enlargement of the reconstructed image. ...


Algorithms

Quick (Low-Grade)

  • Nearest Neighbor Replication simply copies an adjacent pixel of the correct color component. It is unsuitable for any application where quality matters, but can be useful for continuous previews given limited computational resources.

Simple interpolation

These are relatively straightforward mathematical operations using only nearby instances of the same color component. The simplest is the bilinear interpolation method. In this method, the red value of a non-red pixel is computed as the average of the adjacent red pixels, and similar for blue and green. In mathematics, bilinear interpolation is an extension of linear interpolation for interpolating functions of two variables. ...

In mathematics, bilinear interpolation is an extension of linear interpolation for interpolating functions of two variables. ... In numerical analysis, a branch of mathematics, bicubic interpolation is one of the most common interpolation methods in two dimensions. ... In the mathematical subfield of numerical analysis, spline interpolation is a form of interpolation where the interpolant is a special type of piecewise polynomial called a spline. ...

Synthetic field based interpolation

These are algorithms that first compute an alternate representation, and use that to interpolate the color components.

  • Hue interpolation
  • Log hue interpolation

Adaptive

These algorithms adapt their method of estimation (i.e. the estimation formula) depending on features of the area surrounding the pixel of interest.

  • Variable Number of Gradients interpolation computes gradients near the pixel of interest and uses the lower gradients (representing smoother and more similar parts of the image) to make an estimate. It is used in first versions of dcraw, and suffers from color artifacts.
  • Pixel Grouping uses assumptions about natural scenery in making estimates. It has fewer color artifacts on natural images than the Variable Number of Gradients method.
  • Adaptive homogeneity-directed interpolation selects the direction of interpolation so as to maximize a homogeneity metric, thus typically minimizing color artifacts. It has been implemented in recent versions of dcraw.

dcraw is an open source, ANSI C computer program written by Dave Coffin. ...

Proprietary

Various commercial products implement proprietary estimation methods about which little is publicly known, and which may or may not be similar to publicly known algorithms.


Examples:

  • Adobe Photoshop RAW plug-in

External links

  • Comparison of different interpolations, ImagEval Consulting LLC
  • A Study of Spatial Color Interpolation Algorithms for Digital Cameras and especially description of Variable Number of Gradients algorithm by Ting Chen, Stanford University
  • description of Adaptive homogeneity-directed algorithm -- from the research page of the designer, Keigo Hirakawa
  • Paul Lee homepage -- implementor of Adaptive homogeneity-directed algorithm in recent versions of dcraw
  • description of Pixel Grouping algorithm, Chuan-kai Lin, Portland State University, 2004
  • K. Parulsi and K. Spaulding (2003). Color image processing for digital cameras. In Digital Color Imaging, G. Sharma, ed. Boca Raton, Florida: CRC Press. 727–757.
  • HowStuffWorks: How Digital Cameras Work, More on Capturing Color, with a demosaicing algorithm at work animation
  • Demosaicing in the Kodak DC210 Digital Camera, Cleve Cheng, Mar 13 1998
  • Roger W. Ehrich. Evaluating Algorithms for the Demosaicing of Bayer Arrays. Computer Science Courses. Virginia Tech CS Department.


 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m