All of us use it every time we click on the shutter button. Now understand how the auto focus works under the hood and why in many cases it just does not work.
How does auto-focus work?
All of us use it every time we click on the shutter button. Practically all modern cameras include some sort of an auto focus system. Thanks to the auto focus system we can enjoy an easier photography experience and can concentrate on composing the right photo and capturing the moment rather than on manually setting the focus.
Automatic focus though has its limitations. For example sometimes one might want to produce photos which are a bit fuzzy as an artistic expression. Also the auto focus implementation has its limitations and in some scenarios it might fail. One example is using a high end SLR camera with a passive auto focus system to take a picture of blue skies. In most cases the camera will move its motor back and forth and will eventually give up and fail to focus.
To better use the auto focus system it would help to understand high it actually works. Although implementations can vary we can divide them all into two categories: passive and active. Most pocket cameras use the cheaper passive method while high end professional cameras use either the active or a combination of both.
Passive auto focus:
Passive auto focus can be perceived as imitating how we set the focus manually. The camera defines one or more regions in the picture (usually they are marked as rectangles on the viewfinder or the LCD). The camera then analyzes the picture seen through those regions and calculates a Focus Level number. The camera then tries to move its lenses back and forth as it recalculates the Focus Level. The camera looks for a position where the Focus Level is the highest. For that point if the Focus Level is above a predefined threshold the camera would define this region of the photo as being in focus.
The Focus Level can be calculated in many ways. The common attribute of all calculations is figuring out how much Contrast is there in the photo. Although not in the scope of this article one way to calculate such a number is by running the photo through a high frequency filter – this is based on the fact that high contrast is associated with high frequencies.
Active auto focus:
Active auto focus works by measuring the distance between the camera and the object in the picture. Technically if you knew the exact distance to the object you are taking a picture of you could set the lens to the exact focus position. The active focus system shoots a beam of invisible light, usually infrared, at the object at the center of the picture and measures the distance to that object. Based on that distance the focus is set.
Combined auto focus:
Some high end cameras combine both systems. The camera will pick the right system for the specific scenario or will cross check and use both at the same time. The photographer can also decide manually to use one of the two options. For example when shooting blue skies the camera can try to use the active system and measure the distance. Since the distance is infinite the camera can set the focus and skip the passive focus. In other cases when the distance is not infinite the camera can use the active system to put the lens in approximately the right position and then use the passive system for fine tuning. In dark scenarios the camera can opt to use the active system since the passive one will not work.
So why doesn’t the auto focus work all the time?
Even with all the electronics and computing power in the camera there will always be scenarios where the camera auto focus fails. Failure can be when the camera can not focus and the picture is fuzzy or sometimes when the picture is actually in focus but the camera “thinks” that it is not.
What causes such cases? The list is long but here are just a few examples:
– Taking low light pictures: The passive auto focus system needs to “see” the picture in order to work and in low light scenarios this is not possible. Some systems use a series of flashes to overcome this limitation but this solution fails many times. An active system can measure the distance to the object in such scenarios but will fail if the object is not in the center of the picture or if there are a few objects at different distances.
– Active systems can fail with objects that tend to absorb the infrared beam they are using. Some materials absorb infrared beams and will cause the active system to measure the wrong distance. In some scenarios other infrared sources such as candles and open flame fires can render the active system useless.
– Low contrast objects such as white walls or blue skies. The passive auto focus relies on the fact that the Focus Level changes significantly when moving the lens back and forth. This allows the camera to settle on the right focus position. The Focus Level of low contrast objects does not change much and fails the passive system.
Knowing how the auto focus system works helps a photographer understand why sometimes the camera can not focus. In such scenarios the photographer can look for other solutions. Sometimes the photographer will have to use the manual focus. In other cases focusing on another object in the picture that is in the same distance but easier to focus on and locking the focus on that object will solve the problem.