How do contrast-detect and phase-detect autofocus decide what to focus on?
Asked 5/8/2013
6 views
2 answers
0
I understand that contrast-detect autofocus (CDAF) works by maximizing image contrast, while phase-detect autofocus (PDAF) can determine whether focus is in front of or behind the subject and by roughly how much. If CDAF doesn't directly know subject distance, how does it decide which object in a scene to focus on when multiple subjects are present? Does it simply look for the highest-contrast area within the active focus area? And with PDAF, does the camera evaluate distances for all subjects and choose the closest one, or does it work differently depending on the selected focus point or autofocus mode?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
13y ago
2 Answers
2
Let's start with phase-detect autofocus. Here, there are a limited number of focus points to choose from. You may choose manually, in which case it doesn't pick anything -- it just tries to focus at that point.
If you chose a mode where the focus point is selected automatically, the camera will decide. Usually, this is initially based on a simple measurement, usually picking the point which has the closest focus initially as a preference. It doesn't really calculate this; each sensor gives a reading of the direction in which the focus is off and by how much, and the camera simply has to prefer the one which would give a closer focus. (In continuous or "servo" modes, the camera may attempt to track motion from one point to the next. And some advanced cameras have fancier options to tweak whether closer distances are preferred.)
With contrast detect, a similar principle applies. Here, the lens has to be moved between measurements as part of the calculation, and inherently (if you are letting the camera make the decision) the focus point choice must come after the AF movement starts. In theory, the entire sensor could be read and any area focused, but the focus algorithms tend to divide this into virtual focus point areas and then compare, narrowing down to a single rectangle to focus on. (Or, in some cases, weighing multiple areas.) On many cameras, you'll notice that CDAF is much faster if you pre-select a spot. Face detection is nice here, because if it is a face you want to focus on, the autofocus area can be narrowed down quickly without as much hunting.
Originally by user1943. Source · Licensed CC BY-SA 4.0
user1943
13y ago
0
Generated from our catalog & community — verify before relying on it.
Both systems usually work within selected AF areas or points, not by evaluating every object in the whole scene equally.
With CDAF, the camera adjusts focus to maximize contrast in the active focus area(s). In automatic selection modes, it tends to look for strong contrast detail and may favor central areas; in practice that often means it locks onto the most contrasty subject in those regions. It does not inherently know a full distance map of the scene, though it can infer whether focus is improving as it scans and may show some bias toward nearer subjects.
With PDAF, each AF point reports whether focus is front- or back-focused and by roughly how much. If you manually choose an AF point, the camera focuses there. If you use automatic point selection, the camera chooses among available AF points based on its programming—often favoring subjects that appear closer and/or easier to lock onto. In continuous modes it may also track a subject as it moves between points.
So: CDAF generally picks high-contrast detail in the chosen area; PDAF uses dedicated AF point information, and in auto modes often prefers the nearest viable subject rather than calculating exact distances to everything in the frame.
Recommended products
UniqueBot
AI13y ago
Your Answer
Related Questions
Why do adapted DSLR lenses autofocus more slowly on a Sony A7 than native lenses?
Is phase-detect autofocus much better than contrast-detect for bird photography?
Does the Nikon D3300 use phase-detect or contrast-detect autofocus?
When do Nikon 1 cameras stop using on-sensor PDAF in low light?
Do near-infrared AF assist beams work with contrast-detect and Dual Pixel autofocus?