Understanding autofocus, and tips for all cameras

_7048556 copy
Levitation (and prefocus). Nikon D700, 85/1.4 G

A side effect of the ever-increasing resolution of today’s cameras is that autofocus must necessarily get more precise, too. The Nikon D800/ D800E issues have shown that even a small misalignment or miscalibration in the focusing system can basically cripple the camera into resolving at a far lower level of performance than it would be capable of under ideal circumstances. Short of using manual focus and magnified live view for everything – I would still recommend doing this for critical work, and I do it when working under any controlled lighting situation since I’m more likely to have the time and be using a tripod – it is therefore highly beneficial to pay closer attention to exactly what is going on when the camera acquires focus.

_7038950 copy
A situation where fast, reactive autofocus can help. Nikon D700, 300/4 D

For DSLRs, SLTs and some mirrorless cameras (the Nikon 1s and Sony NEX-5R and NEX-6), a phase detection system is used. This involves taking some of the light from the subject area, passing it through a beamsplitter and comparing the difference in phase of the output; a CCD is used to measure light intensity as a function of position, and the lens is moved until light from both arms of the beamsplitter is coincident upon a single point. This entire module constitutes the AF sensor array that’s either located at the bottom of the mirror box (DSLRs) or embedded in certain specific photosite locations (mirrorless cameras). If you select a specific AF point, then the camera uses only the sensors corresponding to the location of that point; if you let the camera pick, it will usually sample all points to find which is the closest subject covered by the AF sensor array, and focus on that.

_3035242 copy
En masse. Nikon D3, 70-300VR

Phase detect autofocus is fast and generally does not require racking the lens back and forth – otherwise known as ‘hunting’ – because the sensor is able to tell whether the light is positively or negatively out of phase, and thus in which direction to move the lens in order to correct this and bring the light coincident, thus achieving focusing. The precision of focus depends on several factors: firstly, the resolution of the AF sensor; secondly, the alignment of all secondary optics involved in transferring the light to the AF sensor – specifically, the main and submirror assemblies; any microlenses involved; thirdly, the alignment of the AF and imaging sensors (both must be perfectly perpendicular to the lens mount); fourthly, any calibration data the system requires to establish a perfect zero or null position; and finally, the ability of the lens’ focusing groups to move precisely in small increments that maintain perfect alignment with the optical axis.

_8013045 copy
Turning on the inside. Nikon D800E, 28-300VR

Focusing with wide angle lenses is generally less precise with this method because the differences in phase are a lot less; to complicate things, the lens itself may have optical limitations in its design, introducing field curvature, coma etc – all of which can send potentially misleading data to the AF sensor, resulting in incorrect focus. It also doesn’t help that subjects tend to be a lot smaller, and not filling the AF boxes completely. (It’s also worth noting at this point that the AF boxes themselves are an indication of where the sensor grid lies, but there’s no documentation covering precisely where the active areas are located. For greater precision, perhaps the sensors should be crosses instead of boxes.)

_3030456bw copy
Precisely a fast as a speeding bullet. Nikon D3, 24-70

For moving subjects, phase detect systems either continuously change the focus distance, depending on the instantaneous phase information received at the AF sensor, or alternatively employ a predictive algorithm and multiple focusing points in order to track the subject. The most sophisticated systems also employ information from the metering sensor in order to track the subject by color. None of these systems are infallible, and can be fooled by objects of a similar color or larger size coming between the camera and subject – for instance if your subject happens to duck behind something. Although the level of processing power and sophistication of these systems has significantly increased over the past years; I have yet to see any autofocus system that can 100% reliably track an erratically moving subject – especially if it leaves the area of the frame covered by the autofocus sensor array.

_7032151bw copy
Cyclist, Nepal. Nikon D700, 24/1.4

I’m sure you can now see why the challenge of achieving perfect focus gets more and more difficult as sensor resolution increases: if any one of these is out of tolerance by a very small margin, you’re not going to have a sharp image.

Most mirrorless/ CSC cameras, compact fixed-lens cameras and DSLRs in live view all use a much simpler method of focusing – contrast detection. This involves moving the focus point of the lens back and forth to test which direction delivers the highest contrast. The camera will then iterate this process until highest contrast is achieved; although hunting has been minimized with the new generation of contrast detect cameras; it is still necessary to rack focus back and forth simply because there is no way for the camera to know which direction in which to move the lens. Because of this contrast detect autofocus will always be slower than well-implemented phase detect autofocus, with all other things being equal. However, it will also be more accurate simply because the imaging sensor is used to determine the point of optimal focus, and there are far fewer potential issues with tolerances and alignment of components.

_780_IMG_2312bw copy
Point of view. Canon IXUS 100 IS

It is also worth noting that the size of the sensor actually plays an important part in determining just how fast contrast-detect autofocus systems can be; this is because larger sensors have shallower depth of field for a given field of view and aperture, requiring more movement of the focusing groups within the lens in order to determine where the point of highest contrast (and correct focus distance) lies. This is especially noticeable when comparing a compact camera to a DSLR; compounding this is the fact that small sensor cameras require much shorter real focal lengths to achieve the same angle of view; this results in extended depth of field for a given angle of view, requiring less focus precision because any potential errors can be covered up by increased depth of field. The slow focusing of DSLRs in live view mode is not due to the lens’ focusing motor speed; the same combination often is capable of delivering blazingly fast results when used with the regular phase-detect system.

_M224792 copy.jpg
The instant of terror when you’re base jumping and not sure if your chute is going to open or not. Nikon D200, AI 500/4 P

There’s one added method that used to be common in older cameras, but is now only to be found on some of the Ricoh compacts: active phase detect. This uses an infrared beam to light the subject, and the reflected light is measured by two phase detection sensors on the front of the camera to assist the contrast detect system. It can greatly speed things up, but range is limited because it requires active illumination from the camera – and the power of these secondary lights is always limited.

Now that you have some understanding of how autofocus systems work, let’s talk about some tips to maximize the accuracy and speed of your camera.

_M80_DSC3155 copy.jpg
Through the flood. Nikon D80, 17-55/2.8

All cameras

  • Don’t let the camera pick the focus point for you. Unless you are shooting and erratically moving subject which you cannot follow manually selecting the focus point; always shoot in single point mode and pick your focus point carefully to be over your subject. Many cameras also weight the metering in favor of the focus point; it is therefore important to ensure that it corresponds with your subject – it is almost always what you would want to have correctly metered anyway.
  • Make sure your subject is larger than your focus point. If it isn’t; you need to either move closer (this also becomes a compositional issue) or focus on something at the same distance which presents a larger target.

Phase-detect cameras (DSLRs, Sony NEX-5R, NEX-6, Nikon 1)

  • The camera will always focus on the closest object underneath the focusing point. It may sometimes be fooled by a higher contrast structure – for example, a barcode instead of a blank piece of paper immediately behind it – but in general it will pick the closest subject providing it completely covers the focusing point.
  • High-contrast subjects (again, like barcodes) make ideal autofocus targets. It is also worth noting that some autofocus points are sensitive to detail in one direction only; i.e. horizontally or vertically, and not both directions. (Cross type points are sensitive to detail in both directions; but these are generally only found at the center point, or distributed around the AF-sensor arry only on high end cameras.) It is therefore important to find a suitable target for your camera – a QR code rather than a barcode, I suppose.
  • Use continuous autofocus, unless you are shooting a static object with the camera on a tripod. This is because any small motion of either you or the subject can be enough to move the plane of focus away from the intended point; this is especially critical with fast, shallow depth of field lenses. With continuous autofocus, the camera is always focusing right up to the point of image capture. The one exception to this, is slow, or wide angle lenses. Smaller format cameras are a bit less sensitive to this issue because they have more depth of field for a given angle of view, which tends to compensate for any errors in the focusing system.
  • Try to avoid focusing at the center and recomposing your image where possible, because there are potential issues with field curvature – especially at the edges and corners of wide angle lenses. Use the autofocus point that is either directly over your subject or closest to it in order to minimize any potential issues with the lens’ design.
  • Assign a button to locking focus (AF-L) to use in conjunction with continuous autofocus; this saves you having to switch to single autofocus with static subjects. Alternatively, decouple focusing from the shutter button by assigning an AF-ON button that activates focusing when pressed; I don’t use this method as it requires you to press two buttons to shoot; I prefer to minimize the number of controls that must be attended to especially in fast-moving situations.

IMG_0940b copy
Panning in the rain. Apple iPhone 4.

Contrast detect systems (DSLRs in live view, compacts, CSCs, mirrorless cameras)

  • Once again, do not let the camera pick the focus point for you; select it yourself. If anything, cameras that use contrast detect systems tend to be far more flexible in where you can put your focusing point; this is because they use the entire area of the imaging sensor.
  • Avoid continuous autofocus. This seems counterintuitive in light of my advice for phase detect cameras, however this is because continuous autofocus on a contrast detect system is constantly hunting back and forth around the point where expects to subject to be; imagine a car trying to follow a curve that the driver can’t see until it’s almost immediately in front of him – the path (here, the focusing distance) will be erratic and not match the curve exactly. This tends to result in a very low hit rate. It also helps that contrast detect cameras tend to either have an alternate system to deal with moving objects (in the case of DSLRs); or employ much smaller sensors that are very forgiving of minor focusing errors or changes in subject position due to their extended depth of field.
  • If you have to use continuous autofocus because your subject is moving; there are two other alternatives. The first option is to set your camera to maximum contrast (for obvious reasons) – the live view image is usually a preview of your current camera settings and will match the JPEG output. If you’re shooting raw; your file will not be affected by in camera processing. The second option is an old trick using the days of manual focus photography; it’s called ‘trap focusing’. First, decide on your composition and where your subject must go in order to complete it; ensure your shutter speed is high enough to prevent motion blur of the subject; finally, choose single autofocus and prefocus the camera at that position, releasing the shutter when the subject is in the intended position. One added advantage of this technique – especially for compact cameras – is that it significantly reduces the shutter lag to the point where it is very easy to release the camera at the precise moment you intend. Note that if you cannot get a high enough shutter speed; then you will need to pan through with the subject in order to only blur the background out and keep the subject sharp; this is a combination of panning and trap focusing techniques and works best when the subject is moving across your field of view; it is pretty useless if the subject is coming towards you.
  • Some cameras have a continuous pre-focus or full-time autofocus option that is always adjusting the lens based on whatever subject happens to be under the focusing point at the time. This is generally a good option if you absolutely must reduce shutter lag and are unable to pre-focus. However, note that the system can also be fooled, most notably by moving the camera around rapidly – especially if you are not pointing it at anything in particular. It is also an enormous drain on (usually already short) battery life because the lens’ focusing groups are constantly in motion so long as the camera is switched on.

It is worth practicing all of these techniques until they become second nature; you’ll be surprised by both the increase in your keeper rate, as well as the improvement in acuity and sharpness at the individual pixel level. It is just one of the many elements of shot discipline; which is critical in achieving the highest possible image quality from your camera. You’ll also be surprised at just how much more responsive your camera has seemingly become. MT


Visit our Teaching Store to up your photographic game – including Photoshop Workflow DVDs and customized Email School of Photography; or go mobile with the Photography Compendium for iPad. You can also get your gear from B&H and Amazon. Prices are the same as normal, however a small portion of your purchase value is referred back to me. Thanks!

Don’t forget to like us on Facebook and join the reader Flickr group!


Images and content copyright Ming Thein | mingthein.com 2012 onwards. All rights reserved


  1. You wrote: “Force yourself to shoot for an extended period of time with what you would perceive to be a limited set of equipment. This may be one zoom, or one prime; the point is that it conditions your mind into recognizing what you can capture and ignoring all of the things that you can’t.”

    If you can expand on this with an essay or two, perhaps with your new year’s resolution to “get” the 50mm focal length, how you go from the unconditioned mind to the conditioned one, or such, I would find it of great interest.

    Thanks in advance!

  2. Hi Ming, Not a comment on this post but a suggestion for a post : Microcontrast. This word is used a lot, and I’m not sure that everyone using it all over the net is meaning the same thing. Now I *think* I have understood what you mean by microcontrast, but it would be good to have a comprehensive post all about this important subject, along with sample shots showing good, poor and magical m/c. Keep up the great work!

    • Thanks for the suggestion, Bob. This one has been on my ‘to do’ list for some time: the problem is, verbal definitions aren’t very specific or descriptive because we simply lack the language to discuss it properly. I don’t have any – or at least very few – examples of ‘bad’ microcontrast, because I just don’t buy these lenses…

  3. One wrinkle in the use of AF-ON for focus and then the shutter button for picture taking is that AF-ON does NOT activate image stabilization in Nikon’s stabilized lenses. You have to hold the shutter button down half-way for a moment for this to kick in, and then shoot. I found this out the hard way with blurry shots at what should have been reasonable shutter speeds. Lesson is: be careful and turn off VR unless you are shooting at low shutter speeds hand held.

    This really messed me up for a while since I tend to use AF-ON then a quick stab at the shutter button to get “continuous or single frame” AF depending on when I let go of the shutter button. Very annoying.

  4. Ming, great article.

    I am curious, when using your OMD, what kind of technique do you use to get the tack sharp photos say with the PL 25mm f1.4 shooting wide open?

    I am using OMD and am a focus-recompose shooter. The keeper rate falls sharply when I shoot wide open and close to the subject.


  5. Ming, great article.

    I am a focus-recompose shooter and I am currently using OMD. Lately after reviewing my photos, I realised a significant number of them with my intended subject not as sharp as I want them to be. This is especially so when I shoot wide open. Understandably so as well.

    I have tried a few settings on OMD to separate AF and release of shutter as well as AF tracking mode. They are just not that natural for me.

    I am curious how you shoot to get tack sharp subject when using OMD with say the PL 25mm f1.4 lens?

    • For moving subjects, S-AF and press all the way down – the camera will only shoot when in focus. You want to minimize the lag (and thus subject motion) between perfect in-focus and time of capture. It’s a fast camera, and DOF is fairly generous – compared to MF or 35mm fast lenses at least – so it works. It isn’t ideal, but will have to do until we have proper PDAF on mirrorless cameras.

  6. Not many comments, but enjoyed the read! Funnily enough for me the AF-ON and de-coupling of focus and shutter has been a revelation on how I shoot – it just feels more natural to me. But this only applies if I am using AF continuously.

    With AF tracking I tend to focus with the centre point and then track and see what point it ends up after I frame. I always felt I should be shifting the actual focus point more than I have in reality (obviously not the case for single point focus!)

    • Thanks. I think it didn’t post to FB and twitter (did the former manually) so that could be why – not a lot of traffic today, either.

      I prefer to have AF and release on the same button so I don’t have to fumble for two buttons for a grab shot – hangover from my photojournalism days, I suppose. These days commercial work is almost always magnified LV + manual focus anyway.

  7. In regards to your suggestion not to focus and recompose and use of continuous focus:
    what about focus tracking?
    I really like AFON + 3D tracking on my D800.
    Cheers, Andi

  8. Wonderful Article Ming. Very helpful and informative. Wonderful photos as well.

%d bloggers like this: