Home

contrastdetection

Contrast detection, or contrast-detection autofocus (CDAF), is an autofocus method that determines the correct lens position by maximizing image contrast in the scene. The camera analyzes the sharpness or high-frequency content of the image as the lens is moved in small steps, evaluating a focus metric such as edge strength and local contrast. It converges on the focus position that yields the highest measured contrast, using the live view image or a captured frame as the reference.

This approach is common in many digital cameras, smartphones, and video cameras, especially when phase-detection sensors

Advantages of contrast detection include broad applicability and robustness in textured scenes, as well as real-time

In many cameras, CDAF is used alone for live view or combined in hybrid autofocus systems that

are
unavailable
or
disabled.
Because
it
relies
on
the
data
captured
by
the
main
image
sensor,
CDAF
does
not
require
a
dedicated
phase-detection
system
and
can
operate
with
any
lens
and
sensor
combination.
In
practice,
the
system
iteratively
searches
for
the
best
focus,
sometimes
using
a
center
region
or
a
broader
image
area
to
guide
the
search.
operation
during
live
view.
Limitations
include
slower
performance
relative
to
phase-detection
autofocus,
particularly
in
low-contrast
or
low-light
conditions
where
the
focus
metric
provides
weak
guidance.
It
can
also
hunt
or
overshoot
in
difficult
lighting,
and
it
provides
no
direct
depth
information
from
a
single
monocular
image.
integrate
phase-detection
data
to
improve
speed
while
retaining
the
accuracy
of
subject
contrast
analysis.