Home

Debayering

Debayering, also known as demosaicing, is the process of reconstructing a full-color image from the incomplete color samples captured by a color filter array on a digital image sensor. In most cameras the sensor uses a Bayer filter mosaic, a 2x2 pattern of red, green, green, blue (RGGB). Each sensor pixel records only one color, so debayering estimates the other two color components for each pixel to produce a complete RGB image.

The simplest methods interpolate linearly from neighboring samples. Bilinear interpolation uses adjacent pixels, while bicubic interpolation

Demosaicing can introduce artifacts such as color zippering along high-contrast edges, false colors around fine patterns,

Applications include digital cameras, smartphones, and video pipelines, as well as scientific imaging where faithful color

can
yield
smoother
results.
More
advanced
algorithms
are
edge-aware
and
directional,
using
image
gradients
to
preserve
edges
while
estimating
missing
colors.
Representative
approaches
include
adaptive
homogeneity-directed
demosaicing,
gradient-based
methods,
and
learning-based
techniques
such
as
convolutional
neural
networks
trained
on
paired
data.
and
moiré.
The
choice
of
method
involves
trade-offs
among
computational
cost,
reconstruction
quality,
and
memory
usage,
and
it
interacts
with
subsequent
processing
steps
such
as
white
balance
and
gamma
correction.
Demosaicing
is
typically
performed
on
linear
sensor
data
before
gamma
encoding.
reproduction
is
important.
See
also
demosaicing,
Bayer
filter
mosaic.