Canon autofocus information
/forum/topic/241524/0

1
       2       3              8       9       end

Jeff
Registered: Dec 31, 2002
Total Posts: 8870
Country: United States

I ran across this archived post in relation to another thread (sorry I missed this first time around!), and thought it worth posting and sticking to the forum for awhile. Lots of good info here, and thanks to RDKirk for paraphrasing and taking the time to include the information in that thread. (BTW, this is in reference to the 20D, though I'd guess the basic technical details are valid across the line of dSLRs).

Jeff
FM.com Moderator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RDKirk wrote:

According to the major material in Canon's "Lens Work III," the description in their US patent application, and remarks by Chuck Westfall, to put it briefly:

The AF system sensors are located in the floor of the mirror box. They receive the image through the semi-silvered mirror, which is then reflected downward by a secondary mirror hinged to the back of the main mirror. This forms a virtual focusing plane that is supposed to be at the exact same plane as the sensor (a point of possible miscalibration).

Each AF sensor consists of a pair of short lines of pixels forming an array. One array comprises the outer sensors. Two crossed arrays (one vertical, one horizontal) comprise the center sensor. With lenses or f2.8 or faster, the camera activates a second vertical array in the center.

The arrays are sensitive to linear details that run perpendicular to the orientation of the array. Therefore, the horizontal arrays (identified by the horizontal rectangle marks on the viewscreen) are sensitive to vetical linear details; the vertical arrays (identified by the vertical rectangle marks on the viewscreen) are sensitive to horizontal linear details.

They are blind to linear details that run parallel to the array direction. The center array, being a crossed combination of a vertical and a horizontal array, is sensitive to linear details running both vertically and horizontally. When the second vertical array is activated, it's combined input increases the accuracy by a factor of three.

The pixel arrays are actually three times longer than indicated by the viewfinder markings. This is to cover the fact that the viewscreen has a significant amount of "slop" in its horizontal-plane positioning (what you see as left/right/up/down in the viewfinder). Therefore, the sensors actually see details that are somewhat outside the viewfinder markings, and may focus on them instead of details within the sensor markings, if those outside details are more perpendicular to the array than the details inside the markings.

When you mount a lens (whether the camera is on or off), the camera interrogates the lens for its characteristics, including maximum aperture, which one of the focusing parameters.

When you half-press the shutter release (or the * button, if you've used the custom function to move focusing control there), the activated AF sensor "looks" at the image projected by the lens from two different directions (each line of pixels in the array looks from the opposite direction of the other) and identifies the phase difference of the light from each direction. In one "look," it calculates the distance and direction the lens must be moved to cancel the phase differences. It then commands the lens to move the appropriate distance and direction and stops. It does not "hunt" for a best focus, nor does it take a second look after the lens has moved (it is an "open loop" system).

If the starting point is so far out of focus that the sensor can't identify a phase difference, the camera racks the lens once forward and once backward to find a detectable difference. If it can't find a detectable difference during that motion, it stops.

Although the camera does not take a "second look" to see if the intended focus has been achieved, the lens does take a "second look" to ensure it has moved the direction and distance commanded by the camera (it is a "closed loop" system). This second look corrects for any slippage or backlash in the lens mechanism, and can often be detected as a small "correction" movement at the end of the longer initial movements.

When the camera determines how far and in what direction the lens must move to cancel the phase difference, it does so within a tolerance of "within the depth of focus" of lenses slower than f2.8 (down to f5.6) or "within 1/3 of the depth of focus" of lenses f2.8 and faster. The depth of focus is the range at the sensor plane within which the image of a point will be reproduced as a blur smaller than the manufacturer's designated "circle of confusion" (CoC). Canon's designated circle of confusion is 0.035mm for the 24x36mm format and 0.02mm for the APS-C format. The CoC is based on maintaining the appearance of sharpness in a 6x9 inch print at about an 10 inch viewing distance (as revealed by the Euro-Canon web site). There is no guarantee that images enlarged any greater than this will appear sharp.

The depth of focus increases when the aperture of the lens decreases (like depth of field at the subject plane), but it does not change with the focused distance or the focal length of the lens (according to Canon, unlike depth of field). That is why the camera interrogates the lens for that information; it calculates the depth of focus tolerance from the maximum aperture, not the set working aperture.

As a result of this tolerance (within the depth of focus or within 1/3 of the depth of focus), the camera can place the actual plane of focus at random anywhere within the tolerance range, and not necessarily at the same place each time.

A non-exhaustive list of information about focusing:

1. The center focus square in the viewfinder represents has both horizontal and vertical sensors, so it can focus just as well on vertical and horizontal lines of detail. The outer focusing rectangles are represent sensors that are oriented either vertically or horizontally (according to the shape of the marks), and focus best on lines of detail that are perpendicular to them. You can test this easily: Line up a vertical focusing rectangle on a vertical detail (like the corner of a wall or the edge of a door) and try to focus. The camera will not be able to focus on it. But put a horizontal rectangle against that vertical line, and it will snap instantly into focus (you can turn the camera, and the same will be true). This is a valuable tool. If you are struggling with a background that competes with the foreground, look at whether either has linear detail (say, a squirrel on a tree branch). You can activate one of the rectangles and turn the camera so that the rectangle is either parallel with the linear detail that you want to ignore or perpendicular to the detail you want to focus on.

2. The actual focus sensor arrays are three times larger than the viewfinder marks. A user could put an intended subject in the mark, but if there is a strong detail just outside the mark (but within the sensor area), the camera would focus on that strong detail. This is a source of much of the complaints of the back- or front-focusing -- especially with the "ruler tests." Also, as far as the camera is concerned, a focus lock on anything within the sensor area is good, which sometimes covers more area than the photographer intended.

3. Auto focusing with the 20D only works with lenses with maximum apertures of f5.6 or greater (as determined by the information passed to the camera by the lens). This means the total maximum aperture of the lens, not the aperture you're shooting with at the momement. With a lens slower than f5.6, you have to focus manually (unless you fool the lens somehow into reporting an incorrect aperture to the camera).

4. On the 20D, the center marks have additional sensors to increase accuracy three times greater than the 10D, but these only come into play with lenses that have maximum apertures of f2.8 or greater (not the aperture set for shooting, but the maximum aperture). On a variable aperture zoom lens, if it drops below f2.8 while zooming, that information is passed to the camera, which cuts out the additional focusing sensors. The outside focus sensors of the 20D are normal accuracy.

5. The camera's AF sensors require some details in the image to determine the phase difference. It's harder for the camera to find focus when the light is dim or there is little subject detail. Contrary to recent remarks on another topic, the camera CAN distinguish contrast between equally bright hues of red and green just as the eye can--the sensors are color corrected. Although the sensors can distinguish some quite subtle detail differences, they don't see quite a sharply as the eye. If the lens starts from a very out of focus condition, it can miss very fine detail that the eye sees clearly, such as the mesh of a speaker grill from across the room. In this case, it can be helped if the photographer manually moves close to "focus" and allows the camera to find the actual focus.

6. AF controls:
Shutter release. By default, when you half-depress the shutter release, the camera will focus with the active sensors on the strongest contrasts within those sensor areas. Whether or not it will hold that focused distance depends on what AF mode you're shooting in.

AE/AF Lock Button. The asterisk button on the back near your right thumb. You can set this button to be the focus button in the Custom Function menu (CF4--choose option 1). When this is set, you focus by putting the active AF mark in the viewfinder on your subject and press the asterisk button. The camera focuses on that spot and does not change focus until you press the button again. In AI Servo mode, the camera continuously evaluates focus only as long as you have the button pressed.

Multicontroller (joy button) and AF Selection button. These controls, plus the control wheels, allow you to select which focus marks are active--they provide multiple ways to do the same thing, so take your choice. You can either select one point or you can set the camera to choose its own points as you focus. If the camera chooses the points, it will usually focus on any number of points that are closest to the camera. About the only time this is better is when you're focusing on fast-moving activity that you can't keep under a single mark (say, a soccer player). Otherwise, it's usually better to select your own point. The diagonal points on the 20D are very close to the "Rule of Thirds" intersections, so sometimes it's convenient (if you use that composition rule to place your subject in the frame) to select one of those points.

7. AF Modes:
One Shot: When you set the camera to "One Shot," you set the condition "The subject is definitely not moving." The camera is in a "focus priority" mode. The shutter release is locked until the camera achieves what it thinks is the proper focus. This is best if your subject and the camera will be motionless, because it allows you to focus and change the framing without the camera refocusing automatically.

AI Servo: When you put the camera into AI Servo mode, you have set the condition "The subject is definitely moving." The camera is in a "shutter priority" mode. Therefore, the camera goes into a routine that continually collects data to predict the subject movement and move the lens to intercept the subject at its new position. You can shoot even if out of focus (however, the camera cannot release the shutter if the lens is actually in motion). If you know your subject will be in constant motion, this is the best mode. If the subject is actually not moving, the chance of a misfocused shot increases as the camera goes through its data-collection routine. However, often a handheld camera does move (as the photographer sways naturally) for AI Focus to detect and correct for the sway. AI Servo will use whichever focus point you have activated. However, if you activate all the focus points, you must put the center point on the subject and half-press the shutter release for about half a second for the camera to "acquire" the right subject. After that, while you hold the shutter release, the camera can intelligently "hand off" the subject focus from point to point as the subject "wanders" over the viewscreen.

AI Focus: The camera is normally in One Shot mode and the shutter will lock until it achieves focus. However, if it detects the subject moving (that is, the subject goes out of focus), it will automatically switch into AI Servo mode and try to maintain focus. If you are focusing on something that frequently stays still but could move suddenly (like a toddler) this mode comes in handy. The important point wiht AI Focus is that it does not lock the shutter. However, the camera will usually interpret "focus and recompose" as movement of the subject, and will refocus.

http://www.fredmiranda.com/forum/topic2/228079/0#1877222

RDKirk wrote:

There are five main places this information comes from:

1. Canon's "Lens Work III" book (glossary, mostly)
2. Canon's latest application for a US patent on their autofocus system
Go to www.pat2pdf.org and enter patent # 6,603,929
3. Canon's pamphet on getting the most from EOS DSLRs
www.photoworkshop.com/canon/EOS_Digital.pdf
4. Canon Professional Services European web site FAQ
www.cps.canon-europe.com/faq/index.do
5. Lots of methodical observation and practice with the camera.

[furthermore] RDKirk wrote:

"If the camera places the actual focused plane within the depth of focus range, the intended focused plane of the subject should "look sharp" on a 6x9-inch print from a distance of 10 inches. In "high precision mode" the intended plane of focus should "look sharp" on about an 11x14-inch print at 10 inches (extrapolating from the standard size given by Canon for normal mode).

This standard is important to understand. If you use high precision mode and view the image on a monitor at 100 percent of the original pixel resolution, do not expect the actual plane of focus to coincide with the intended plane of focus. It's not necessarily going to do that--it's only designed to get close enough to "look sharp" at the standard final display enlargement size and viewing distance. If it does that much, then it's doing its job as designed.

If you're operating at normal AF precision, the camera will happily settle for any point within the depth of focus range (and not necessarily the same place every time--randomness within limits is what "tolerance" means in this context).

If you need optimum sharpness at greater than the standard final display sizes and viewing distances, then yes, you'll have to focus manually. However, a lot of focusing problems are caused by users not realizing that even autofocus requires learning certain techniques, some similar to the techniques of using a manual split-image rangefinder.

One person on this forum has reported an e-mail from Sigma stating that Canon cameras will tend to stop at the first part of the depth of focus range they reach, depending on the direction the lens must move to get there. My results have not verified that, and I don't think it really corresponds to how Canon says the system works."



zero2k
Registered: Apr 15, 2004
Total Posts: 320
Country: Australia

And because of the use of double mirrors in the 20D, it has a higher risk of mirror damage than a simple single one... I should know, mine died (the inner mirror has a lever that controls the angle of its movement, that lever breaks and the mirror won't flip).

Leon



glowrider
Registered: Nov 28, 2004
Total Posts: 5790
Country: United States

This is really great stuff, thanks for the repost. Had no idea about the vertical and rectangular sensors and their proclivities. With all the fuss over manually focusing, sometimes we may forget about the complicated AF systems in our cameras that need to be learned to use to our advantage.



20Dshooter
Registered: May 24, 2005
Total Posts: 1035
Country: Israel

Wow! Wha an incredible piece of work! A collection of data that Canon ought to put out, really, but since they leave it to the user to figure it out, and most of us don't, of course, thank you, RDKirk, for compiling this "non-exhaustive" collection of important information. I can't imagine how many pages this would go on for if it were exhaustive!

Anyway, I was having difficulty understanding this paragraph. Could anyone more more knowledgeable than I help me with this, please?

When the camera determines how far and in what direction the lens must move to cancel the phase difference, it does so within a tolerance of "within the depth of focus" of lenses slower than f2.8 (down to f5.6) or "within 1/3 of the depth of focus" of lenses f2.8 and faster. The depth of focus is the range at the sensor plane within which the image of a point will be reproduced as a blur smaller than the manufacturer's designated "circle of confusion" (CoC). Canon's designated circle of confusion is 0.035mm for the 24x36mm format and 0.02mm for the APS-C format.

Thanks again, and tank you, Jeff for "sticking" it.



jxsq
Registered: May 06, 2004
Total Posts: 1375
Country: United States

Big thanks to both RDKirk and Jeff!



Stoffer
Registered: Jan 27, 2005
Total Posts: 573
Country: Denmark

Thanks for a really great post!

This got my attention big time:


2. The actual focus sensor arrays are three times larger than the viewfinder marks. A user could put an intended subject in the mark, but if there is a strong detail just outside the mark (but within the sensor area), the camera would focus on that strong detail. This is a source of much of the complaints of the back- or front-focusing -- especially with the "ruler tests." Also, as far as the camera is concerned, a focus lock on anything within the sensor area is good, which sometimes covers more area than the photographer intended.


Gotta remember this that next time I use my 135L at f/2!



stevei
Registered: Feb 20, 2004
Total Posts: 954
Country: United Kingdom

RDKirk wrote:
When you half-press the shutter release (or the * button, if you've used the custom function to move focusing control there), the activated AF sensor "looks" at the image projected by the lens from two different directions (each line of pixels in the array looks from the opposite direction of the other) and identifies the phase difference of the light from each direction. In one "look," it calculates the distance and direction the lens must be moved to cancel the phase differences. It then commands the lens to move the appropriate distance and direction and stops. It does not "hunt" for a best focus, nor does it take a second look after the lens has moved (it is an "open loop" system).


I've read before that it works something like this, but this is all much more detailed than what I've seen before, so thank you very much for this info. What I've never understood, however, about the bit above is that I would expect the camera to need to know the current distance the lens is focused at, as surely the phase difference gives rise to a different change in focus distance depending on the current focus distance. Or perhaps the camera just tells the lens what phase difference to adjust for, and that calculation is internal to the lens, in fact I can't think of any other explanation given that we know not all lenses pass distance information to the camera. This is another possible source of miscalibration, if the lens has an incorrect measurement of the distance it's focused at when it performs this internal calculation, and this is why a lens can front or back focus on a perfect body, as well as bodies front or back focusing with perfect lenses (due to the AF mirror positioning as you mentioned).



dan
Registered: Oct 16, 2003
Total Posts: 1598
Country: Canada

In addition to the links above - here is Canon's 20D Technical Report:
http://www.canon.com/camera-museum/tech/report/200409/report.html

-----
dan



Claude
Registered: Apr 13, 2003
Total Posts: 2053
Country: Luxembourg

Many thanks to RDKirk! Great job! Thanks Jeff for reposting!
Claude



peppue
Registered: Mar 24, 2005
Total Posts: 36
Country: United States

Thx for the posting Jeff.
Is that true, that using fisheye lens will confuse the AF?



Carlo Botteghi
Registered: Mar 30, 2004
Total Posts: 492
Country: Italy

Thanks a lot Jeff and RDKirk too, of course. Really interesting Post.
Carlo



pscard
Registered: Nov 09, 2004
Total Posts: 50
Country: South Africa

Well done, an article well researched and thoughtfully put together.

Looks like we may have the first part of the elusive Canon D/SLR FAQ



Gerry Szarek
Registered: Mar 12, 2004
Total Posts: 2091
Country: United States

Also add that when using a 70-200 (or longer) and doing a focusing test you need the lines to be about 0.050 to 0.100 inch wide (a FAT marker), this is becuase you will only get a partial line on a pixel (this info was on photo.net someplace) which will cause the autofocus to FAIL. BTW there is an article on photo.net on how to conduct a proper autofocus test that probably should be linked in with this article.

http://www.photo.net/learn/focustest/ for a 10D but will work on any autofocus lens/camera setup.

RDKirk great job.



rnb2
Registered: Nov 14, 2003
Total Posts: 815
Country: United States

Gerry Szarek wrote:
Also add that when using a 70-200 (or longer) and doing a focusing test you need the lines to be about 0.050 to 0.100 inch wide (a FAT marker), this is becuase you will only get a partial line on a pixel (this info was on photo.net someplace) which will cause the autofocus to FAIL.


Has this changed between the focus system in the 10D/300D/350D and the 20D? This sounds very much like the issue I've experienced with my 20D, where it simply won't focus on a thin branch, but I don't seem to have had the same issue with my 300D or 350D.



howgus
Registered: Apr 01, 2005
Total Posts: 210
Country: United States

Gerry - the focus target in the link at photo.net is not recommended by Canon, and others, because the focus target is not parallel to the focus sensor. I recommend the focus setup here:

http://www.canon-dslr.com/Canon_Jan05/Canon_SLR_Focus_Test.htm

In my setup, I modified the focus target by simplifying it to 2 wide (0.2") vertical and 2 wide horizontal lines, spaced 1.5 inch apart. Test at 50 x focal length and 15EV, if possible, as these are the conditions Canon uses in their focus tests.



Gerry Szarek
Registered: Mar 12, 2004
Total Posts: 2091
Country: United States

Guy, if you down load some of the jpeg's in the article you will see they have similar targets to yours. Somebody actually took an autofocus sensor apart, measured the pixel widths to determine it's S/n ratio so they could figure out how the thing worked.

It's interesting to know that the [ ] in the view finder are only guides, somebody actually measured all of them in a 10D and found not only were they NOT centered but they were not aligned to each other with any particular accuracy.

The short version for everybody is KNOW how your autofocus works, what causes it to achieve appropriate focus and what doesn't (like poor lighting, etc).

For truely low light work, nothing beats a rangefinder.



howgus
Registered: Apr 01, 2005
Total Posts: 210
Country: United States

And from RDKirk's posts: the AF sensor size in the 20D is 3x the box size in the viewfinder! I interpret that to mean 3x linear, both horizontal and vertical for the center sensor, which comes to 9x the area.



RDKirk
Registered: Apr 11, 2004
Total Posts: 8976
Country: United States

>>the AF sensor size in the 20D is 3x the box size in the viewfinder! I interpret that to mean 3x linear, both horizontal and vertical for the center sensor, which comes to 9x the area.
<<

Actually, it's 5x the size. That's because it's shaped like the Red Cross with the square in the center. The "arms" of the cross that extend top, bottom, left, and right of the square are the same dimensions of the square itself.



lexvo
Registered: Sep 13, 2002
Total Posts: 3825
Country: Netherlands

RDKirk and Jeff: thanks for the info!

I wonder if there are differences regarding AF between 1-series bodies and other bodies. Could it be that AF on a 1-series is more precise? Or is it just faster?



Gerry Szarek
Registered: Mar 12, 2004
Total Posts: 2091
Country: United States

The 10D accuracy is +/- 1.0 DOF, the 1 Series body is +/- 1/3 DOF, somebody can correct me if I am wrong.

Gerry



1
       2       3              8       9       end