C03 lesson 2 of 11 7 min read Beginner

Autofocus Systems, AF Modes and Subject Detection

When you half-press the shutter button, the lens moves and, a moment later, your subject snaps into focus. Behind that simple action is a clever system that measures the scene and decides how far to move the lens. Modern cameras can even recognise faces, eyes, animals and cars on their own. Knowing how autofocus works helps you understand why it sometimes struggles, and how to help it succeed.

The question this lesson answersHow does a camera find focus by itself, and what do features like eye detection actually do?

What is autofocus?

Autofocus, usually shortened to AF, is the camera system that measures the scene and moves the lens automatically until the chosen part of the picture is sharp. It saves time and is often faster and more accurate than focusing by hand, especially with moving subjects.

Autofocus has three parts that work together, and each has its own lesson in this course:

The three parts of autofocus
PartQuestion it answersLesson
How the camera measures focusHow does it know what is sharp?This lesson
Where the camera focusesWhich part of the frame should be sharp?selecting AF areas and focus points
When the camera focusesFocus once, or keep focusing?single-shot and continuous autofocus

Two ways to measure focus

Phase detection and contrast detection
Contrast detectionPhase detection
How it worksMoves the lens back and forth to find where edges look most contrastyCompares light from two sides of the lens to work out how far and in which direction to move
SpeedSlower; the lens may "hunt" back and forthFast; it knows the direction straight away
StrengthVery accurate on still subjectsExcellent for moving subjects
Where you find itOlder live view and compact cameras, often as part of hybrid systemsDSLR viewfinder AF and the sensors of most modern mirrorless cameras

Contrast detection works like a person adjusting binoculars: turn a little, check if it got sharper, turn again. Phase detection is cleverer. By comparing two views of the subject, it can tell whether focus is in front of or behind the subject and by how much, so it moves the lens straight to the right place.

DSLR and mirrorless autofocus

In a DSLR, a separate autofocus sensor sits below the mirror, as you can imagine from how a digital camera works. It only works when you use the optical viewfinder. In live view, the mirror flips up and older DSLRs fall back to slower methods.

In mirrorless cameras, phase detection points are built into the image sensor itself. This lets the camera focus across almost the whole frame. Many cameras combine phase and contrast detection, which is called hybrid AF. Canon's version, called Dual Pixel CMOS AF, splits each pixel into two halves so most of the sensor can perform phase detection.

Subject detection

Many modern cameras can recognise what is in the frame and focus on it automatically. This is called subject detection. It uses software trained on huge numbers of images, a form of artificial intelligence, to find things like:

  • People: faces, eyes, heads and bodies. Eye detection can keep the nearest eye sharp in a portrait.
  • Animals: dogs, cats and other animals, often including their eyes.
  • Birds: including birds in flight.
  • Vehicles: cars, motorbikes, trains and aircraft on some cameras.

Remember:The exact list depends on your camera and its software version. Some cameras need you to choose the subject type in the menu; others detect it automatically. Check your camera's manual.

Subject detection is a huge help, but it is not mind-reading. In a group photo, it may choose a face you did not want. With busy backgrounds or unusual subjects, it may lock onto the wrong thing. You still need to know how to choose the focus area yourself, which is the next lesson.

When autofocus struggles

Autofocus needs light and detail to measure. It can struggle when:

Situations that challenge autofocus
SituationWhy AF strugglesWhat helps
Very low lightToo little light to measureAdd light, use the AF-assist lamp, or focus manually
Plain surfaces (a white wall, clear sky)No edges or contrast to measureFocus on an edge at the same distance
Subject behind glass, fences or branchesAF may lock onto the nearer objectUse a small focus area, or manual focus
Very low contrast scenes (fog)Edges are too softFind the strongest edge you can

Many cameras have a small AF-assist lamp that shines on the subject in the dark to help focusing. It can be useful, but may be distracting at events. Manual focus, covered in manual focus and focus assistance, is the backup when autofocus cannot succeed.

Common mistakes

  • Assuming the camera knows your subject: even with detection, check which face or eye it chose.
  • Pointing at a plain area to focus: AF needs edges and contrast.
  • Blaming the lens in the dark: low light makes every AF system slower.
  • Forgetting the lens switch: many lenses have an AF/MF switch; if it is on MF, the camera will not autofocus.

How professionals use autofocus

Professionals trust modern autofocus, especially eye and subject detection, because it frees them to concentrate on timing and composition. But they always watch the focus box in the viewfinder to confirm it is on the right subject, and they know how to take control instantly when it is not. They also learn their own camera's habits in difficult light, so they are never surprised during an important moment.

Practical examples

A portrait with eye detection

Situation
You photograph a friend at f/1.8, and some photos have the ear sharp instead of the eye.
What to do
You turn on eye detection for people.
Why it works
At shallow depth of field, small focus errors matter; eye detection finds and follows the eye.
Result
The nearest eye is sharp in almost every frame.

A cat behind a window

Situation
You try to photograph a cat sitting behind a dirty window, and the camera focuses on the glass.
What to do
You move closer to the glass and use a small focus area on the cat's eye.
Why it works
The autofocus was choosing the nearest surface it could measure.
Result
The cat is sharp and the glass marks almost disappear.

Key points

  • Autofocus measures the scene and moves the lens to make the chosen area sharp.
  • Contrast detection hunts for maximum edge contrast; phase detection knows direction and distance.
  • Mirrorless cameras build phase detection into the sensor; hybrid AF combines methods.
  • Subject detection recognises faces, eyes, animals, birds and vehicles, but still needs checking.
  • AF struggles in low light, on plain surfaces and through obstacles.

Frequently asked questions

How does camera autofocus work?
The camera measures how sharp the scene is, using phase detection, contrast detection or both, then moves the lens until the chosen area is in focus.
What is the difference between phase and contrast detection?
Contrast detection moves the lens back and forth to find the sharpest point. Phase detection compares two views to know which way and how far to move, so it is faster.
What is eye detection autofocus?
It is a feature that recognises eyes and focuses on them automatically, which is especially helpful for portraits with shallow depth of field.
Why does my camera struggle to focus in the dark?
Autofocus needs light and contrast to measure. In low light there is too little information, so it becomes slower or fails.

Conclusion

Autofocus measures sharpness with phase detection, contrast detection or both, and modern cameras can even recognise your subject. It is fast and accurate, but it still needs light, detail and your guidance. Next, you will learn how to tell the camera exactly where to focus with AF areas and focus points.

Finished reading? Track your progress through Focus and depth of field.

Related lessons

0 views