Nothing Special   »   [go: up one dir, main page]

Autofocus: Difference between revisions

Content deleted Content added
Hybrid autofocus: Added a camera model which is confirmed to use a hybrid autofocus system.
Citation bot (talk | contribs)
Added doi-access. | Use this bot. Report bugs. | Suggested by Headbomb | #UCB_toolbar
 
(183 intermediate revisions by more than 100 users not shown)
Line 1:
{{short description|Sensor-controlled optical focus}}
{{for|the film of the same name|Auto Focus}}
{{for|the similarly named film|Auto Focus{{!}}''Auto Focus''}}
An '''autofocus''' (or '''AF''') [[optical]] system uses a [[sensor]], a [[control system]] and a [[Electric motor|motor]] to [[Focus (optics)|focus]] fully [[wikt:automatic|automatic]] or on a manually selected point or area. An [[Rangefinder_camera#Digital_rangefinder|electronic rangefinder]] has a display instead of the motor; the adjustment of the optical system has to be done manually until indication. The methods are named by the used sensor: Active, passive and hybrid.
{{multiple image
| align = right
| direction = vertical
| header = Autofocus
| width = 230
| image1 = Several green focus points using autofocus.jpg
| caption1 = Several green focus points/areas indicating where the autofocus has locked
| image2 = One selected green focus point using pinpoint autofocus.jpg
| caption2 = One selected green focus point using pinpoint autofocus
}}
An '''autofocus''' ('''AF''') [[optical]] system uses a [[sensor]], a [[control system]] and a [[Electric motor|motor]] to [[Focus (optics)|focus]] on an automatically or manually selected point or area. An [[Rangefinder camera#Digital rangefinder|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 [[Passivity (engineering)|active]], [[Passivity (engineering)|passive]] or hybrid types.
 
Autofocus systems rely on one or more [[sensor|sensors]] to determine correct focus. Some AF systems rely on a single sensor, while others use an array of sensors. Most modern [[SLR camera]]s use [[Through-the-lens metering|through-the-lens]] optical sensors, with a separate [[sensor array]] providing light [[Metering mode|metering]], although the latter can be programmed to prioritize its metering to the same area as one or more of the AF sensors.
==General==
<!-- [[Image:People2.jpg|thumb|Auto-focus systems can capture a subject in a variety of ways; here, the focus is on the people at the center of the image.]] -->
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 camera]]s use [[Through-the-lens metering|through-the-lens]] optical AF sensors, with a separate sensor array providing light [[Metering mode|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 now oftenusually speedier and more precise than manual can be achieved manuallyfocus with an ordinary viewfinder, although more precise manual focus can be achieved with special accessories such as [[focusing magnifier]]smagnifiers. Autofocus accuracy within 1/3 of the [[depth of field]] (DOF) at the widest [[aperture]] of the lens is not uncommoncommon 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 data, and keep focus on the subject — afocus — a function used mainly in sports and other action photography; on. Canon cameras call this is known as [[AI servo]], while on; Nikon cameras call it is known as "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 camera#Digital rangefinder|electronic rangefinder]]'', a system 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 maximumwidest aperture offered by the lens at the current focal length. [[F-stop]]s of around {{f/}}2 to {{f/}}2.8 are generally considered optimalbest in terms offor focusing speed and accuracy. Faster lenses than this (e.g.: {{f/}}1.4 or {{f/}}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 {{f/}}5.6, whilst professional models can often cope with a widest aperture of {{f/}}8, which is particularly useful for lenses used in conjunction with [[teleconverter]]s. {{Citation needed|reason=Looks like original research.|date=October 2016}}
 
Most consumer camera systems will only autofocus reliably with lenses that have a maximum aperture of at least {{f/}}5.6, while professional models can often cope with lenses that have a maximum aperture of {{f/}}8, which is particularly useful for lenses used in conjunction with [[teleconverter]]s.
 
==History==
Between 1960 and 1973, [[Ernst Leitz GmbH|Leitz]] (Leica)<ref>{{cite web|url=http://www.lfi-online.com/ceemes/page/show/issue_4_09_3 |title=S System: Autofocus – Leica Fotografie International |access-date=2009-05-15 |url-status=dead |archive-url=https://web.archive.org/web/20090621131329/http://www.lfi-online.com/ceemes/page/show/issue_4_09_3 |archive-date=2009-06-21 }}</ref> 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.
Between 1960 and 1973, Leitz (Leica)<ref>http://www.lfi-online.com/ceemes/page/show/issue_4_09_3</ref> patented an array of autofocus and corresponding sensor technologies. At [[photokina]] 1976, Leica had presented a camera based on their previous development, 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 camera|point and shoot]] model released in 1977. The [[Polaroid Corporation|Polaroid]] [[Polaroid SX-70|SX-70]] Sonar OneStep was the first autofocus [[single-lens reflex camera]], released in 1978. The [[Pentax ME F|Pentax ME-F]], which used focus sensors in the camera body coupled with a motorized [[photographic lens|lens]], became the first autofocus 35&nbsp;mm [[Single-lens reflex camera|SLR]] in 1981. In 1983 [[Nikon]] released the [[Nikon F3|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&nbsp;— 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 (company)|Canon]], however, elected to develop their EOS system with motorised lenses instead. 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 a broad [[List of Nikon F-mount lenses with integrated autofocus motors|range of available lenses]].
 
The first mass-produced autofocus camera was the [[Konica C35 AF]], a simple [[point and shoot camera|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|Pentax ME-F]], which used focus sensors in the camera body coupled with a motorized [[photographic lens|lens]], became the first autofocus 35&nbsp;mm [[Single-lens reflex camera|SLR]] in 1981.
 
In 1983 [[Nikon]] released the [[Nikon F3#F3AF|F3AF]], their first autofocus camera, which was based on a similar concept to the ME-F.<ref>{{cite web |url=https://imaging.nikon.com/imaging/information/chronicle/history-f3/ |title=Debut of Nikon F3 |website=Nikon |access-date=Nov 10, 2024}}</ref>
 
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&nbsp;— 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 (company)|Canon]] decided to discontinue their [[Canon FD lens mount|FD mount]] and switched to the completely electronic [[Canon EF lens mount|EF mount]] with motorised lenses in 1987.
 
[[Pentax cameras|Pentax]] was the first to introduce focusing distance measurement for SLR cameras with the FA and FA* series lenses from 1991. Their first [[Pentax K-mount|K<sub>AF</sub>-mount]] [[Pentax (lens)|Pentax lenses ]] with AF had been introduced in 1989.<ref>{{cite web|url=http://www.aohc.it/catalogo.php?catalogo=oggetti&id_catalogo=44&filtro%5btipologia%5d=13 |title=Milestones - Asahi Optical Historical Club |access-date=2021-08-29}}</ref>
 
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 [[List of Nikon F-mount lenses with integrated autofocus motor|AF-Lenses]].
 
==Active==
{{unreferenced section|date=March 2014}}
 
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 [[Ultrasound|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. [[Instant camera|Polaroid]] cameras including the Spectra and [[Polaroid SX-70|SX-70]] were known for successfully applying this system. In the latter case, infrared light is usually used to [[triangulation|triangulate]] the distance to the subject. Compact cameras including the [[Nikon]] [[Nikon Ti cameras|35TiQD and 28TiQD]], the [[Canon AF35M]], and the [[Contax]] T|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|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<ref>{{cite journal |last1=Fricke |first1=Dierk |last2=Denker |first2=Evgeniia |last3=Heratizadeh |first3=Annice |last4=Werfel |first4=Thomas |last5=Wollweber |first5=Merve |last6=Roth |first6=Bernhard |title=Non-Contact Dermatoscope with Ultra-Bright Light Source and Liquid Lens-Based Autofocus Function |journal=Applied Sciences |date=28 May 2019 |volume=9 |issue=11 |pages=2177 |doi=10.3390/app9112177|doi-access=free }}</ref> devices.
 
An exception to the two-step approach is the mechanical autofocus provided in some enlargers, which adjust the lens directly.
Line 30 ⟶ 53:
 
===Phase detection===
[[File:Autofocus phase detection.svg|thumb|upright300px|''Phase detection''<br: /><br />In each figure (not to scale), the purple circleskyline represents the object to be focused on, the red and green lines represent light rays passing through apertures at the opposite sides of the lens, and the yellow rectangle represents sensor arrays (one for each aperture), and the graph represents the intensity profile as seen by each sensor array.<br /><br />Figures 1 to 4 represent conditions where the lens is focused (1) too near, (2) correctly, (3) too far and (4) much too far. The phase difference between the two skyline profiles can be used to determine in which direction and how much to move the lens to achieve optimal focus.]]
 
Phase detection (PD) is achieved by dividing the incoming light into pairs of images and comparing them. Secondary image registration (SIR), [[Through-the-lens metering|through Through-the -lens]] secondary image registration (TTL SIR) passive phase detection is often used in film and digital [[Single-lens reflex camera|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 camera|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 ifwhether 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.<ref>{{cite web|url=http://www.nikon.com/about/technology/rd/core/software/caf/index.htm|title=Nikon - Technology - Predictive Focus Tracking System|access-date=2013-11-12|archive-url=https://web.archive.org/web/20131112195552/http://www.nikon.com/about/technology/rd/core/software/caf/index.htm|archive-date=2013-11-12|url-status=dead}}</ref>
<ref>[http://www.nikon.com/about/technology/core/software/caf/index.htm Nikon Technology Predictive Focus Tracking System]</ref>
 
PD AF in a continuously focussingfocusing mode (e.g. "AI Servo" for [[Canon EOS|Canon]], "AF-C" for [[Nikon#Digital_single_lens_reflex_camerasDigital single lens reflex cameras|Nikon]], [[Pentax_camerasPentax cameras#Digital|Pentax]] and [[Sony#Photography and videography|Sony]]) is a [[closed-loop control]] process. PD AF in a focus-locking mode (e.g. "One-Shot" for [[Canon EOS|Canon]], "AF-S" for [[Nikon#Digital_single_lens_reflex_camerasDigital single lens reflex cameras|Nikon]] and [[Sony#Photography and videography|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 focussingfocusing mode has predictive elements to work with moving targets, which suggests they are the same closed-loop process.<ref>{{cite web|url=http://www.dpreview.com/articles/5402438893/busted-the-myth-of-open-loop-phase-detection-autofocus|title=Busted! The Myth of Open-loop Phase-detection Autofocus}}</ref>
<ref>[http://www.dpreview.com/articles/5402438893/busted-the-myth-of-open-loop-phase-detection-autofocus The Myth of Open-loop Phase-detection Autofocus]</ref>
 
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 {{citation needed|date=March 2011}} 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 (Canon EOS-1V, Canon EOS-1D, [[Canon EOS 30D]]/[[Canon EOS 40D|40D]]) also have a few 'high precision' focus points with an additional set of prisms and sensors; they are only active with '[[Lens speed#Fast lenses|fast lenses]]' of certain [[F-number|focal ratio]]. Extended precision comes from the increased diameter of such lenses, so the base of the 'range finder' can be wider.
 
Some cameras ([[Minolta 7]], [[Canon EOS-1V]], [[Canon EOS-1D|1D]], [[Canon EOS 30D|30D]]/[[Canon EOS 40D|40D]], [[Pentax K-1]], [[Sony DSLR-A700]], [[Sony DSLR-A850|DSLR-A850]], [[Sony DSLR-A900|DSLR-A900]]) also have a few "high-precision" focus points with an additional set of prisms and sensors; they are only active with "[[Lens speed#Fast lenses|fast lenses]]" with certain geometrical [[Aperture|apertures]] (typically [[f-number]] 2.8 and faster). Extended precision comes from the wider effective measurement base of the "range finder"
[[Image:US pat 5589909 fig 2.png|none|thumb|320px|Phase detection system:
 
7 - Optical system for focus detection;
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.
8 - Image sensor;
 
30 - Plane of the vicinity of the exit pupil of the optical system for photography;
[[Image:US pat 5589909 fig 2.png|none|thumb|320px|Phase detection system:
31, 32 - Pair of regions;
7 – Optical system for focus detection;
70 - Window;
8 – Image sensor;
71 - Visual field mask;
30 – Plane of the vicinity of the exit pupil of the optical system for photography;
72 - Condenser lens;
7331, 74 -32 Pair of aperturesregions;
70 – Window;
75 - Aperture mask;
71 – Visual field mask;
76, 77 - Pair of reconverging lenses;
72 – Condenser lens;
80, 81 - Pair of light receiving sections;]]
73, 74 – Pair of apertures;
75 – Aperture mask;
76, 77 – Pair of reconverging lenses;
80, 81 – Pair of light receiving sections]]
 
===Contrast detection===
Contrast -detection autofocus is achieved by measuring [[contrast (vision)]] within a sensor field, [[Through-the-lens metering|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 maximummaximal contrast is detected. In this method, AF does not involve actual distance measurement at all and is generally slower than phase detection systems, especially when operating under dim light. Furthermore, as the autofocus system does not calculate whether the subject is in front focus or back focus, focus tracking is not feasible. As it does not use a separate sensor, however, contrast-detect autofocus can be more flexible (as it is implemented in software) and potentially more accurate. This iscreates asignificant commonchallenges method inwhen [[videoVideo cameras]] and [[point-and-shoot cameratracking|digitaltracking camera]]smoving that lack [[Shutter (photography)|shuttersubjects]]s, and reflex mirrors. Most [[digital single-lens reflex camera|DSLR]]s use this method (orsince a hybridloss of both contrast andgives phaseno detectionindication autofocus) when focusing in their [[live-preview digital camera|live-view]] modes. [[Mirrorless interchangeable-lens camera]]s, including [[Micro Four Thirds]], usually use contrast measurement autofocus (phase detect is available on some models, such asof the Nikondirection 1,of ormotion via a lens adapter). Their manufacturers claim performance comparabletowards or evenaway faster than phase detection systems,<ref>[http://www.olympusamerica.com/oai_HeadlinesDetails.asp?pressNo=855 Olympus® Launchesfrom the PEN® E-P3: Are You PEN Ready?], Olympus</ref><ref>[http://panasonic.net/avc/lumix/systemcamera/gms/g3/af.html The World's Fastest Level of Light Speed AF], Panasonic</ref> though it is unclear under what conditions (e.g., dim light) these claims hold truecamera.
 
Contrast-detect autofocus is a common method in [[digital camera]]s that lack [[Shutter (photography)|shutter]]s and reflex mirrors. Most [[digital single-lens reflex camera|DSLR]]s use this method (or a hybrid of both contrast and phase-detection autofocus) when focusing in their [[live-preview digital camera|live-view]] modes. A notable exception is Canon digital cameras with Dual Pixel CMOS AF. [[Mirrorless interchangeable-lens camera]]s 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.
Technically it can be implemented as a high pass filter and some systems which conscientiously move the lens around the point where filter output is highest. Digital processing is not required. Photo cameras sweep only once before taking picture, while video cameras need to sweep continuously in small steps that are almost unnoticeable.
 
This method can also be used to precisely focus security cameras, without seeing the actual image.
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.
 
==={{anchor|Illuminator}}Assist lamp===
The assist light (also known as AF illuminator) "activates" passive autofocus systems in low-light and low-[[Contrast (vision)|contrast]] situations in some cameras ([[Nikon_Corporation#Digital_single_lens_reflex_cameras|Nikon]]). The lamp projects visible or [[infrared|IR]] light onto the subject, which the camera's autofocus system uses to achieve focus.

Many cameras thatand donearly notall have[[camera phone]]s{{efn|Counter-examples are the [[Nokia Lumia 1020]], the [[Samsung Galaxy S4 Zoom]] and the [[Samsung Galaxy K Zoom]].}} lack a dedicated autofocus assist lamp. instead Instead, they use their built-in flash, illuminating the subject with stroboscopic bursts of light. The strobe burstsThis aidaids the autofocus system in the same fashion as a dedicated assist light, but havehas the disadvantage of startling or annoying living subjectspeople. 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. and Thus, autofocus may fail to acquire the subject.

Similar [[Stroboscopic effect|stroboscopic]] flashing is sometimesometimes used to reduce the [[red-eye effect]], but this method is only intended to constrict the subject's eye pupils prior tobefore the actual shot being taken, and thus reduce retinal reflections.
 
In some cases,Some external [[flash gunsgun]]s have integrated autofocus assist lamps that replace the stroboscopic on-camera flash. Many of them are red and less obtrusive. Another way to assist contrast based AF systems in low light is to beam a laser pattern on to the subject. The laser method is commercially called Hologram AF Laser and was used in [[Cyber-shot|Sony CybershotCyberShot]] cameras around the year 2003, including Sony's F707, [[Sony Cyber-shot DSC-F717|F717]] and [[Sony Cyber-shot DSC-F828|F828]] models.
 
==Hybrid autofocus==
{{More citations needed section|date=January 2018}}
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.
 
* Active and passive methods
The double effort is typically used to speed up and improve AF function. In July, 2010, [[Fujifilm]] announced a compact camera, the F300EXR, which included a hybrid autofocus system consisting of both phase-detection and contrast-based elements. The sensors implementing the phase-detection AF in this camera are integrated into the camera's [[Super CCD]] EXR.<ref>[http://www.fujifilmusa.com/press/news/display_news?newsID=879875 Fujifilm Launches Powerhouse 15X Long Zoom Point and shoot Digital Camera: The FinePix F300EXR], Fujifilm, USA</ref> Currently it is used by [[Fujifilm FinePix]] Series,<ref>{{cite web |url=http://www.dpreview.com/news/2013/01/07/Fujifilm-finepix-hs50-exr-hs35 |title=Fujifilm launches FinePix HS50EXR and HS35EXR high-end superzooms |accessdate=June 8, 2013}}</ref> Fujifilm X100S, [[Ricoh]], [[Nikon 1 series]] [[Canon EOS 650D|Canon EOS 650D/Rebel T4i]] and Samsung NX300.
* Phase detection and contrast measurement
 
The double effort is typically used to mutually compensate for the intrinsical weaknesses of the various methods in order to increase the overall reliability and accuracy or to speed up AF function.
==Comparison of active and passive systems==
 
A rare example of an early hybrid system is the combination of an active [[Infrared|IR]] or ultrasonic auto-focus system with a passive phase-detection system. An IR or ultrasonic system based on reflection will work regardless of the light conditions, but can be easily fooled by obstacles like window glasses, and the accuracy is typically restricted to a rather limited number of steps. Phase-detection autofocus "sees" through window glasses without problems and is much more accurate, but it does not work in low-light conditions or on surfaces without contrasts or with repeating patterns.
 
A very common example of combined usage is the phase-detection auto-focus system used in [[Single-lens reflex camera|single-lens reflex cameras]] since the 1985s. The passive phase-detection auto-focus needs some contrast to work with, making it difficult to use in low-light scenarios or on even surfaces. An [[AF illuminator]] will illuminate the scene and project contrast patterns onto even surfaces, so that phase-detection auto-focus can work under these conditions as well.
 
A newer form of a hybrid system is the combination of passive phase-detection auto-focus and passive contrast auto-focus, sometimes assisted by active methods, as both methods need some visible contrast to work with. Under their operational conditions, phase-detection auto-focusing is very fast, since the measurement method provides both information, the amount of offset and the direction, so that the focusing motor can move the lens right into (or close to) focus without additional measurements. Additional measurements on the fly, however, can improve accuracy or help keep track of moving objects. However, the accuracy of phase-detection auto-focus depends on its effective measurement basis. If the measurement basis is large, measurements are very accurate, but can only work with lenses with a large geometrical [[aperture]] (e.g. 1:2.8 or larger). Even with high contrasty objects, phase-detection AF cannot work at all with lenses slower than its effective measurement basis. In order to work with most lenses, the effective measurement basis is typically set to between 1:5.6 and 1:6.7, so that AF continues to work with slow lenses (at least for as long as they are not stopped down). This, however, reduces the intrinsical accuracy of the autofocus system, even if fast lenses are used. Since the effective measurement basis is an optical property of the actual implementation, it cannot be changed easily. Very few cameras provide multi-PD-AF systems with several switchable measurement bases depending on the lens used in order to allow normal auto-focusing with most lenses, and more accurate focusing with fast lenses.
Contrast AF does not have this inherent design limitation on accuracy as it only needs a minimal object contrast to work with. Once this is available, it can work with high accuracy regardless of the speed of a lens; in fact, for as long as this condition is met, it can even work with the lens stopped down. Also, since contrast AF continues to work in stopped-down mode rather than only in open-aperture mode, it is immune to [[Spherical aberration|aperture-based focus shift errors]] phase-detection AF systems suffer since they cannot work in stopped-down mode. Thereby, contrast AF makes arbitrary fine-focus adjustments by the user unnecessary. Also, contrast AF is immune to focusing errors due to surfaces with repeating patterns and they can work over the whole frame, not just near the center of the frame, as phase-detection AF does. The down-side, however, is that contrast AF is a closed-loop iterative process of shifting the focus back and forth in rapid succession. Compared to phase-detection AF, contrast AF is slow, since the speed of the focus iteration process is mechanically limited and this measurement method does not provide any directional information. Combining both measurement methods, the phase-detection AF can assist a contrast AF system to be fast and accurate at the same time, to compensate aperture-based focus-shift errors, and to continue to work with lenses stopped down, as, for example, in stopped-down measuring or video mode.
 
Recent developments towards [[Mirrorless camera|mirrorless cameras]] seek to integrate the phase-detection AF sensors into the image sensor itself. Typically, these phase-detection sensors are not as accurate as the more sophisticated stand-alone sensors, but since the fine focusing is now carried out through contrast focusing, the phase-detection AF sensors are only need to provide coarse directional information in order to speed up the contrast auto-focusing process.
 
In July, 2010, [[Fujifilm]] announced a compact camera, the F300EXR, which included a hybrid autofocus system consisting of both phase-detection and contrast-based elements. The sensors implementing the phase-detection AF in this camera are integrated into the camera's [[Super CCD]] EXR.<ref>[http://www.fujifilmusa.com/press/news/display_news?newsID=879875 Fujifilm Launches Powerhouse 15X Long Zoom Point and shoot Digital Camera: The FinePix F300EXR] {{Webarchive|url=https://web.archive.org/web/20100727174907/http://www.fujifilmusa.com/press/news/display_news?newsID=879875 |date=2010-07-27 }}, Fujifilm, USA</ref> Currently it is used by [[Fujifilm FinePix]] Series,<ref>{{cite web |url=http://www.dpreview.com/news/2013/01/07/Fujifilm-finepix-hs50-exr-hs35 |title=Fujifilm launches FinePix HS50EXR and HS35EXR high-end superzooms |access-date=June 8, 2013}}</ref> [[Fujifilm X100|Fujifilm X100S]], [[Ricoh]], [[Nikon 1 series]], [[Canon EOS 650D|Canon EOS 650D/Rebel T4i]] and [[Samsung NX300]].
 
==Comparison of active and passive systems==
Active systems will typically not focus through windows, since sound waves and infrared light are reflected by the glass. With passive systems this will generally not be a problem, unless the window is stained. Accuracy of active autofocus systems is often considerably less than that of passive systems.
 
Active systems may also fail to focus a subject that is very close to the camera (''e.g.'', [[macro photography]]).
 
Passive systems may not find focus when the contrast is low, notably on large single-colored surfaces (walls, blue sky, etc.) or in low-light conditions. Passive systems are dependent on a certain degree of illumination to the subject (whether natural or otherwise), while active systems may focus correctly even in total darkness when necessary. Some cameras and external flash units have a special low-level illumination mode (usually orange/red light) which can be activated during auto-focus operation to allow the camera to focus.
 
<gallery>
File:My Canon AF35M (4307694589).jpg|Active autofocus system via infrared - [[Canon AF35M]] (1979)
File:Pentax ME-F autofocus.jpg|Early passive autofocus system integrated in the lens with [[Pentax ME F|Pentax ME-F]] (1981)
File:D4-85 1.4.JPG|Modern (2014) autofocus single lens reflex camera - [[Nikon D4]]
</gallery>
 
==Trap focus==
A method variously referred to as ''trap focus'', ''focus trap'', or ''catch-in-focus'' uses autofocus to take a shot when a subject moves into the focal plane (at the relevant focal point); this can be used to get a focused shot of a rapidly moving object, particularly in sports or [[wildlife photography]], or alternatively to set a "trap" so that a shot can automatically be taken without a person present. This is done by using AF to ''detect'' but not ''set'' focus&nbsp;– using manual focus to set focus (or switching to manual after focus has been set) but then using ''[[focus priority]]'' to detect focus and only release the shutter when an object is in focus. The technique works by choosing the focus adjustment (turning AF off), then setting the shooting mode to "Single" (AF-S), or more specifically focus priority, then depressing the shutter&nbsp;– when the subject moves into focus, the AF detects this (though it does not change the focus), and a shot is taken.<ref>[http://www.shutterstock.com/tips-tricks/Trap-Focus-for-Nikon-Users-100.html Trap Focus for Nikon Users], by Kenneth William Caleno, January 28, 2009</ref><ref>[http://www.kenrockwell.com/tech/sports.htm How to shoot sport], Ken Rockwell, 2006</ref><ref>[http://photographyrulez.blogspot.com/2009/04/focus-trap-or-catch-in-focus.html Focus Trap or Catch In Focus], April 4, 2009</ref>
 
The first [[Single-lens reflex camera|SLR]] to implement trap focusing was the [[Yashica 230 AF]]. Trap focus is also possible on some Pentax (e.g. [[Pentax K-x|K-x]] and [[Pentax K-5|K-5]]), [[Nikon]], and [[Canon EOS]] cameras. The [[Canon EOS-1D|EOS 1D]] can do it using software on an attached computer, whereas cameras like the [[Canon EOS 40D|EOS 40D]] and [[Canon EOS 7D|7D]] have a custom function (III-1 and III-4 respectively) which can stop the camera trying to focus after it fails.{{citation needed|date=September 2013|reason=The description for the 40D and 7D does not sound as if they would actually support focus trapping. Please provide references.}} On EOS cameras without genuine trap focus, a hack called "almost trap focus" can be used, which achieves some of the effects of trap focus.<ref>[http://eosdoc.com/manuals/?q=ATrapFocus EOS Documentation Project: Almost Trap Focus] {{webarchive |url=https://web.archive.org/web/20100818143041/http://eosdoc.com/manuals/?q=ATrapFocus |date=August 18, 2010 }}, by Julian Loke</ref> By using the custom firmware [[DIGIC#Magic_LanternMagic Lantern|Magic Lantern]], some Canon DSLRs can perform trap focus.
 
===AI servoServo===
AI servoServo is an [[auto focus]]autofocus mode found on [[Canon Inc.|Canon]] SLR cameras, althoughand thein sameother principlebrands issuch used withas [[Nikon]], [[Sony]], and some [[Pentax]] cameras, knownunder therethe asname "continuous focus" (AF-C).<ref>[{{cite web|url=http://www.dpreview.com/learn/?/Glossary/Camera_System/af_servo_01.htm|title=Articles AFtagged Servo: Camera System: Glossary: Learn"learn": Digital Photography Review<!-- Bot generated title -->]}}</ref> Also referred to as ''focus tracking'', it is used to track a subject as it moves around the frame, or toward and away from the camera. When in use, the lens will constantly maintain its focus on the subject, hence it is commonly used for [[Sports photography|sports and action photography]]. AI refers to [[artificial intelligence]]: algorithms that constantly predict where a subject is about to be based on its speed and acceleration data from the autofocus sensor.
 
== Focus motors ==
Modern autofocus is done through one of two mechanisms; either a motor in the camera body and gears in the lens ("screw drive") or through electronic transmission of the drive instruction through contacts in the mount plate to a motor in the lens. Lens-based motors can be of a number of different types, but are often [[ultrasonic motor]]s or [[stepper motor]]s.
 
Magnets are often used in electromagnetic motors, such as [[Voice coil]] motors (VCMs) and [[Stepper motor]], which move the lens elements to achieve precise focusing.<ref>{{cite web |url=https://www.stanfordmagnets.com/common-applications-for-permanent-magnets.html |title=Industries Applications |website=Stanford Magnets |access-date=Nov 10, 2024}}</ref> The magnetic field interacts with coils to produce motion for adjusting the lens position quickly and accurately based on focus requirements.<ref>{{cite journal |last1=Gong |first1=Junqiang |last2=Luo |first2=Jianbin |year=2024 |title= Rapid and Precise Zoom Lens Design Based on Voice Coil Motors with Tunnel Magnetoresistance Sensors |journal=Applied Science |volume=14 |issue=6 |page=6990 |doi=10.3390/app14166990|doi-access=free }}</ref> Magnets are ideal for this purpose because they enable smooth and rapid adjustments without direct physical contact, enhancing durability and response time.<ref>{{cite patent |country=US |number=9031393B2 |status=patent}}</ref>
 
Some camera bodies, including all [[Canon EOS]] bodies and the more budget-oriented among [[Nikon DX|Nikon's DX]] models, do not include an autofocus motor and therefore cannot autofocus with lenses that lack an inbuilt motor. Some lenses, such as [[Pentax DA* lenses|Pentax' DA*]] designated models, although normally using an inbuilt motor, can fall back to screwdrive operation when the camera body does not support the necessary contact pins.
 
== Notes ==
{{notelist}}
 
==See also==
{{Commons}}
{{commons|Autofocus}}
*[[Fixed-focus lens]]
*[[Circular polarizer]], the only polarizer to work with some SLR autofocusers
*[[Fixed-focus lens]]
*[[List of Nikon compatible lenses with integrated autofocus-motor]]
*[[Manual focus override]]
*[[Plenoptic camera]], a camera that enables focusing in a postprocessing step
*[[Light-field camera]], a camera that enables focusing in a postprocessing step
 
==References==
{{reflistReflist|30em}}
* Norman Goldberg. ''Camera Technology : The Dark Side of the Lens''
* Sidney Ray. ''Applied Photographic Optics''
* Ralph Jacobson, Sidney Ray, Geoffrey G Attridge, Norman Axford. ''Manual of Photography: Photographic and Digital Imaging''
 
==External links==