Autofocus

Also known as: AF

On this page 7

Autofocus (AF) is the camera system that measures how far the image is out of focus and drives the lens focusing group until the selected subject is rendered sharp on the sensor or film plane. In photography it replaces turning the focus ring by hand and is the core concept of the Focus & autofocus topic, alongside manual focus, focus peaking and focus stacking.

A modern autofocus system combines three jobs: a focus detection method that senses the error, an AF area and subject logic that decides what should be sharp, and a focus motor and control loop that moves the optics quickly and precisely. The quality of each part, not one headline specification, decides whether a camera keeps a moving subject sharp.

How autofocus detects and corrects focus error

Every autofocus system works as a closed feedback loop: it measures a focus signal, calculates a correction, moves the lens and measures again. The detection step decides how much information the camera has about the error, and that determines speed and behavior with moving subjects.

Phase detection AF splits light from opposite sides of the lens aperture and compares the two images. The offset between them tells the camera both the direction and the approximate distance of the focus error, so the lens can jump close to the correct position in one move. In DSLRs this happens on a separate AF module below the mirror; in mirrorless cameras the sensor itself carries on-sensor phase detection pixels.

Contrast detection AF reads the image from the main sensor and moves the lens while watching local contrast rise and fall. It finds the peak very accurately, because it measures the real image, but it has no direction information at the start and must overshoot the peak to confirm it. This search is the visible hunting that slower compact and early mirrorless cameras show.

Hybrid autofocus combines both: phase data brings the lens near focus quickly and contrast data refines the final position. Some systems also use the depth estimate from subject recognition or, in smartphones, from time-of-flight and laser rangefinding modules to assist the loop in low light.

The following table compares the main detection methods by the information they provide and their typical strengths.

MethodInformation measuredMain strengthMain weakness
Phase detectionDirection and amount of errorFast, predictive trackingCalibration and low-light sensitivity limits
Contrast detectionContrast peak on the sensorHigh final accuracyHunting and slower acquisition
HybridPhase estimate plus contrast refinementSpeed with accuracyDepends on algorithm quality
Active assistDistance from emitted light or infraredWorks in darkness at short rangeLimited range and reflective-surface errors
Autofocus detection methods compared

Autofocus modes and area settings

Autofocus modes define when the camera stops adjusting focus, while AF area modes define where in the frame it looks. Choosing both correctly matters more than raw focusing speed, because a fast system focused on the wrong object still produces a soft subject.

Single autofocus (AF-S or One Shot) focuses once and locks while the shutter button stays half-pressed. Continuous autofocus (AF-C or AI Servo) keeps recalculating and uses predictive algorithms to estimate where a moving subject will be at the moment of exposure. An automatic mode (AF-A or AI Focus) switches between them, but its decision is often too late for fast action.

This table summarizes the common modes and when each is the sensible default.

ModeBehaviorBest suited toRisk
Single AF (AF-S)Focuses once, then locksStatic subjects, landscapes, productsSoft images if subject or camera moves
Continuous AF (AF-C)Refocuses until exposureSports, wildlife, children, eventsMay shift to background if area is too wide
Automatic AF (AF-A)Camera chooses single or continuousCasual shootingLate switching on sudden movement
Manual focus (MF)Photographer turns the ringMacro, astro, video pullsSlow and error-prone without aids
Focus modes and typical use

Area modes range from a single AF point to zones, wide areas and full-frame subject tracking. Current systems add Eye AF and recognition of people, animals, birds and vehicles, which select the subject automatically and hand over to tracking as it moves across the frame.

Parameters that decide autofocus performance

Autofocus performance depends on several measurable parameters rather than a single speed figure. Manufacturers publish some of them, such as the low-light detection limit, while others, such as tracking reliability, appear only in practical testing.

ParameterTypical rangeWhat it affects
Low-light limitAbout EV -2 to EV -8 at ISO 100 with f/1.2 to f/2Focusing in dim interiors and at night
CoverageAbout 50 percent in older DSLRs to nearly 100 percent on-sensorFreedom to place subjects off center
Maximum aperture for AFf/5.6 to f/11 depending on systemUse with teleconverters and slow lenses
Tracking sensitivitySeveral user-selectable levelsHow quickly AF switches to new objects
Lens motor typeStepping, ultrasonic ring or linear motorsSpeed, noise and smoothness for video
Key autofocus parameters and typical ranges

The lens matters as much as the body. Fast linear motors and light focusing groups allow the body to exploit its full tracking rate, while older lenses with heavy elements can limit a modern camera. Wide apertures also give phase detection a longer baseline, which improves sensitivity in low light.

Autofocus compared with manual focus and focus aids

Autofocus is not always the better choice; it is the better choice when speed and subject movement dominate. Manual focus wins when the scene is static, when the subject has little contrast, or when the photographer needs a deliberate focus plane that no algorithm can infer.

Many photographers combine both through back-button focus, which moves AF activation from the shutter button to a rear button, and through AF plus MF override, which allows a final manual touch-up. Focus peaking and magnification support manual refinement on an electronic viewfinder.

SituationRecommended approachReason
Bird in flightContinuous AF with subject detectionMovement is too fast to follow manually
Night skyManual focus with magnificationStars are too dim for reliable AF
Macro insectManual focus by moving the cameraDepth of field is millimeters deep
Portrait sessionSingle or continuous AF with Eye AFEye position decides perceived sharpness
Through glass or foliageSingle point AF or manual focusWide areas lock onto the obstruction
Choosing between autofocus and manual focus

Common autofocus errors and their causes

Most autofocus failures come from subject selection or technique, not from a defective system. Recognizing the pattern of the error usually points directly to the cause.

  • Front focus or back focus on a DSLR often comes from a mismatch between the separate AF module and the sensor plane; mirrorless on-sensor AF largely removes this calibration issue.
  • Focus and recompose with a wide aperture shifts the focus plane, because rotating the camera changes the subject distance; selecting an AF point on the subject avoids it.
  • Hunting in low light occurs below the low-light limit or on surfaces without texture, such as plain walls or clear skies.
  • Tracking jumps to the background when the AF area is too wide or tracking sensitivity is set too responsive for the scene.
  • Focus breathing in some lenses changes framing during focusing, which matters mostly in video but can confuse visual judgment.

Explained without jargon

Autofocus is the part of the camera that makes the picture sharp for you. When you press the button halfway, the camera looks at the scene, works out whether the subject is too blurry in front or behind, and moves glass inside the lens until it is clear.

Think of it as a very fast assistant turning the focus ring while you concentrate on the moment. The assistant is excellent with moving people and animals, but it still needs to know what you want sharp. Telling the camera where to look is the most important skill.

A typical use case

A wildlife photographer at a coastal reserve photographs terns diving for fish with a 600 mm lens at f/6.3 and 1/3200 s. She sets continuous autofocus with bird detection, a medium zone as the starting area and back-button focus so that releasing the shutter does not interrupt tracking.

When a tern leaves the sky and drops against a busy shoreline, the zone keeps the camera from locking onto rocks, while bird detection finds the head and holds focus through the dive. Shooting bursts at 20 frames per second, she reviews the sequence and finds that most frames show a sharp eye, a result that manual focus could not achieve at that speed and magnification.