Autofocus is the ability of a camera/lens system to automatically adjust the focus of the lens via a motor attached to the focus group of the lens. Contrast with manual focus.
Cameras may auto-focus by either active or passive means:
- Active autofocus works by separately measuring subject distance (e.g. by laser rangefinding) and adjusting the lens to match.
- Passive autofocus uses the subject image arriving through the lens to achieve a sharp image.
Active autofocus is now rare on professional and enthusiast bodies, though is making something of a comeback in the low-end, particularly on mobile phone integrated cameras.
There are two main forms of passive autofocus:
- Contrast detection simply observes the sharpness of (regions of) the image received by a digital sensor, and attempts to maximise it by adjusting the lens, using a guided form of trial and error. This is a common method in cheap compact digital cameras, as it requires no additional hardware - it uses the existing image sensor and processor.
- Phase detection requires some beam-splitting elements and extra sensors to determine exactly how far from true focus the image is at each sensor. This allows much faster focus acquisition, though limited to only those locations that have focus sensors (contrast detection can work using any region of the image).
The ability of a camera to auto-focus depends greatly on the incident light - bright conditions give an accurate and fast focus, whereas dim conditions frequently give poor results or even a failure to find focus. To help get good focus, many cameras incorporate a light to add extra illumination to the subject during the focusing. This is often known as an AF-assist lamp, or AF-illuminator.
Accurate through-the-lens focusing also depends on the maximum aperture of the lens. Not only does a fast lens admit more light, but it also allows a wider baseline for focus measurement. Note that the programmed aperture is irrelevant, as most cameras use the lens at maximum aperture during focusing, and stop it down for the actual capture.