Evening

by w.hrybok

submit your photo


Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

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?

share|improve this question
3  
I just wanted you to make a note about this focus adjustment procedure. Every camera body and lens has a tolerance to which they can be manufactured. Therefore, when you adjust that lens (after determining that it indeed does not focus correctly), it will work for your case for that particular camera body. When you put that very lens on another camera you will notice that it will back/front focus again. Therefore, any of these adjustments must be done for a lens/body combo. Do note :) –  Eshwar Oct 18 '11 at 12:48
    
One factor with the EF 50mm f/1.4 that affects AF is that the motor for that lens has the fewest number of steps between MFD and ∞ of any lens in Canon's lineup. To get the most from that lens you will probably need to manually fine tune the focus after completing AF. –  Michael Clark Aug 27 '13 at 8:18

4 Answers 4

up vote 47 down vote accepted
+50

Moire Fringe Method

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.

Compared to focus charts

Pros:

  • Much more precise.
  • Unaffected by tungsten / incandescent lighting, which causes front focus. (I'm not positive if extreme monitor color temperatures affect it.)
  • Easier to line up 100% perpendicular, yet less affected by it.
  • Doesn't require taking a picture: liveview is sufficient with magnification.

Cons:

  • Without liveview, I'd imagine it'd be tedious.
  • Can't calibrate for tungsten lighting. (Though you can use a focus chart to supplement, and estimate the offset you'd need to give it for tungsten)

The Target Pattern

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.

Steps

Setup and familiarization:

  1. Load the target pattern at 1:1 / 100% view in any image viewer — your web browser will do, but make sure it's showing the image unscaled.
  2. Set up your camera on a tripod perpendicular and at the appropriate distance away from the screen
    • Camera-to-subject distance should ideally be no less than 50 times the focal length of the lens. For a 50mm lens, that would be at least 2.5 meters (25m for a 500mm).
  3. Turn on liveview and magnify until the image is close to filling the screen.
  4. In manual focus mode, adjust the focus distance and become familiar with the maximum interference pattern

Method 1:

  1. Go to the point of maximum interference. You do this by focusing manually (contrast detect may not be as precise, but you can try).
  2. Switch to phase detect and push the AF button.
  3. If the focus changes, dial in microadjustment in the correct direction and repeat.

Method 2 (more accurate, in my opinion):

  1. Set focus to infinity or closest focus.
  2. Autofocus using phase detection. Some cameras let you do this while in liveview.
  3. In liveview, manually adjust focus to see if it was front or back focused.
  4. If so, adjust and repeat.

Troubleshooting

If you can't see a moire effect, see these tips, which are, in summary:

  • If the focus is too far off, it won't work.
  • You could be too close for the focal length.
  • You could be too far away for the focal length.
  • The lens has poor resolution.
  • The lens's manual focus control is too coarse to nail the spot.
share|improve this answer
4  
I can confirm that the moire interference test works very well. I have used it with all my lenses to good effect. The chart method has the advantage that the degree of mis-focus can be shown to others but the moire interference test is more direct and precise. –  labnut Mar 21 '11 at 6:20
    
+1 For the superb answer, and if I could, I'd drop on another +1 for the "Life View" typo...classic, that one. ;) –  jrista Mar 24 '11 at 1:17
    
@jrista — typo is from the original. :) –  mattdm Mar 24 '11 at 4:38
    
Wish I could up-vote you again for providing good references. Backing references are so important. –  labnut Mar 24 '11 at 7:08
2  
I found the earlier test target to work best, as there's a smaller focus window where moiré shows up at all. I used "method 1" above. On my Pentax K-7, switching between contrast and phase detect is too many menu steps, and manual focus works fine, so "method 2" was a bit tedious. Once you have the lens focused manually, press the AF button and watch the way the top of the lens turns; move the adjustment slider the same way in the custom menu. –  mattdm Jun 7 '11 at 16:34

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.

share|improve this answer
    
Comparing to the chart Marc suggests, I'd give the chart itself that I suggested the advantage for two reasons: (a) "Focus here" band has slight depth (camera could focus on the top or bottom of band). (b) Chart requires you to measure your own 45 degrees. On the other hand, his doesn't require mucking around with scissors and tape to cut it out. I have no comment on the instructions & other info in Marc's PDF - they look interesting, but TLDR. :) –  Reid Jul 15 '10 at 20:03
    
Priedhorsky: Your suggestion looks very good as well. I think they are both technically sound, it's just a matter of taste. I personally don't like scissors ;). –  Marc Jul 18 '10 at 18:13
    
can you describe the process a bit here directly, so that we have an answer rather than a reference to a (presumably fragile) blog post? Thanks! –  mattdm Mar 23 '11 at 3:09

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.

share|improve this answer
    
can you elaborate on "the interesting stuff"? –  mattdm Mar 23 '11 at 3:08
    
@mattdm I realize now that is very vague indeed, I'll edit the answer. I won't post the exact content from the pdf though since I'd need permission from the author for that. –  Marc Apr 13 '11 at 19:22

Contrast-Detect-vs.-Phase-Detect Adjustment Method

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.

  1. Set the camera to use contrast detection for focusing in live view mode, and set it to use center-focus only.
  2. Fix your camera on a tripod, a natural distance from a strong, unambiguous, and flat focus target. I used this one I found via a quick Google Images search, but anything will do.
  3. Press the Live View button and then hold the AF button to focus using contrast detection. If your camera doesn't have a dedicated AF button, half-pressing the shutter will do.
  4. Press LV again to exit live view. Without moving anything, now press the AF button again to focus using normal phase-detect AF. You can look through the viewfinder to make sure it's doing the right thing, but once you're confident, you actually need to look at the lens itself as you push the button.
  5. Watch the direction the lens moves. Press the menu button, and then navigate to the AF adjustment menu option. (On my K-7, left, down 2×, right 3×.)
  6. Move the AF adjustment to match the way the lens went. On my Pentax camera, this means moving the slider in the same direction the top of the lens moved — if it turned to the left, the slider needs to go towards the negative side. This may differ on other systems, but you can do some quick experiments with extreme settings to figure it out.
  7. Save the setting, and then press LV again to exit the menu, and repeat from step 3.

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.