I have a Canon 7D with a 50mm f/1.4 lens, and I think the auto-focus of the lens is off. How can I test and adjust this reliably?
Will this approach work with all of my lenses? If I had a different camera body, would I have other/different options?
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It only takes a minute to sign up.
Sign up to join this communityI have a Canon 7D with a 50mm f/1.4 lens, and I think the auto-focus of the lens is off. How can I test and adjust this reliably?
Will this approach work with all of my lenses? If I had a different camera body, would I have other/different options?
Use Bart van der Wolf's moire fringe method (also explained here and here, and archived here):
It works by exploiting the interference patterns or moiré between the R/G/B LCD elements and the camera's LCD elements when directly viewed with Life View [sic]. With good optics and perfect focus, the moiré is maximized.
Load this file (or from this alternate location). It's a black-and-white image of concentric rings which get increasingly small and close as the they get further from the center circle.
There's nothing particularly magic about this image: anything which produces a moire pattern on an LCD screen should work, but this one is designed to give good results in many situations. Bart van der Wolf also produced an earlier moire target design which some people apparently find works better.
If you can't see a moire effect, see these tips, which are, in summary:
To check if your camera/lens is having front-focus or back-focus issues you can download a pdf (incl a focus chart) here:
http://web.archive.org/web/20121205195820/http://focustestchart.com/focus21.pdf
The first few pages describe how AF works and how it can be tested. The actual instructions for testing the AF start at page at page 13.
I've been a huge fan of the moiré fringe method suggested by @Eruditass. But in playing with it, I discovered that there's an even better way, if your camera supports contrast-detect autofocus in live view mode. This is, in some ways, a combination of "method 1" and "method 2" of the moiré fringe approach, but doesn't require a special target.
As I was playing with adjusting a lens, I realized that the contrast detection focus method always gets it right, presuming a decent focus target. The moiré chart makes this very clear, but any strong focus target will work. This is because the contrast-detect focus works based on the actual data recorded by the same sensor that records the image, whereas the phase-detect method requires a separate sensor. So, contrast-detect is slow and annoying, but spot-on. (It appears to be more precise than I can focus manually with the stock viewfinder screen.)
You can exploit the fact that your camera has this second, always-accurate focus method and correct for the differences.
On my Pentax K-7, the exact steps are as follows. The dedicated live view button makes this nice and quick; if it's harder to switch, this method might not be so convenient.
You'll probably find that there's a range of settings where the AF doesn't move; I use the above process to find the edges of that range, and set the adjustment in the middle.
I quickly found in doing this that the right number varies pretty significantly based on focus distance. That means two things: 1) contrary to the typical AF adjust advice, rather than choosing a magical distance based on focal length, you should adjust for the distance you typically use that lens with, and 2) compromise is inevitable, so, pick something that works for the common case and don't stress so much about focus accuracy and sharpness. If you have something critical that is outside of your normal adjustment, you might want to align specifically for that shoot.
And again, another huge advantage of this approach is that you don't need a special target. As long as you can be sure that both focus methods are locking on to the same thing, any subject will do.
Focus is also sensitive to the frequency of light (the color temperature, basically), and unless you are normally lighting things with your computer monitor, that might sway the results. This lets you use natural lighting — or tungsten incandescent, if that's what you normally shoot under.
Although I came to this independently, I've since discovered that this exact method is the approach Canon recommends for accurate focus adjustment. And, the Nikon D500 actually has a built-in feature to do this automatically — cool, and I hope other DSLR makers follow suit.
Testing autofocus is hard to get right, so it's a good question.
I have used this chart with success: http://pentaxdslrs.blogspot.com/2008/06/part-1-autofocus-adjustment-for-pentax.html
(It's a Pentax blog, but the chart and directions are general except for the interactions with the actual camera.)
Follow the directions - they're very fiddly, but important.
Note that near focus and far focus can have difference calibration needs -- making a small chart like the one I suggest problematic -- but I have no idea if this is actually a problem in practice.
I'm lazy, so for me, "best" means easiest. YMMV. :) I use Magic Lantern, with the dot_tune.mo module to perform auto dot tune.
Dot tune was developed by horshak on dpreview. You don't have to take any pictures with it, it's fast, free, and uses the data of when the AF confirmation dot lights or (or doesn't), with a lens set to critical focus manually, while running through all the AFMA settings to see which ones give you AF confirmation. The ML module simply automates the process.
This works because of how the AFMA setting is used internally in the camera as input. As horshak explains it:
... Nikon DSLRs have an electronic rangefinder in the viewfinder that shows you when:
- Subject is in focus (green dot)
- Focus is behind subject - green arrow pointing left, indicating focus ring should be turned to the left, away from infinity
- Focus is in front of subject - green arrow pointing right, indicating focus ring should be turned to the right, toward infinity
The rangefinder's determination of the above conditions is based on the phase-detect AF system's evaluation of focus. This system includes a configurable AF fine tune value which can be adjusted on a per-lens basis or globally for all lenses that don't have a per-lens value configured. Most would assume that this AF tune value is an "output" bias that the camera adds to all lens movement commands, so that instead of telling the lens "focus to X" it instead tells the lens "focus to X + tune value". In actuality the AF tune value is an "input" bias that feeds into the PDAF's sensing logic, altering when the camera believes it has acquired focus. You can read more about this here.
Since AF tune affects the camera's PDAF evaluation of what's in focus, it also affects the electronic rangefinder indication of focus. You can demonstrate this by establishing critical focus on a subject (green dot), changing the AF tune value, then without refocusing, observe that the rangefinder now shows a left or right arrow indicating the camera thinks the subject is no longer in focus, even though you didn't adjust focus.