When the autofocus system is deciding to adjust the focus, say in a situation of the subject getting closer to or farther from the lens, does it take into consideration the current depth of field, which would, I would think, require less adjustment activity of the focus mechanism? In other words, does autofocus wait until the subject passes out (or nearly out) of the current depth of field before making adjustments?
2 Answers
Depth of Field (DoF) is a myth. But it is a myth whose effects we can see with our own eyes, so we believe it to be true. That being the case, we use DoF as if it were true.
With a camera/lens system focused at any distance other than infinity, there is only a single distance that will result in a point source of light being projected on the film/sensor plane as a corresponding single point of light. Point sources either nearer or further than the point of focus will create a blur circle. What we refer to as DoF is really the distance along the optical axis from the exact point of focus that the resulting blur circle created by a point source of light will still be perceived by our eyes as a single point when printed at a specific magnification and viewed at a specific distance by a person with a specific visual acuity. The normal standard is an 8X10 inch (20x25 cm) print viewed from a distance of 10 inches (25 cm) by a person with 20/20 vision. If we increase the size of the print to 16X20 inches, for example, the DoF we perceive at the same viewing distance will be halved. On the other hand, if we view the same print from twice the distance, the perceived DoF will be doubled.
Since a camera's Auto Focus (AF) system (and neither the engineer who designed it nor the programmer who wrote the software that runs it) has any idea what magnification and and viewing distance you are planning for the photo you will be making, the AF system attempts to keep the focus target at the exact point of focus.
Of course, as with all mechanical devices, there are design tolerances. That is, there are designated limits to how far something can be away from the theoretically perfect before it is considered to be out of tolerance. We expect higher priced, professional grade camera bodies' AF systems to both be more accurate and consistent in that accuracy from one shot to the next than we expect entry level cameras costing less than 1/10 the price. For the most part that expectation is met. As with many things it costs a tremendous amount to go from 99% accuracy to 99.5% accuracy in the design and manufacture of a precision device. And since no system, no matter how costly, is perfect then factors such as speed versus accuracy also come into play. Would you rather have a system that can get you to within 99% accuracy in a few micro-seconds or one that gets you to within 99.5% accuracy but takes significantly longer? How much longer is acceptable? 1/100 second? 1/10 second? What sometimes happens is that focus errors created by the camera/lens system's design limits and manufacturing tolerances (or even an improper calibration) may make it seem to us that the system is behaving as you describe, but the AF systems are designed with the goal of putting the focus distance at the exact point of the subject in the target.
Almost all PDAF systems focus with the lens opened at full aperture, so what aperture you have selected makes no difference. The camera focuses prior to stopping down the lens (for a DSLR usually during the time the mirror is being moved out of the way). Since Phase Detection Auto Focus (PDAF) works by comparing the light rays coming through one side of the lens to the other, the wider that distance, known as aperture is, the more accurate the system can be. So the lens' maximum aperture has a lot to do with how accurate and how fast a camera/lens combination can be, but the specific aperture setting used for the shot has no influence on the focus performance of almost all cameras with auto focus capability.
No, it doesn't take into account the depth of field. The depth of field is irrelevant because autofocus always attempts to center-focus. The way focus works is that you focus on a point in the middle of the depth of field which the AF tries to get as perfectly in focus as possible. The depth of field then just cause points that are a given distance away from that point to be (increasingly) out of focus.
The maximum aperture of a lens matters, but only because it impacts a) how easily the lens can focus due to the shallower depth of field at max (makes it easier to see differences) and b) how much light gets to how many AF points. This is why PDAF (phase detect auto focus) stops working when you get to particularly high apertures (like f/6.3 or f/8) because light simply doesn't reach the sensors. Similarly, contrast based auto focus will have an easier time when it can more rapidly distinguish the loss of contrast on a fast lens.
In fact, focus begins to deteriorate immediately on either side of the focal plane (the distance from the camera on which the lens is focused) however it takes some distance before that blurring is noticeable enough to us to be considered "out of focus". The shorter the depth of field, the more rapidly the focus reaches that point, but even in the area that is "in focus" the image is actually not ideally focused immediately on either side of the sharpest point.
Sometimes you may hear front or back focus issues mentioned. This is when a lens and camera aren't properly calibrated and thus the focal plane selected is either in front of or behind where it should be. Calibration can fix those issues so that the AF hits the center point.