Every time you press the shutter button halfway, your camera performs an extraordinary feat of engineering. In a fraction of a second, it analyzes incoming light, calculates the distance to your subject, and adjusts lens elements with microscopic precision. Modern autofocus systems are so fast and reliable that most photographers take them for granted. But understanding how autofocus actually works gives you a real advantage. It helps you pick the right AF mode for every situation, troubleshoot focus failures, and consistently nail tack-sharp images even in difficult conditions.

The Two Fundamental Approaches to Autofocus
All camera autofocus systems work by analyzing light that passes through the lens. But they use fundamentally different methods to determine whether an image is in focus. The two core approaches are phase detection and contrast detection. Each has distinct strengths and weaknesses, and understanding both is essential to mastering your camera’s AF system.
Phase Detection Autofocus
Phase detection autofocus (PDAF) works by splitting incoming light into two separate beams and comparing them. Imagine looking through a rangefinder: you see two overlapping images, and when they align perfectly, the subject is in focus. Phase detection operates on exactly this principle, just at an electronic level.
In a traditional DSLR, a semi-transparent mirror redirects a portion of light down to a dedicated AF sensor module at the bottom of the camera body. This sensor contains pairs of tiny micro-lenses that split light from opposite sides of the lens aperture. When your subject is out of focus, the two light beams land in slightly different positions on the sensor. The camera’s processor measures this offset (the “phase difference”) and instantly calculates both the direction and the distance the lens needs to move. This is what makes phase detection so fast. It does not need to hunt back and forth. It knows exactly where to drive the lens in a single calculation.
The speed advantage is significant. Phase detection AF can lock focus in as little as 0.02 seconds in good light, making it the preferred system for action, sports, and wildlife photography. It also excels at continuous autofocus, where the camera tracks a moving subject and continuously adjusts focus in real time.
However, traditional phase detection has limitations. The dedicated AF sensor in DSLRs only covers a portion of the frame, typically concentrated around the center. Edge-of-frame AF points are often less accurate. And because the AF sensor is separate from the imaging sensor, there can be slight calibration misalignments (called front-focus or back-focus errors) that cause consistently soft images.
Contrast Detection Autofocus
Contrast detection takes a completely different approach. Instead of using a separate sensor, it reads directly from the main imaging sensor. The principle is straightforward: a focused image has higher contrast than a blurred one. Sharp edges show crisp transitions between light and dark pixels, while out-of-focus edges show gradual, muddy transitions.
The camera moves the lens slightly, reads the sensor, checks the contrast. It moves the lens a bit more, reads again, checks again. It keeps adjusting until it finds the lens position where contrast is at its maximum. That is the point of sharpest focus.
Contrast detection has some real strengths. Because it reads directly from the imaging sensor, there are no calibration issues. What you see is exactly what the sensor captures. It also works across the entire sensor area, not just a cluster of dedicated AF points. This makes it excellent for precise focus in controlled situations like studio work, macro photography, and landscape photography.
The downside? Speed. Contrast detection must search for focus by moving the lens back and forth. It has no way of knowing which direction to move initially or how far. This “hunting” behavior takes time, which is why pure contrast detection AF feels slower and less decisive than phase detection. You can actually see it in the viewfinder or on the LCD: the image goes soft, then sharp, then slightly past sharp, then back to sharp as the system homes in on the focus point. For stationary subjects, this is fine. For fast action, it can be a deal-breaker.
Hybrid Autofocus: The Best of Both Worlds
Modern mirrorless cameras have largely solved the speed problem of contrast detection by incorporating phase detection pixels directly into the imaging sensor. This approach, called hybrid autofocus or on-sensor phase detection, combines the speed of phase detection with the accuracy of contrast detection.
In a hybrid system, certain pixels on the imaging sensor are designed with asymmetric micro-lenses or masked photodiodes that function as phase detection sensors. These pixels are scattered across the sensor surface, often covering 90% or more of the frame. The camera uses these embedded phase detection pixels for the initial, fast focus acquisition, then fine-tunes focus using contrast detection for the final adjustment.
The result is autofocus that is both fast and accurate. Early hybrid systems used a relatively small number of phase detection pixels and were noticeably slower than dedicated DSLR AF modules. But current implementations use thousands of phase detection points spread across virtually the entire sensor, matching or exceeding the speed of the best DSLR systems while maintaining pinpoint accuracy.
This evolution is one of the key reasons mirrorless cameras have overtaken DSLRs in autofocus performance. With no separate AF module to calibrate, no mirror to flip out of the way, and phase detection pixels covering the entire frame, mirrorless hybrid AF systems offer a significant practical advantage for most shooting situations.
Eye AF and Subject Detection
The most transformative autofocus development in recent years is subject detection, commonly known as Eye AF. Traditional autofocus systems focus on whatever falls within the selected AF point. It is up to the photographer to place that point on the subject’s eye, the critical focus point for any portrait. Subject detection changes this entirely by using machine learning to recognize and track specific subjects in the frame.
Eye AF identifies human eyes in the scene and locks focus onto them automatically, regardless of where they appear in the frame. The photographer no longer needs to manually position an AF point. The camera simply finds the eye and tracks it, even as the subject moves, turns their head, or is partially obscured. This is a genuine revolution for portrait photography, wedding photography, and any situation where you need consistent eye-sharp focus on people.
Modern implementations extend beyond human eyes. Most current cameras can detect and track animals (including birds), vehicles, aircraft, trains, and other subjects. The camera identifies the subject type, locks onto it, and maintains focus as it moves through the frame. For wildlife and nature photography, animal eye detection has been particularly impactful, delivering keeper rates that would have been nearly impossible with manual AF point selection.
These detection systems rely on dedicated image processing hardware running neural networks trained on millions of images. The processing happens in real time, typically analyzing 30 to 120 frames per second to maintain continuous tracking. The algorithms improve with each camera generation as manufacturers refine their training data and processing capabilities.
AF Tracking and Continuous Focus
Focusing on a stationary subject is relatively straightforward. The real challenge comes when your subject is moving, especially moving toward or away from the camera. This is where AF tracking and continuous autofocus become essential.
Continuous AF (called AF-C on most cameras, AI Servo on some systems) keeps the autofocus system active as long as you hold the shutter button halfway or use a dedicated AF-ON button. The camera continually adjusts focus to keep up with a moving subject. The AF processor predicts where the subject will be at the moment of exposure, compensating for the brief delay between the last focus calculation and the actual shutter release.
This predictive behavior is critical. If a bird is flying toward you at speed, the focus distance is changing rapidly. By the time the shutter actually fires, the subject is slightly closer than where the AF system last measured it. Advanced AF systems use algorithms that analyze the subject’s speed, direction, and acceleration to predict its position at the exact moment of capture. The best systems maintain accurate tracking even through brief obstructions, like a post or another person passing in front of the subject.
AF tracking across the frame works in tandem with continuous focus. When a subject moves from one area of the frame to another, the camera hands off tracking from one cluster of AF points to the next. Wide AF coverage (covering most of the sensor area) makes this handoff seamless. Cameras with limited AF coverage struggle when subjects move toward the edges of the frame, because tracking fails once the subject leaves the AF area.
Understanding AF Modes
Every camera offers several autofocus modes, and choosing the right one for the situation is one of the most important decisions you will make for each shot. Here is what you need to know about each mode and when to use it.
Single AF (AF-S / One-Shot AF)
In single AF mode, the camera focuses once when you press the shutter button halfway, then locks focus at that distance. It will not refocus until you release the button and press it again. This mode is ideal for stationary subjects: landscapes, architecture, still life, posed portraits. The focus lock gives you the freedom to recompose the shot after focusing without worrying about the camera refocusing on a different element.
Most cameras will not let you fire the shutter unless focus has been confirmed, which serves as a safety net against blurry shots. If the AF system cannot lock on, the shutter simply will not release.
Continuous AF (AF-C / AI Servo)
Continuous AF keeps the focus system active and constantly adjusting. As long as the shutter button is held halfway (or the AF-ON button is pressed), the camera tracks the subject and continuously updates focus. This is the mode for moving subjects: sports, wildlife, children playing, street photography. The shutter fires whether focus has been confirmed or not, giving you the freedom to shoot at any moment.
The trade-off is that continuous AF occasionally misjudges, especially in complex scenes with multiple subjects at different distances. Your hit rate depends on the quality of the AF system, the speed and unpredictability of the subject, and how well you maintain the AF point on target.
Auto AF (AF-A / AI Focus)
Auto AF attempts to detect whether the subject is stationary or moving and automatically switches between single and continuous modes. In theory, this sounds ideal. In practice, the camera’s judgment is not always reliable. It may switch to continuous mode when you do not want it to, or stick with single mode when the subject starts moving. Many experienced photographers prefer to set the mode themselves rather than leaving the decision to the camera.
AF Area Modes
In addition to single vs. continuous focus behavior, you also choose how many AF points the camera uses and how they are arranged. This is the AF area mode, and it is just as important as the AF mode itself.
Single Point AF uses one AF point that you position manually. The camera only focuses on whatever falls under that specific point. This gives you maximum control and is ideal when you know exactly where you want to focus, especially in situations where the background or other elements might confuse a wider AF area. Use it for still subjects, precise macro work, and portraits where you want to lock onto a specific eye.
Zone or Group AF uses a cluster of AF points in a small area. The camera focuses using the nearest subject within that group. This provides a larger target area than single point, making it easier to keep a moving subject covered without requiring pixel-perfect placement. It is a great compromise for moderately fast subjects like runners, cyclists, or pets.
Wide Area or Auto Area AF lets the camera use all available AF points and decide what to focus on. Combined with subject detection, this can be extremely effective. The camera finds the subject (a face, an eye, an animal) and tracks it across the entire frame. Without subject detection, wide area modes tend to focus on whatever is closest or most prominent, which may not be your intended subject.
How Autofocus Performance Varies with Light
Autofocus systems need light and contrast to work. Their performance degrades as light levels drop and scenes become more uniform. Understanding these limitations helps you adapt your technique when conditions are less than ideal.
Phase detection AF generally works well down to about -3 to -4 EV (roughly the light level of a dimly lit room). Below that, it struggles. Contrast detection can sometimes work in slightly lower light because it reads the full signal from the imaging sensor, but it also slows down significantly.
Low-contrast subjects are equally challenging. A clear blue sky, a white wall, a uniformly colored fabric surface. These give the AF system nothing to latch onto. The system needs edges, textures, and tonal transitions to calculate focus.
When autofocus struggles, you have several options. Switch to a higher-contrast area at the same distance, focus on a nearby edge or texture, use the camera’s AF illuminator (a small lamp or flash burst that projects a pattern onto the subject), or switch to manual focus. In very low light, manual focus with focus peaking (a feature that highlights in-focus edges on the screen) is often more reliable than any AF system.
The Role of Aperture in Autofocus
Your lens’s maximum aperture directly affects autofocus performance, especially with phase detection systems. Phase detection measures light from opposite sides of the lens aperture. A wider aperture means a larger baseline for the phase measurement, which translates to greater precision and better performance in low light.
This is why fast lenses (f/2.8, f/2, f/1.4) generally autofocus faster and more accurately than slower lenses (f/5.6, f/6.3). The AF system always uses the lens wide open for focusing, regardless of what aperture you have set for the exposure. It only stops down to your selected aperture at the moment of capture.
When you use a teleconverter or an extremely slow lens, the effective maximum aperture may drop to f/8 or smaller. At that point, many AF points stop functioning because there is not enough light separation between the two phase detection beams. Some cameras disable all but the center AF point when the maximum aperture is smaller than f/8. Higher-end cameras often have AF sensors that remain operational at f/8 or even f/11, specifically to support the use of teleconverters on long telephoto lenses.
Back Button Focus
By default, pressing the shutter button halfway activates autofocus and fully pressing it takes the photo. Back button focus separates these two functions. You assign autofocus to a button on the back of the camera (usually AF-ON or AE-L/AF-L) and remove the autofocus function from the shutter button entirely.
This seemingly small change gives you remarkable flexibility. Press the back button to focus, release it to lock. Now the shutter button only fires the camera. You effectively have single AF behavior by tapping the back button once, and continuous AF behavior by holding it down, without ever changing a menu setting. For subjects that briefly stop moving (like a bird perching between flights), you can instantly switch between locked and tracking focus just by pressing or releasing one button.
Back button focus also prevents accidental refocusing. With the default setup, every time you press the shutter, the camera refocuses. If you have carefully composed a shot with focus exactly where you want it, an accidental half-press can ruin the focus position. With back button focus, the shutter never interferes with your focus setting.
AF Fine Tuning and Calibration
DSLRs with separate phase detection AF modules occasionally exhibit front-focus or back-focus issues, where the AF consistently focuses slightly in front of or behind the intended subject. This happens because the AF sensor and the imaging sensor are physically separate components that must be precisely aligned. Manufacturing tolerances mean that slight misalignments can occur.
Most mid-range and higher DSLRs include an AF micro-adjustment feature that lets you store a correction value for each lens. You test the focus accuracy with a calibration target, determine the offset, and dial in a correction. This is a one-time setup per lens that can dramatically improve focus consistency.
Mirrorless cameras with on-sensor phase detection do not have this issue. Because the AF system reads from the same sensor that captures the image, there is no physical offset to calibrate. This is another practical advantage of mirrorless systems, especially for photographers who use many different lenses.
Common Mistakes
Even experienced photographers make autofocus errors. Here are the most frequent mistakes and how to avoid them.
- Using the wrong AF mode for the situation. Single AF for moving subjects leads to out-of-focus shots because the camera does not track movement. Continuous AF for stationary subjects can cause the focus to shift between frames. Match the mode to the subject.
- Relying entirely on auto area AF without subject detection. When the camera chooses the AF point, it often focuses on the wrong element, especially the closest or most contrasty object rather than the intended subject. Use single point or zone AF when you need precise control.
- Ignoring the AF area in favor of focus-and-recompose. Locking focus with a center point and then recomposing moves the focal plane slightly, especially with wide apertures and close subjects. This can place focus behind the intended target. Use an off-center AF point instead.
- Not understanding when to switch to manual focus. Low-contrast scenes, shooting through glass or fences, macro work at extreme magnifications. These situations often defeat autofocus. Recognizing when to switch to manual focus saves time and frustration.
- Forgetting to check AF calibration on DSLRs. If your images are consistently soft despite good technique, the AF may be front- or back-focusing. Run a calibration test with each lens and apply micro-adjustment as needed.
- Using single point AF for fast, erratic subjects. A single tiny AF point is extremely hard to keep on a fast-moving bird or athlete. Use zone or group AF to give yourself a larger target area while still maintaining reasonable control over which part of the scene the camera focuses on.
Try This: Practical Autofocus Exercises
Understanding autofocus theory is valuable, but nothing replaces hands-on practice. Try these exercises to build your AF skills and develop an intuitive feel for how your camera’s system behaves.
- Compare AF modes on a moving subject. Find a predictable moving subject (a pet walking, a person jogging, a cyclist). Shoot the same scene using single AF, continuous AF, and auto AF. Compare the results at 100% magnification. Notice how single AF locks and does not follow the movement, while continuous AF tracks the subject. This teaches you viscerally why mode selection matters.
- Test AF area modes. Set up a scene with objects at different distances (a cup on a table, a chair further back, a wall beyond). Switch between single point, zone, and wide area AF modes. Notice how each mode selects its focus target differently. Pay attention to how single point gives you precise control while wide area tends to pick the nearest or most prominent object.
- Practice back button focus. Configure your camera for back button AF and spend a full shooting session using it exclusively. Practice tapping the button once to lock focus on a still subject, then holding it down to track a moving one. After a few hours, most photographers find they never want to go back to shutter-button AF.
- Find your AF system’s low-light limit. In a dimly lit room, progressively reduce the light (turn off lamps one at a time or move further from a light source). Keep testing your autofocus at each light level. Note where it starts to slow down, where it begins hunting, and where it fails entirely. This knowledge tells you exactly when to switch to manual focus in real shooting situations.
- Test focus-and-recompose vs. off-center AF points. With a wide aperture (f/2 or wider), focus on a subject using the center point and recompose. Then shoot the same subject using an AF point placed directly on it without recomposing. Compare the two at 100% magnification. At wide apertures and closer distances, the recompose method often puts focus slightly behind the intended spot, revealing why off-center AF points are preferable when precision matters.
Frequently Asked Questions
Why does my camera’s autofocus hunt back and forth without locking?
AF hunting usually happens when the system cannot find enough contrast to determine focus. This is common in low light, on smooth or uniform surfaces, and when the AF point is on an area with no texture or edge detail. Move the AF point to a higher-contrast area at the same distance, add more light if possible, or switch to manual focus. A dirty or smudged lens front element can also cause hunting by reducing overall contrast.
Is phase detection always better than contrast detection?
Not always. Phase detection is faster for initial focus acquisition and better for tracking moving subjects. But contrast detection is inherently more accurate because it reads directly from the imaging sensor with no calibration offset. For static subjects in good light where speed is not critical, contrast detection can deliver slightly sharper results. Modern hybrid systems that combine both offer the best overall performance.
What is the difference between AF points and AF zones?
An AF point is a single location on the sensor where the camera can detect focus. An AF zone is a group of AF points that work together as a cluster. When using zone AF, the camera evaluates all points in the zone and typically focuses on the nearest subject within that area. Zones give you a larger target area for tracking moving subjects while still restricting focus to a specific region of the frame.
Do I need to worry about AF calibration with a mirrorless camera?
No. Mirrorless cameras use on-sensor autofocus, which reads focus directly from the imaging sensor. There is no physical separation between the AF system and the image capture, so calibration errors do not occur. This is a significant practical advantage of mirrorless systems, especially when using multiple lenses. DSLRs with separate AF modules may need lens-by-lens micro-adjustment.
Should I use Eye AF all the time?
Eye AF is excellent for portraits and any situation where a recognizable subject is in the frame. However, it can be counterproductive when you intentionally want to focus on something other than a face or eye. In landscape photography, still life, macro, or abstract work, subject detection may latch onto something unintended or have nothing to detect. Turn it off when it does not serve the shot.
How does autofocus work in video mode?
Video AF on modern cameras uses the same hybrid phase/contrast detection system as still photography, but with different priorities. The AF must be smooth rather than fast, because sudden focus jumps look jarring in video. Cameras apply damping to AF movements so focus transitions happen gradually. Touch-to-focus features let you tap the screen to shift focus to a new subject, and the camera racks focus smoothly to the new target. AF speed and sensitivity settings let you customize how quickly and aggressively the system responds to changes.
Why do some lenses focus faster than others?
Several factors affect lens AF speed. The lens motor type is the biggest factor. Linear motors and ultrasonic ring motors move focus elements quickly and quietly. Older mechanical screw-drive lenses are typically slower and noisier. The weight of the focus element matters too. Lenses that move a small, lightweight internal group focus faster than lenses that move a large, heavy group. Maximum aperture plays a role as well, since wider apertures give the AF system more light and a larger phase baseline to work with.