How does a camera focus?

User Avatar
Wiki User
2008-09-25 05:32:18

Autofocus is that great time saver that is found in one form or

another on most cameras today. In most cases, it helps improve the

quality of the pictures we take.

What is Autofocus?

Autofocus (AF) really could be called power-focus, as it often

uses a computer to run a miniature motor that focuses the lens for

you. Focusing is the moving of the lens in and out until the

sharpest possible image of the subject is projected onto the film.

Depending on the distance of the subject from the camera, the lens

has to be a certain distance from the film to form a clear


In most modern cameras, autofocus is one of a suite of automatic

features that work together to make picture-taking as easy as

possible. These features include:

Automatic film advance

Automatic flash

Automatic exposure

There are two types of autofocus systems: active and passive.

Some cameras may have a combination of both types, depending on the

price of the camera. In general, less expensive point-and-shoot

cameras use an active system, while more expensive SLR (single-lens

reflex) cameras with interchangeable lenses use the passive


Active Autofocus

In 1986, the Polaroid Corporation used a form of sound

navigation ranging (SONAR), like a submarine uses underwater, to

bounce a sound wave off the subject. The Polaroid camera used an

ultra-high-frequency sound emitter and then listened for the echo

(see How Radar Works for details). The Polaroid Spectra and later

SX-70 models computed the amount of time it took for the reflected

ultrasonic sound wave to reach the camera and then adjusted the

lens position accordingly. This use of sound has its limitations --

for example, if you try taking a picture from inside a tour bus

with the windows closed, the sound waves will bounce off of the

window instead of the subject and so focus the lens


This Polaroid system is a classic active system. It is called

"active" because the camera emits something (in this case, sound

waves) in order to detect the distance of the subject from the


Active autofocus on today's cameras uses an infrared signal

instead of sound waves, and is great for subjects within 20 feet (6

m) or so of the camera. Infrared systems use a variety of

techniques to judge the distance. Typical systems might use:


Amount of infrared light reflected from the subject


For example, this patent describes a system that reflects an

infrared pulse of light off the subject and looks at the intensity

of the reflected light to judge the distance. Infrared is active

because the autofocus system is always sending out invisible

infrared light energy in pulses when in focus mode.

It is not hard to imagine a system in which the camera sends out

pulses of infrared light just like the Polaroid camera sends out

pulses of sound. The subject reflects the invisible infrared light

back to the camera, and the camera's microprocessor computes the

time difference between the time the outbound infrared light pulses

are sent and the inbound infrared pulses are received. Using this

difference, the microprocessor circuit tells the focus motor which

way to move the lens and how far to move it. This focus process

repeats over and over while the camera user presses the shutter

release button down half-way. The only difference between this

system and the ultrasound system is the speed of the pulse.

Ultrasound waves move at hundreds of miles per hour, while infrared

waves move at hundreds of thousands of miles per second.

Infrared sensing can have problems. For example:

A source of infrared light from an open flame (birthday cake

candles, for instance) can confuse the infrared sensor.

A black subject surface may absorb the outbound infrared


The infrared beam can bounce off of something in front of the

subject rather than making it to the subject.

One advantage of an active autofocus system is that it works in

the dark, making flash photography much easier.

On any camera using an infrared system, you can see both the

infrared emitter and the receiver on the front of the camera,

normally near the viewfinder.

To use infrared focusing effectively, be sure the emitter and

the sensor have a clear path to and from your subject, and are not

blocked by a nearby fence or bars at a zoo cage. If your subject is

not exactly in the middle, the beam can go right past the subject

and bounce off an undesired subject in the distance, so be sure the

subject is centered. Very bright subjects or bright lights can make

it difficult for the camera to "see" the reflected infrared beam --

avoid these subjects when possible.

Passive Autofocus

Passive autofocus, commonly found on single-lens reflex (SLR)

autofocus cameras, determines the distance to the subject by

computer analysis of the image itself. The camera actually looks at

the scene and drives the lens back and forth searching for the best


A typical autofocus sensor is a charge-coupled device (CCD) that

provides input to algorithms that compute the contrast of the

actual picture elements. The CCD is typically a single strip of 100

or 200 pixels. Light from the scene hits this strip and the

microprocessor looks at the values from each pixel.

The microprocessor in the camera looks at the strip of pixels

and looks at the difference in intensity among the adjacent pixels.

If the scene is out of focus, adjacent pixels have very similar

intensities. The microprocessor moves the lens, looks at the CCD's

pixels again and sees if the difference in intensity between

adjacent pixels improved or got worse. The microprocessor then

searches for the point where there is maximum intensity difference

between adjacent pixels -- that's the point of best focus. Look at

the difference in the pixels in the two red boxes above: In the

upper box, the difference in intensity between adjacent pixels is

very slight, while in the bottom box it is much greater. That is

what the microprocessor is looking for as it drives the lens back

and forth.

Passive autofocus must have light and image contrast in order to

do its job. The image needs to have some detail in it that provides

contrast. If you try to take a picture of a blank wall or a large

object of uniform color, the camera cannot compare adjacent pixels

so it cannot focus.

There is no distance-to-subject limitation with passive

autofocus like there is with the infrared beam of an active

autofocus system. Passive autofocus also works fine through a

window, since the system "sees" the subject through the window just

like you do.

Passive autofocus systems usually react to vertical detail. When

you hold the camera in the horizontal position, the passive

autofocus system will have a hard time with a boat on the horizon

but no problem with a flagpole or any other vertical detail. If you

are holding the camera in the usual horizontal mode, focus on the

vertical edge of the face. If you are holding the camera in the

vertical mode, focus on a horizontal detail.

Newer, more expensive camera designs have combinations of

vertical and horizontal sensors to solve this problem. But it's

still the camera user's job to keep the camera's sensors from being

confused on objects of uniform color.

You can see how much area your camera's autofocus sensors cover

by looking through the viewfinder at a small picture or a light

switch on a blank wall. Move the camera from left to right and see

at which point the autofocus system becomes confused.

Asim Sajjad

Copyright © 2020 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.