Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version Search this Thread
09-28-2010, 04:36 AM   #1
Site Supporter
klh's Avatar

Join Date: May 2009
Location: Rochester, New York, USA
Posts: 768
So how can a lens affect front/back focus?

Time for someone to help with my education...

I have a rudimentary understanding of why a camera can require focus calibration. The light going through the mirror to the AF sensor must travel exactly the same distance as the light that will go straight to the film or photo sensor. If the AF sensor distance is off slightly, then the photo from the camera will be focused in front or in back of the subject.

So help me understand why specific lenses on the same camera would be different from one another. I often read that a lens has a tendency to front or back focus, and my K20D has the ability to adjust individually for lenses. But if the AF sensor is adjusting focus on the lens to the highest contrast, how can this be? From a control perspective, there is a simple feedback loop in that the camera adjusts focus to the max contrast. It seems that if one lens back focuses, all would, and by the same amount.

So what am I missing?

09-28-2010, 04:40 AM   #2
axl
Veteran Member




Join Date: Mar 2007
Location: Nove Zamky, Slovakia
Photos: Gallery | Albums
Posts: 7,181
it's because no 2 things are the same! There are so called manufacturing tolerances. And it's because of those that the lenses differ. One lens is few um this way other lens the other way, etc.
Even if you put 5 different copies of the same lens on the same camera you may need to use 5 different adjustments.
09-28-2010, 04:46 AM   #3
Veteran Member
creampuff's Avatar

Join Date: May 2007
Location: Singapore
Photos: Gallery
Posts: 3,955
AF lenses will have electrical contacts, a ROM-IC, and a distance encoder. In a perfect world, these should mate with the camera's AF module to deliver perfectly focused images but often there can be small variations that may require some measure of fine tuning.
09-28-2010, 04:49 AM   #4
Pentaxian
bdery's Avatar

Join Date: Mar 2008
Location: Quebec city, Canada
Photos: Gallery
Posts: 5,831
There are numerous articles about this on the web, but I'll try to give you the short version.

You correctly point out that a camera cannot focus perfectly. The key to answer your question is to understand that everything in manufacturing is about being "within tolerances". So a camera could be slightly front or back focusing, but still be within tolerances defined by the company's R&D/metrology teams.

the same reasoning applies to a lens. Any lens. Its motor drive, its calibrations, everything will be within a given tolerance.

Now, the problem might arise if the two tolerances, each acceptable in their own right, are both at one extreme (say, both front focusing, each individually within acceptable values). the sum of those two tolerances might give you an out of specification combo.

That's why manufacturers will typically require you send them both your lens and camera when readjusting focus for you. they need to match the two parts of your combo.

Normally these extreme situations do not occur. But nothing's perfect, a tolerance that's too tight will lower the first pass yield of the manufacturing chain, increasing cost. So you have to balance everything and make reasonable choices for your tolerances.

I hope this helps.

09-28-2010, 03:43 PM   #5
klh
Site Supporter
klh's Avatar

Join Date: May 2009
Location: Rochester, New York, USA
Posts: 768
Original Poster
OK, I didn't explain my question very well. I'm not confused about variation in manufacturing and how the variation in two components of a system interact.

What I am trying to comprehend is how the lens interacts with the focus control system.

As a simple example, if I want to control a flow rate of liquid through a pipe, I place a control valve (lens) and a meter (focus sensor) in the line. If the flow rate is too high, I close the valve; if the flow rate is too low, I open the valve. If I replace the control valve with another that is slightly oversized, then the control system will simply close it further until the flow rate is correct.

Now I apply this same line of thought to the optics in my camera.

If the image on the AF sensor is blurry, the camera changes the lens focus. It keeps doing this until the contrast is maximized. If the lens is focusing a little further out than specification, the sensor should simply continue to adjust the focus until the contrast on the sensor is maximized.

If I am manually focusing, I do the same thing. I continue to adjust the focus until the focus screen shows the best focus. Often I overshoot, and adjust back. If the focus screen on the camera is calibrated correctly, the lens can't really back or front focus.

In other words, I am assuming the AF sensor operates similarly to a feedback controller, just like my eye in MF mode. So what am I misunderstanding?
09-28-2010, 04:25 PM   #6
Senior Member
fb_penpho's Avatar

Join Date: Jul 2009
Location: London
Photos: Gallery
Posts: 190
I do not understand either

Klh, I am like you. Our take on front/back focus is the same. By the way the AF does not act similarly to a feedback controller. It is a feedback control system. I can also understand why you would want a single adjustment to put the focus where you consider it to be the sharpest focus, but this would apply to all lens.

As you say the lens is part of the feedback loop and any manufacturing tolerances are eliminated by the feedback system. The AF system has no exact knowledge of the precise point it has moved the lens focus. The AF focus detector is in the camera and this controls how the lens is to be driven to a position where it thinks the sharpest focus is obtained.

Again, I don't understand this adjustment for individual lens.
09-29-2010, 04:51 AM   #7
Pentaxian
bdery's Avatar

Join Date: Mar 2008
Location: Quebec city, Canada
Photos: Gallery
Posts: 5,831
QuoteOriginally posted by klh Quote
In other words, I am assuming the AF sensor operates similarly to a feedback controller, just like my eye in MF mode. So what am I misunderstanding?
You are understanding well, but not using your analogy to its fullest.

You assume that your meter (sensor) is perfectly calibrated, that your valve (lens) is also perfectly calibrated, and that the communication protocols between the two are flawless.

I think you see where biases can come from. As with any product specification, there's an uncertainty associated with AF calibration. Two uncertainties, acutally, one in the AF engine, one in the lens controller.

If you prefer to use the MF analogy, then take into account that you are using an image formed on the focus screen to adjust everything. If the focus screen is misaligned, you've got problems. And even then, your brain might make a "measurement error" and the eye-hand relation might mean you will not place the focus ring exactly where it belongs.

Clearer?
09-29-2010, 06:04 AM   #8
Inactive Account




Join Date: Dec 2008
Location: Ames, Iowa, USA
Photos: Albums
Posts: 2,965
QuoteOriginally posted by klh Quote
OK, I didn't explain my question very well. I'm not confused about variation in manufacturing and how the variation in two components of a system interact.

What I am trying to comprehend is how the lens interacts with the focus control system.

As a simple example, if I want to control a flow rate of liquid through a pipe, I place a control valve (lens) and a meter (focus sensor) in the line. If the flow rate is too high, I close the valve; if the flow rate is too low, I open the valve. If I replace the control valve with another that is slightly oversized, then the control system will simply close it further until the flow rate is correct.

Now I apply this same line of thought to the optics in my camera.

If the image on the AF sensor is blurry, the camera changes the lens focus. It keeps doing this until the contrast is maximized. If the lens is focusing a little further out than specification, the sensor should simply continue to adjust the focus until the contrast on the sensor is maximized.

If I am manually focusing, I do the same thing. I continue to adjust the focus until the focus screen shows the best focus. Often I overshoot, and adjust back. If the focus screen on the camera is calibrated correctly, the lens can't really back or front focus.

In other words, I am assuming the AF sensor operates similarly to a feedback controller, just like my eye in MF mode. So what am I misunderstanding?
Perhaps the AF algorithm is at fault? I suspect that, in the interest of focusing speed, as focus is approached the algorithm estimates how much to move the lens because it cannot afford the long time needed to adjust back & forth by decreasing steps as it searches for optimum focus.

1) The relationship between how long to run the focusing motor for a particular amount of focus change will vary from lens to lens.

2) A particular lens may over(under)-shoot when the motor-drive stops running.

Other lens-specific, consistent errors may occur that can be corrected by software.

Dave

PS the algorithm might know the difference between over- and under-focus; the software correction moves the set point to an over(under)-focus position for each lens.

If it does not know the difference between over- and under-focus it can easily mis-estimate how far to move the lens on the final step...a software correction could be applied for each lens.

09-29-2010, 06:50 AM   #9
Pentaxian
reeftool's Avatar

Join Date: Dec 2007
Location: Upstate New York
Photos: Gallery | Albums
Posts: 8,155
QuoteOriginally posted by newarts Quote
Perhaps the AF algorithm is at fault? I suspect that, in the interest of focusing speed, as focus is approached the algorithm estimates how much to move the lens because it cannot afford the long time needed to adjust back & forth by decreasing steps as it searches for optimum focus.

1) The relationship between how long to run the focusing motor for a particular amount of focus change will vary from lens to lens.

2) A particular lens may over(under)-shoot when the motor-drive stops running.

Other lens-specific, consistent errors may occur that can be corrected by software.

Dave

PS the algorithm might know the difference between over- and under-focus; the software correction moves the set point to an over(under)-focus position for each lens.

If it does not know the difference between over- and under-focus it can easily mis-estimate how far to move the lens on the final step...a software correction could be applied for each lens.
Just reading your post got me thinking. Often I can notice slight focus adjustments when I'm taking my time with a shot even though I haven't moved the camera or my position. Looking at the AF mechanical parts, it is for all practical purposes a flathead screwdriver and a screw. There is a certain amount of play involved. There has to be or there would be issues with the mechanism not engaging. The tolerance factor would involve what the software considers "in focus". In AF-S, the shutter won't fire unless focus is achieved but I have noticed many times a slight adjustment the second or third time I half press the shutter button. Perhaps making up for the slop in the mechanism? Even with SDM, there would be a certain amount of travel back and forth to finally get focus. An adjustment in reality would be stopping the action before focus is achieved so the lens movement stops where it should, much in the same way you step on the brakes on your car before you reach the red light.
09-29-2010, 06:55 AM   #10
Pentaxian
Lowell Goudge's Avatar

Join Date: Jan 2007
Location: Toronto
Photos: Gallery | Albums
Posts: 15,400
QuoteOriginally posted by newarts Quote
Perhaps the AF algorithm is at fault? I suspect that, in the interest of focusing speed, as focus is approached the algorithm estimates how much to move the lens because it cannot afford the long time needed to adjust back & forth by decreasing steps as it searches for optimum focus.

1) The relationship between how long to run the focusing motor for a particular amount of focus change will vary from lens to lens.

2) A particular lens may over(under)-shoot when the motor-drive stops running.

Other lens-specific, consistent errors may occur that can be corrected by software.

Dave

PS the algorithm might know the difference between over- and under-focus; the software correction moves the set point to an over(under)-focus position for each lens.

If it does not know the difference between over- and under-focus it can easily mis-estimate how far to move the lens on the final step...a software correction could be applied for each lens.
OK So I too have been watching this with interest, but I have a couple of questions regarding these explanations.

1) while the relationship of how long to run the motor varies from lens to lens, for a particular lens design, this should not change because you cannot tell me that the drive ratio and focusing helix change from lens to lens within a single design

2) Over and undershoot would lead to an issue of a particular lens being inconsistent, and potentially not achieving focus ever because it would be a function of what direction you are coming from, this might be more important in overshooting, as it would lead to hunting, but always undershooting would get it right on the second attepmt. Something for example that would cause focus errors in AF-S but not AF-C.

This second issue is potentially why some lenses hunt and others do not. To me Hunting or taking a second try at it is related to the drive mechanics, and over and under shoot, but not to focus errors themselves. the focusing "servo system" should sort this out, unless the lens is really overshooting, because the camera will be sensing the error all the time, and repeatidly correcting it, but the overshoot may be uncontrollable.

What I wonder about is whether perfect focus is a stable condition.

I don't know how the phase detection works, but what if we are trying to control around something that has a "crest" for lack of a better term. At the crest, there is no slope, so it is almost impossible, near the crest to know a) where you are exactly, and b) what direction to go. It is almost impossible to have a system sit stably at this point. far away from the crest, it is relitively easy to operate at a correct point because there is a definable slope and you can tell up or down.

It would be like trying to figure out what direction is west at the north pole because every direction is south.
09-30-2010, 01:42 AM   #11
Inactive Account




Join Date: Dec 2008
Location: Ames, Iowa, USA
Photos: Albums
Posts: 2,965
QuoteOriginally posted by Lowell:
....
1) while the relationship of how long to run the motor varies from lens to lens, for a particular lens design, this should not change because you cannot tell me that the drive ratio and focusing helix change from lens to lens within a single design

2) Over and undershoot would lead to an issue of a particular lens being inconsistent, and potentially not achieving focus ever because it would be a function of what direction you are coming from, this might be more important in overshooting, as it would lead to hunting, but always undershooting would get it right on the second attepmt. Something for example that would cause focus errors in AF-S but not AF-C.
....

Read more at: https://www.pentaxforums.com/forums/pentax-slr-lens-discussion/116168-so-how-...#ixzz10zt0yzrw
Regarding comment 1, I agree in principal and it is consistent with some lens designs always showing front focusing while others always have back focus.

Regarding comment 2, I agree overall, but point out that the details of the algorithm are important. I have written crude algorithms to do similar things; one important detail is deciding when to stop a search. Clearly one cannot search forever, but because there are no perfect measurements, one can never stop searching unless some error is acceptable.

You say "Over and undershoot would lead to an issue of a particular lens being inconsistent, and potentially not achieving focus ever because it would be a function of what direction you are coming from..."

Yes, depending on the level of acceptable error or attempts permitted by the algorithm.I'd replace your "would lead" with "might lead" because we are simply guessing about the algorithms used.

One fast algorithm, independent of particular lens details, moves the lens a bit and estimates the amount of focus improvement, then uses that data to calculate how far to move the lens to achieve focus, applies that correction, and stops. Or it may repeat this a few times; in our imperfect world this guarantees error. Further, if the error is consistently over- or under-focus, it is correctable.

The original question was how is it possible for some lenses to consistently front focus while others consistently back focus given a simple feedback loop search - my answer is the search is likely not a simple feedback loop because such a search must logically run forever. However, as soon as a termination criterion is introduced, systematic errors are likely.

Last edited by newarts; 09-30-2010 at 02:22 AM.
09-30-2010, 02:00 AM   #12
Inactive Account




Join Date: Dec 2008
Location: Ames, Iowa, USA
Photos: Albums
Posts: 2,965
QuoteOriginally posted by klh:
...If I am manually focusing, I do the same thing. I continue to adjust the focus until the focus screen shows the best focus. Often I overshoot, and adjust back. If the focus screen on the camera is calibrated correctly, the lens can't really back or front focus....
True, but consider your manual focus termination criterion; you always stop trying at some point - thus guaranteeing an error on average. The question is what lens characteristics might cause bias in the error?

Say you always start with the lens set at infinity and a particular lens' focus ring is really really hard to turn during MF; might this lead to bias in your final focus result? I'm pretty sure it might for me... especially when I mentally compare it to a lens whose focus ring turns too easily!

Read more at: https://www.pentaxforums.com/forums/pentax-slr-lens-discussion/116168-so-how-...#ixzz110706O9k

Last edited by newarts; 09-30-2010 at 02:14 AM.
09-30-2010, 06:29 AM   #13
Pentaxian
Lowell Goudge's Avatar

Join Date: Jan 2007
Location: Toronto
Photos: Gallery | Albums
Posts: 15,400
QuoteOriginally posted by newarts Quote
Regarding comment 1, I agree in principal and it is consistent with some lens designs always showing front focusing while others always have back focus.

Regarding comment 2, I agree overall, but point out that the details of the algorithm are important. I have written crude algorithms to do similar things; one important detail is deciding when to stop a search. Clearly one cannot search forever, but because there are no perfect measurements, one can never stop searching unless some error is acceptable.

You say "Over and undershoot would lead to an issue of a particular lens being inconsistent, and potentially not achieving focus ever because it would be a function of what direction you are coming from..."

Yes, depending on the level of acceptable error or attempts permitted by the algorithm.I'd replace your "would lead" with "might lead" because we are simply guessing about the algorithms used.

One fast algorithm, independent of particular lens details, moves the lens a bit and estimates the amount of focus improvement, then uses that data to calculate how far to move the lens to achieve focus, applies that correction, and stops. Or it may repeat this a few times; in our imperfect world this guarantees error. Further, if the error is consistently over- or under-focus, it is correctable.

The original question was how is it possible for some lenses to consistently front focus while others consistently back focus given a simple feedback loop search - my answer is the search is likely not a simple feedback loop because such a search must logically run forever. However, as soon as a termination criterion is introduced, systematic errors are likely.
I think the last point is the most critical, what is the termination criteria to satisfy focus. That criteria could, IMO, lead to systemic failure to achieve focus with a specific error product by product (of course with some deviation for individuals within the product) . By product I mean each specific lens design.

the problem is we do not know and probably never will know the criteria and perhaps the camera makers also do not know, or it is too costly to control, otherwise there would be no focus adjustment on newer bodies.
10-01-2010, 05:02 AM   #14
Pentaxian
bdery's Avatar

Join Date: Mar 2008
Location: Quebec city, Canada
Photos: Gallery
Posts: 5,831
QuoteOriginally posted by Lowell Goudge Quote
the problem is we do not know and probably never will know the criteria and perhaps the camera makers also do not know, or it is too costly to control, otherwise there would be no focus adjustment on newer bodies.
Why would you assume the manufacturer does not know his own criteria?

Working in R&D for a company manufacturing hardware, I will venture to say I have some understanding on the processes being discussed here. I explained them as simply as possible a few posts above.
10-01-2010, 05:58 AM   #15
Pentaxian
Lowell Goudge's Avatar

Join Date: Jan 2007
Location: Toronto
Photos: Gallery | Albums
Posts: 15,400
QuoteOriginally posted by bdery Quote
Why would you assume the manufacturer does not know his own criteria?
What I am saying is that they may know the criteria, in terms of thresholds etc, but they may not know, down into the lens manufacture detail, the tolorance variables or design details that will gaurantee critical focus is achievable on each and every lens.

They may also, during the development of a lens, make adjustments between the theoretical design, and what can actually be produced, in order to ensure that they can meet the standards repeatidly, with real products. This may mean, for example, accepting that a lens in the production phase may be deliberately set a few microns one way or the other , nominally to get the highest yeild of production within an absolute tolorance range.

As I said earlier, if manufacturers coould control everything perfectly 100% of the time, there would be no need for FF/BF adjustments, and certainly no need to have customizable MF/BF adustments for 20 different lenses.

Either the manufacturers simply dont know/can't control the process, or it is grossly expensive to do so.
Reply

Bookmarks
  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
af, camera, contrast, distance, focus, k-mount, lens, lenses, pentax lens, photo, sensor, slr lens
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to understand front focus/back focus thing 41ants Troubleshooting and Beginner Help 16 08-31-2010 08:42 AM
K-X front / back focus correction, lens tested ea77 Pentax DSLR Discussion 3 12-07-2009 06:56 PM
would a manual lens experience front/back focus problems? blu3ness Troubleshooting and Beginner Help 8 11-04-2009 11:14 AM
Front/back focus or focus shift? fulcrumx29 Pentax SLR Lens Discussion 0 08-17-2009 04:56 PM
Front focus/ back focus on Manual lens. Possible? WangJianWei Troubleshooting and Beginner Help 6 04-20-2009 07:50 PM



All times are GMT -7. The time now is 07:37 AM. | See also: NikonForums.com, CanonForums.com part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
register
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]
Top