An autofocus (AF) optical system uses a sensor, a control system and a motor to focus on an automatically or manually selected point or area. An electronic rangefinder has a display instead of the motor; the adjustment of the optical system has to be done manually until indication. Autofocus methods are distinguished as active, passive or hybrid types.
Autofocus systems rely on one or more sensors to determine correct focus. Some AF systems rely on a single sensor, while others use an array of sensors. Most modern SLR cameras use through-the-lens optical sensors, with a separate sensor array providing light metering, although the latter can be programmed to prioritize its metering to the same area as one or more of the AF sensors.
Through-the-lens optical autofocusing is usually speedier and more precise than manual focus with an ordinary viewfinder, although more precise manual focus can be achieved with special accessories such as focusing magnifiers. Autofocus accuracy within 1/3 of the depth of field (DOF) at the widest aperture of the lens is common in professional AF SLR cameras.
Most multi-sensor AF cameras allow manual selection of the active sensor, and many offer automatic selection of the sensor using algorithms which attempt to discern the location of the subject. Some AF cameras are able to detect whether the subject is moving towards or away from the camera, including speed and acceleration, and keep focus — a function used mainly in sports and other action photography. Canon cameras call this AI servo; Nikon cameras call it "continuous focus".
The data collected from AF sensors is used to control an electromechanical system that adjusts the focus of the optical system. A variation of autofocus is an electronic rangefinder, in which focus data are provided to the operator, but adjustment of the optical system is still performed manually.
The speed of the AF system is highly dependent on the widest aperture offered by the lens at the current focal length. F-stops of around 2 to 2.8 are generally considered best for focusing speed and accuracy. Faster lenses than this (e.g.: 1.4 or 1.8) typically have very low depth of field, meaning that it takes longer to achieve correct focus, despite the increased amount of light. Most consumer camera systems will only autofocus reliably with lenses that have a widest aperture of at least 5.6, whilst professional models can often cope with a widest aperture of 8, which is particularly useful for lenses used in conjunction with teleconverters.
History Between 1960 and 1973, Leitz (Leica) patented an array of autofocus and corresponding sensor technologies. In 1976, Leica had presented a camera based on their previous development at Photokina, named Correfot, and in 1978 they displayed an SLR camera with fully operational autofocus.
The first mass-produced autofocus camera was the Konica C35 AF, a simple point and shoot model released in 1977. The Polaroid SX-70 Sonar OneStep was the first autofocus single-lens reflex camera, released in 1978.
The Pentax ME-F, which used focus sensors in the camera body coupled with a motorized lens, became the first autofocus 35 mm SLR in 1981.
In 1983 Nikon released the F3AF, their first autofocus camera, which was based on a similar concept to the ME-F.
The Minolta 7000, released in 1985, was the first SLR with an integrated autofocus system, meaning both the AF sensors and the drive motor were housed in the camera body, as well as an integrated film advance winder — which was to become the standard configuration for SLR cameras from this manufacturer, and also Nikon abandoned their F3AF system and integrated the autofocus-motor and sensors in the body.
Canon decided to discontinue their FD mount and switched to the completely electronic EF mount with motorised lenses in 1987.
Pentax was the first to introduce focusing distance measurement for SLR cameras with the FA and FA* series lenses from 1991. Their first KAF-mount Pentax lenses with AF had been introduced in 1989.
In 1992, Nikon changed back to lens integrated motors with their AF-I and AF-S range of lenses; today their entry-level DSLRs do not have a focus motor in the body due to the availability of motors in all new developed AF-Lenses.
Active
Active AF systems measure distance to the subject independently of the optical system, and subsequently adjust the optical system for correct focus.
There are various ways to measure distance, including ultrasonic sound waves and infrared light. In the first case, sound waves are emitted from the camera, and by measuring the delay in their reflection, distance to the subject is calculated. Polaroid cameras including the Spectra and SX-70 were known for successfully applying this system. In the latter case, infrared light is usually used to triangulate the distance to the subject. Compact cameras including the Nikon 35TiQD and 28TiQD, the Canon AF35M, and the Contax T2 and T3, as well as early video cameras, used this system. A newer approach included in some consumer electronic devices, like mobile phones, is based on the time-of-flight principle, which involves shining a laser or LED light to the subject and calculating the distance based on the time it takes for the light to travel to the subject and back. This technique is sometimes called laser autofocus, and is present in many mobile phone models from several vendors. It is also present in industrial and medical devices.
An exception to the two-step approach is the mechanical autofocus provided in some enlargers, which adjust the lens directly.
Passive Passive AF systems determine correct focus by performing passive analysis of the image that is entering the optical system. They generally do not direct any energy, such as ultrasonic sound or infrared light waves, toward the subject. (However, an autofocus assist beam of usually infrared light is required when there is not enough light to take passive measurements.) Passive autofocusing can be achieved by phase detection or contrast measurement.
Phase detection
Phase detection (PD) is achieved by dividing the incoming light into pairs of images and comparing them. Through-the-lens secondary image registration (TTL SIR) passive phase detection is often used in film and digital SLR cameras. The system uses a beam splitter (implemented as a small semi-transparent area of the main reflex mirror, coupled with a small secondary mirror) to direct light to an AF sensor at the bottom of the camera. Two micro-lenses capture the light rays coming from the opposite sides of the lens and divert it to the AF sensor, creating a simple rangefinder with a base within the lens's diameter. The two images are then analysed for similar light intensity patterns (peaks and valleys) and the separation error is calculated in order to find whether the object is in front focus or back focus position. This gives the direction and an estimate of the required amount of focus-ring movement.
PD AF in a continuously focusing mode (e.g. "AI Servo" for Canon, "AF-C" for Nikon, Pentax and Sony) is a closed-loop control process. PD AF in a focus-locking mode (e.g. "One-Shot" for Canon, "AF-S" for Nikon and Sony) is widely believed to be a "one measurement, one movement" open-loop control process, but focus is confirmed only when the AF sensor sees an in-focus subject. The only apparent differences between the two modes are that a focus-locking mode halts on focus confirmation, and a continuously focusing mode has predictive elements to work with moving targets, which suggests they are the same closed-loop process.
Although AF sensors are typically one-dimensional photosensitive strips (only a few pixels high and a few dozen wide), some modern cameras (Canon EOS-1V, Canon EOS-1D, Nikon D2X) feature TTL area SIR sensors that are rectangular in shape and provide two-dimensional intensity patterns for a finer-grain analysis. Cross-type focus points have a pair of sensors oriented at 90° to one another, although one sensor typically requires a larger aperture to operate than the other.
Some cameras (Minolta 7, Canon EOS-1V, 1D, 30D/40D, Pentax K-1, Sony DSLR-A700, DSLR-A850, DSLR-A900) also have a few "high-precision" focus points with an additional set of prisms and sensors; they are only active with "fast lenses" with certain geometrical apertures (typically f-number 2.8 and faster). Extended precision comes from the wider effective measurement base of the "range finder"
Some modern sensors (for example one in Librem 5) include about 2% phase detection pixels on the chip. With suitable software support, that enables phase detection auto focus.
Contrast detection Contrast-detection autofocus is achieved by measuring contrast (vision) within a sensor field through the lens. The intensity difference between adjacent pixels of the sensor naturally increases with correct image focus. The optical system can thereby be adjusted until the maximal contrast is detected. In this method, AF does not involve actual distance measurement at all. This creates significant challenges when tracking moving subjects, since a loss of contrast gives no indication of the direction of motion towards or away from the camera.
Contrast-detect autofocus is a common method in digital cameras that lack shutters and reflex mirrors. Most DSLRs use this method (or a hybrid of both contrast and phase-detection autofocus) when focusing in their live-view modes. A notable exception is Canon digital cameras with Dual Pixel CMOS AF. Mirrorless interchangeable-lens cameras typically used contrast-measurement autofocus, although phase detection has become the norm on most mirrorless cameras giving them significantly better AF tracking performance compared to contrast detection.
Contrast detection places different constraints on lens design when compared with phase detection. While phase detection requires the lens to move its focus point quickly and directly to a new position, contrast-detection autofocus instead employs lenses that can quickly sweep through the focal range, stopping precisely at the point where maximal contrast is detected. This means that lenses designed for phase detection often perform poorly on camera bodies that use contrast detection.
Assist lamp The assist light (also known as AF illuminator) "activates" passive autofocus systems in low-light and low-contrast situations in some cameras. The lamp projects visible or IR light onto the subject, which the camera's autofocus system uses to achieve focus.
Flash-based Many cameras and nearly all camera phones lack a dedicated autofocus assist lamp. Instead, they use their built-in flash, illuminating the subject with bursts of light. This aids the autofocus system in the same fashion as a dedicated assist light, but has the disadvantage of startling or annoying people. Another disadvantage is that if the camera uses flash focus assist and is set to an operation mode that overrides the flash, it may also disable the focus assist. Thus, autofocus may fail to acquire the subject.
Similar stroboscopic flashing is sometimes used to reduce the red-eye effect, but this is only intended to constrict the subject's eye pupils before the shot.
Some external flash guns have integrated autofocus assist lamps that replace the stroboscopic on-camera flash. Many of them are red and less obtrusive.
Laser-based Similar to a laser rangefinder, autofocus systems can project a patterned laser toward the subject. The laser method is used by Sony, both in their Cyber-shot cameras since 2003, under the name Hologram AF Laser, and in some of their smartphones since and including the Xperia XZ.
Hybrid autofocus
In a hybrid autofocus system, focus is achieved by combining two or more methods, such as:
Active and passive methods Phase detection and contrast measurement