Adjustment of on-sensor phase detection autofocus

by notevil   Last Updated September 09, 2018 16:18 PM

Is autofocus adjustment actually no longer required on phase detection sensors that are placed on the image sensor? If not, why? How does lens autofocus adjustment come into play?



Answers 2


It does not depend on the sensor type (dedicated PDAF vs image sensor PDAF).

The need for adjustment comes from the fact that the phase-based autofocus works by using sensor data to determine the absolute lens focusing distance. If what the lens does is not what the camera commands (because of the physical imperfections, incompatibilities across lenses) the focusing precision suffers.

(By contrast, the contrast-based autofocus ;-) drives the lens without knowing or needing absolute positions - and therefore without a need for precise adjustments. It just tells the lens to move forwards or backwards, until the result is acceptable. Even if the lens machinery is slightly off, it will still eventually come to the correct focus.)

On a deeper level, no digital camera really needs autofocus adjustments. It is a relic from ancient times, when film cameras could not verify what is really captured. Nowadays every camera might simply learn from the immediately accesible results and auto tune the phase detection autofocus distances with little user intervention. But as far I know, they don't do it.

szulat
szulat
September 09, 2018 16:20 PM

Consider the evolution of AF systems over the past several decades:

With traditional DSLR cameras, fine tuning of PDAF autofocus based on a separate sensor is needed to overcome several different possible errors. Among those errors are:

  • Slightly different optical distances between the imaging sensor and the lens when compared to the optical distance between the PDAF sensor and the lens.
  • Lens positioning errors when the lens actually moves a slightly different distance than the camera instructed it to move. This could be as simple a thing as mechanical wear and tear in the lens' focusing mechanism or a slightly misadjusted electro-mechanical focus position sensor located in the lens.
  • Slight variation in the lens' registration distance (a/k/a flange focal distance or, in the cinema world, back focus distance). If the lens is slightly closer or further from the imaging sensor and the PDAF sensor than the design specification, then different adjustments may be needed for near and far focus because the lens was designed to be used at the specified registration distance and movements of the focusing mechanism will not be in the exact ratio of distances needed.

With most cameras that use focusing based on information from the imaging sensor, none of these things really matter since the final focusing is done using contrast detection, rather than phase detection, methods. The earliest CDAF systems had no PDAF capability so all focusing was done using CDAF. But this is also the case for cameras that have "hybrid" sensor-based PDAF combined with CDAF.

  • If the camera includes main imaging sensor based PDAF capability, the PDAF functionality is used to bring the lens to near the desired focus distance very quickly, and then CDAF is used to either confirm or fine-tune the focus position further.
  • There's obviously no difference in the length of the optical path from the lens to the sensor since it is the exact same sensor.
  • Adjustments to the lens position using contrast detection are also not susceptible to errors in the amount of movement instructed by the camera compared to the amount of movement actually made by the lens, because the camera just continues to move the lens until it finds the position that has the highest amount of contrast, rather than telling the lens how far to move and depending on the lens to precisely follow that instruction.
  • Any mechanical wear and tear, registration errors, or misalignment of focus position sensors are moot since the camera doesn't depend on them for the final focus position. Instead it measures the contrast in the image projected by the lens onto the sensor and moves the lens until contrast is maximized.

A simple analogy between focusing using a dedicated PDAF sensor and focusing using imaging sensor based CDAF (including hybrid PDAF+CDAF) would be to compare focusing the lens on an old Speed graphic camera to focusing using an old manual focus SLR.

  • The Speed Graphic provided no through the lens viewfinder. The photographer estimated (or measured using a measuring device external to the camera) the distance between the camera and subject. The photographer then adjusted the lens' focus distance using the indexed distance marks on the lens. Focus was only as accurate as the proper placement of the distance marks on the lens and the proper estimation/measurement of the camera to subject distance.
  • The film SLR provided a through the lens view of the subject. The photographer moved the focusing mechanism on the lens (typically by rotating the focus ring) until the subject appeared most in focus. Assuming the camera's mirror and focusing screen were properly aligned, it did not matter how accurate or inaccurate the distance scale indexed on the lens was, because in that case the photographer wasn't focusing the lens based on the distance scale, they were focusing it based on what they saw through the viewfinder.
  • A hybrid PDAF+CDAF imaging sensor based AF system would be like using the lens' distance scale to get close to the subject distance, and then looking through the viewfinder to dial it in even closer.

With the main imaging sensor based PDAF-only system used by Canon's Dual Pixel CMOS AF in Live View for both video and still imaging, aspects of off-sensor PDAF and on-sensor CDAF are combined. Instead of a one-and-done AF measurement followed by a single instruction to the lens regarding how far to move, which is what typical PDAF does using a separate PDAF sensor¹, Canon's DP CMOS AF takes additional measurements as the lens is being moved, which is what is normally done with CDAF. This is possible because PDAF is being done using the main imaging sensor, thus there's no time used to flip up the reflex mirror between the PDAF measurement and before the image can be captured. PDAF can remain active until the imaging sensor needs to be cleared in advance of capturing the image without slowing down the camera's shooting speed.

  • There's obviously no difference in the length of the optical path from the lens to the sensor since it is the exact same sensor.

  • Adjustments to the lens position using 'rinse-and-repeat' measurements are also not as susceptible to errors in the amount of movement instructed by the camera compared to the amount of movement actually made by the lens, because the camera continues to optically measure focus and update it instructions for how far to move the lens until it finds the position that has the highest amount of contrast², rather than telling the lens how far to move one time and then depending on the lens to precisely follow that instruction without optically rechecking.

  • Any mechanical wear and tear, registration errors, or misalignment of focus position sensors are moot since the camera doesn't depend on them for the final focus position. Instead it measures the contrast in the image projected by the lens onto the sensor and moves the lens until contrast is maximized.

In summary:

  • PDAF based on a dedicated AF sensor measures how out of focus the subject is, calculates how far and in which direction the lens need to move, and instructs the lens to move to that position. It does not usually optically remeasure to confirm that the lens actually moved the exact distance instructed, or that the subject is now in acceptable focus. This is because PDAF is designed primarily for speed. If it confirms the lens moved the instructed distance, it is usually accomplished via a mechanical position sensor in the lens, rather than by measuring it optically. This is because the mirror can already be swinging up (in which case the PDAF sensor is 'blind') as the lens position sensor is used to adjust the final position of the lens to match what the camera instructed.
  • CDAF measures how much contrast the subject has and moves the lens until it finds the position which provides maximum contrast. It doesn't rely on a specific position of the lens providing correct focus at a specific distance, but only relies on finding the position of the lens that provides the most contrast.
  • Imaging sensor based PDAF can use follow-up measurements and revised instructions the same way that CDAF does to "zero in" on the AF target. As the amount of distance the lens is instructed to move is reduced, so are any associated errors if the lens moves a slightly different distance than instructed. When using STM lenses, the smallest unit of movement possible is one step of the stepping motor and AF will not be able to get any closer than the nearest step, regardless of what AF technology is being used.

I infer on-sensor pdaf without cdaf still has to overcome errors (i.e. flange focal distance, lens positioning). Does on-sensor pdaf allow to overcome such errors maybe by iterations?

Most, if not all, of the errors are the same for focussing as for when the image is actually taken, and are thus cancelled out, because PDAF is being done in the main imaging sensor instead of a separate PDAF sensor. Main imaging sensor based PDAF also has the advantage of not being 'blind' without a reflex mirror blocking the main imaging sensor. There's not near as much of a speed penalty for remeasuring focus after the lens is moved following the initial measurement and before the image is taken without a mirror in the mix. By being able to take incremental measurements as the lens is moved, errors resulting from differences between intructed and actual amounts of movement can be significantly reduced. A 1% error for a 0.1mm movement will be significantly less than a 1% error for a 10mm movement by a factor of 100.

¹ Even in 'Servo' AF or 'Continuous' AF, the process is One PDAF measurement → One lens movement → One PDAF measurement → One lens movement → ad infinitum until the shutter button is fully pressed. There's no refinement of the lens position to "zero in" on a stationary subject distance. Rather, it's based on the assumption the subject will most likely be at a different distance for each PDAF measurement → Lens movement cycle. Each additional measurement is done to measure how the subject has moved, not how close the lens got to properly focussing the subject on the previous measure → move cycle. Predictive logic is also used to estimate where the subject will be in an x.x number of microseconds when the shutter opens after the mirror is flipped up.
² Both PDAF and CDAF depnd upon contrast between details in the subject to measure how focused the lens is.

Michael C
Michael C
September 09, 2018 18:34 PM

Related Questions





What causes chroma noise in an image sensor

Updated May 21, 2015 21:07 PM