How Autofocus in DSLRs Works and Why It Sometimes Fails

Autofocus is probably the only auto-feature on my cameras that I like to keep turned on. Knowing how autofocus works in detail is not essential, but having a general overview of it is a must. It may affect your next camera purchase and the knowledge can be helpful in controlling situations where the autofocus doesn't kick in. This video explains very simply, without going into much technical details, how your DSLR automatically finds the focal distance and why it fails sometimes.

The most used algorithm for autofocus is phase detection. There's an autofocus sensor that receives information about a small portion of the image. Based on that it judges if that's the correct focal length, i.e., if the subject is in focus. If the subject is not in focus the system tries another focal distance until it finds the one that works best.

The information that the autofocus sensor uses consists of two images. If the images placed one above the other overlap perfectly, the subject is in focus. These two images are produced by optical elements which act together with the current focal length setting and give the AF sensor what they "see." When the right focal distance is set, these two optical elements will produce identical images, and thus the subject will be in focus, otherwise there will be a double image.

Phase detection autofocus algorithm

Some cameras use just a vertical portion of the image when evaluating the focal distance. The problem is when focusing on a vertical line. In that case the two images will always be identical at any focal distance and thus the autofocus will give you wrong results.

Non cross-type AF algorithm

There are cameras with cross-type focus points that use both a vertical and a horizontal portion of the image to make a judgment. This makes automatic focusing more precise. If your camera is not one of these, the solution is to rotate it slightly and then find the focus.

[via DIY Photography]

Log in or register to post comments

10 Comments

Fritz Asuro's picture

This video just proves why the hundreds of AF points from Nikon's recent high end cameras matter.

Giovanni Aprea's picture

Bravo, simple, clear and concise explanation!

Tihomir Lazarov's picture

Indeed, the simplest I've seen in a while.

did not know how the autofocus on my camera worked before today. Now I have to go look up how many of my a99ii's focus points are cross hair. Love it when I actually learn something on line instead of wasting time on the internet :)

Tihomir Lazarov's picture

You're not alone. I also learned a lot from the video. I'm glad it was helpful to you too.

I bought a Nikon d5200, what a mistake, pure junk, the af mode is totally useless. I had no idea I'd have to become a professional photographer in order to use it, my phone takes better pics and video. Worse thing I ever bought and Nikon support is beyond useless. I was elated to here how bad Nikon sales have been for selling such trash!!!

Man, I'm sorry you're feeling as frustrated as you are. My first DSLR was a Nikon d5100, which is a step below what you currently have. That camera actually served as my entry into the professional ranks after a few years. In fact, I still continue to use it to this day and find myself pleasantly surprised at the quality it's able to produce.

Photography is not an easy hobby to pick up. There's so much granular learning required, and often new photographers are left working to teach themselves, thus further complicating the growth process. I get it. Your frustration makes sense. However, I would encourage you to stick with it and continue to research. It's true that a smartphone can capture a technically good photo (from a visual perspective, maybe) with simply the push of a button. But you're quite limited (at least with current smartphones) in what you can do with a photo beyond simply capturing what's in front of you and then applying a half-decent filter. If that's all you want to do, then by all means, shoot with just your smartphone. But if you're serious about picking up photography, you're going to have to really change your mindset, or else you're going to miss out on so much opportunity to learn and grow your abilities.

Tihomir Lazarov's picture

Bad pictures can be made with anything. The camera stores images (or video, a series of images) after we or the automated modes dial certain settings. If the image is not what we expect we either had the wrong expectations thinking it's a magic black box, or we had the wrong settings, or we had the wrong environment and subject set up.

T3i why doesn't picture look like it since focused into you expanded in your viewfinder and then the bigger the picture it gets blurry

Tihomir Lazarov's picture

It depends on your camera settings. If you've shot it with a low shutter speed (like 1/50, 1/30 or slower), it may get blurry from the camera shake or subject moving, not by the focus functionality.