Depth and Focus
Photography Fundamentals
Course 1 · Chapter 3 · Depth and Focus: Depth of Field and Autofocus
What Depth of Field Is
Only one distance is truly in focus, but a band around it looks acceptably sharp. Wikipedia's Depth of field article describes depth of field (DOF) as the distance between the nearest and the farthest objects that appear in acceptably sharp focus. Photography Fundamentals 1 noted that opening the aperture decreases depth of field; Photography Fundamentals 2 gave the focal length and sensor size. This chapter brings them together.
What Controls It
The article gives an approximate formula, DOF = 2 u squared N c / f squared, for subject distance u, f-number N, circle of confusion c and focal length f. The circle of confusion is the largest blur spot that still looks like a point. Reading the formula:
| Change | Effect on DOF (per the article) |
|---|---|
| Wider aperture (lower N) | Reduces DOF; DOF grows in proportion to the f-number for a fixed framing |
| Subject distance | Changes with the square of the distance |
| Focal length | Changes inversely with the square of the focal length |
| Circle of confusion | Changes linearly with c |
| Sensor size | With focal length and aperture held constant, a smaller sensor reduces DOF by the crop factor |
Trying the Formula
The script below applies the approximation. I ran it and the output is shown.
Focus: Hyperfocal Distance
The article defines the hyperfocal distance as the distance beyond which all objects can be brought into acceptable focus, and gives maximum DOF. Focusing at that distance gives a DOF from half the hyperfocal distance to infinity. The commonly quoted formula H = f squared / (N c) + f was not in the part of the article I read, so treat it as unconfirmed (check).
Autofocus
From Wikipedia's Autofocus article: active systems measure the distance to the subject independently of the optical system (the article cites ultrasonic, infrared and time-of-flight methods); passive systems analyse the incoming image and need enough light and contrast.
| Passive method | How it works | Traits |
|---|---|---|
| Phase detection | Splits the light into pairs of images and compares them | Fast; gives direction and distance to move; common in SLRs |
| Contrast detection | Adjusts focus until contrast peaks in a sensor field | Common in cameras without reflex mirrors; slower, no direction, harder for moving subjects |
Focus modes: single-shot (Canon "One-Shot", Nikon "AF-S") halts on focus confirmation. Continuous (Canon "AI Servo", Nikon AF-C) predicts a moving subject's position from its speed and acceleration, which suits sports and action. The article's description is general; how current mirrorless cameras combine the methods was not covered in my reading (check).
Not Yet Verified, and Sources
- Sources. Wikipedia articles Depth of field (read to about 100,000 of 112,055 characters; the last 12,000 were not read) and Autofocus (summary only).
- Not confirmed. The 0.03 mm circle of confusion for full-frame stills, the hyperfocal formula, accuracy of the approximation at close range, and how modern autofocus combines methods (all check).
Exercises
Using the script with c = 0.03, find the approximate DOF for a 35 mm lens at 3 m (3000 mm) at f/4 and at f/8. How does the result compare with the rule that DOF grows in proportion to the f-number?
A portrait is taken at 2 m with a 50 mm lens at f/2.8. Without running the script, say what the DOF becomes if you step back to 4 m (and do not change anything else), and give the reason. Then confirm with the script output in the chapter.
Choose single-shot or continuous focus, and phase or contrast detection if you had the choice, for (a) a still landscape and (b) a child running. Give one sentence of reasoning each, based on the autofocus table.
Quick Reference
- DOF: about 2 u squared N c / f squared
- More DOF: higher f-number, greater distance, shorter focal length
- Phase detection: fast, gives direction
- Contrast detection: slower, no direction
- Modes: single-shot locks; continuous tracks
- Check: circle of confusion for stills, hyperfocal formula