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.
| Method | Information measured | Main strength | Main weakness |
|---|---|---|---|
| Phase detection | Direction and amount of error | Fast, predictive tracking | Calibration and low-light sensitivity limits |
| Contrast detection | Contrast peak on the sensor | High final accuracy | Hunting and slower acquisition |
| Hybrid | Phase estimate plus contrast refinement | Speed with accuracy | Depends on algorithm quality |
| Active assist | Distance from emitted light or infrared | Works in darkness at short range | Limited range and reflective-surface errors |
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.
| Mode | Behavior | Best suited to | Risk |
|---|---|---|---|
| Single AF (AF-S) | Focuses once, then locks | Static subjects, landscapes, products | Soft images if subject or camera moves |
| Continuous AF (AF-C) | Refocuses until exposure | Sports, wildlife, children, events | May shift to background if area is too wide |
| Automatic AF (AF-A) | Camera chooses single or continuous | Casual shooting | Late switching on sudden movement |
| Manual focus (MF) | Photographer turns the ring | Macro, astro, video pulls | Slow and error-prone without aids |
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.
| Parameter | Typical range | What it affects |
|---|---|---|
| Low-light limit | About EV -2 to EV -8 at ISO 100 with f/1.2 to f/2 | Focusing in dim interiors and at night |
| Coverage | About 50 percent in older DSLRs to nearly 100 percent on-sensor | Freedom to place subjects off center |
| Maximum aperture for AF | f/5.6 to f/11 depending on system | Use with teleconverters and slow lenses |
| Tracking sensitivity | Several user-selectable levels | How quickly AF switches to new objects |
| Lens motor type | Stepping, ultrasonic ring or linear motors | Speed, noise and smoothness for video |
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.
| Situation | Recommended approach | Reason |
|---|---|---|
| Bird in flight | Continuous AF with subject detection | Movement is too fast to follow manually |
| Night sky | Manual focus with magnification | Stars are too dim for reliable AF |
| Macro insect | Manual focus by moving the camera | Depth of field is millimeters deep |
| Portrait session | Single or continuous AF with Eye AF | Eye position decides perceived sharpness |
| Through glass or foliage | Single point AF or manual focus | Wide areas lock onto the obstruction |
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.