Home

demosaic

Demosaicing, also known as color interpolation, is the process used in digital imaging to reconstruct a complete color image from the incomplete color samples captured by an image sensor equipped with a color filter array (CFA). Most consumer sensors use a Bayer CFA pattern (RGGB), in which each pixel records only one of the three primary colors. Demosaicing estimates the two missing color components at each pixel to produce a full RGB image.

The challenge is to interpolate colors while preserving edges and avoiding artifacts such as color zippering

In recent years, learning-based approaches using neural networks have become popular, often delivering higher-quality results at

along
high-contrast
boundaries
and
false
colors
in
areas
with
fine
detail.
The
choice
of
algorithm
affects
sharpness,
color
fidelity,
and
noise
performance.
Basic
methods
include
nearest-neighbor,
bilinear,
and
bicubic
interpolation,
which
are
fast
but
can
blur
detail
and
create
artifacts.
More
sophisticated
approaches
use
gradient
or
edge-direction
information
to
guide
interpolation
(edge-directed
or
gradient-based
demosaicing).
Some
methods
explicitly
model
sensor
noise
or
apply
demosaicing
within
larger
image
processing
pipelines
that
also
include
denoising
and
color
correction.
the
cost
of
compute.
Demosaicing
is
typically
performed
on
raw
sensor
data
before
later
steps
in
the
image
signal
processing
pipeline,
such
as
color
correction,
gamma
encoding,
and
sharpening.
While
Bayer-based
mosaics
are
common,
other
CFA
patterns
exist,
and
some
sensor
technologies
(such
as
the
Foveon
X3)
capture
full
color
at
each
pixel
and
do
not
require
a
conventional
demosaic
step.