Auto focus, how it works

Then
after all 4 passes, it seems to indicate focus/no focus, it does
not guess or try to use a hyperfocal setting. I don’t know if it
uses information from all 4 passes in “guessing” or not, but it
usually seems to indicate a clean focus/no focus that is accurate.
I mostly agree with Brian but let me add a few extra points:

(Note that I am not talking about these few occasions where focus is incorrectly established)
If focus can not be established then 2 things may happen
Without flash, the focus will always be set to infinity
With flash, the focus will be set between 1,8 and 4m or infinity
depending on scene brightness and focal length setting.

(The manual incorrectly states that with the use of flash and no focus achieved that the distance is set between 3 and 3,8 m, but maybe they mean this as a DOF range)

These are not random things, the camera consistently takes the same decisions in the same circumstances

Other observations I made:

For a successful focus The camera makes either "one pass" attempt consisting 3 in-out-in movements or either a "two pass" attempt consisting of in-out-in-out-in
in both cases the last movement is very very short.
For an unsuccssful focus it makes a "two pass" in-out-in-out movements.

The difference is here I think:

If the contrast is good then only one pass is used and the stepping speed is higher.

If the contrast is poor, then two passes are used and the second pass is executed slower to obtain better accuracy.

If no sharpness improvement whatsovever could be noticed during the first pass, then the second pass will be shorter (only between infinity and 1.5 meter or so) to save time.

Every time where the camera is being is significantly shaking during focusing, a wrong focus distance will be achieved and acknowledged as correct focus, but only for far bright objects, for nearby or low contrast objects, a no focus indication is given.

This is not the case in contineous mode but then again, in this mode you can never be sure that the picture you are taking is sharp either since the red focus indicator can light up a fraction before you press the shutter.

Anyone has different observations than mine ?
 
Hi Bryan,

Maybe another way to measure focus times very accurately is to attach a small microphone to the lens and record the sound of the focusing motor on the computer.

Then by means of the wave editor, you can determine the times very accurately. The advantage here is that you have just a wire hanging around but for the rest you have full freedom of movement to point and shoot.
Furthermore you can determine the stepping speed from the waveform at all times.

I do not have a small mic here at the office, otherwise I would try it out myself.
Please let me know what you think of the idea, is it worth to try out?

Jean Paul
 
Hi Jean Paul,

Well, that is an excellent idea. I wonder how much of a delay there is between pressing the release and the start of the focus motor working, I'd want to include that in the time too. I do wish that I had not sold my old oscilliscope at a swap fest now.
Bryan
Hi Bryan,

Maybe another way to measure focus times very accurately is to
attach a small microphone to the lens and record the sound of the
focusing motor on the computer.
Then by means of the wave editor, you can determine the times very
accurately. The advantage here is that you have just a wire hanging
around but for the rest you have full freedom of movement to point
and shoot.
Furthermore you can determine the stepping speed from the waveform
at all times.
I do not have a small mic here at the office, otherwise I would try
it out myself.
Please let me know what you think of the idea, is it worth to try out?

Jean Paul
 
Hi Jean Paul,

These are all great observations. I'll see if I can confirm them, now that I know what to look for, and work them in to the information. Bryan
Then
after all 4 passes, it seems to indicate focus/no focus, it does
not guess or try to use a hyperfocal setting. I don’t know if it
uses information from all 4 passes in “guessing” or not, but it
usually seems to indicate a clean focus/no focus that is accurate.
I mostly agree with Brian but let me add a few extra points:
(Note that I am not talking about these few occasions where focus
is incorrectly established)
If focus can not be established then 2 things may happen
Without flash, the focus will always be set to infinity
With flash, the focus will be set between 1,8 and 4m or infinity
depending on scene brightness and focal length setting.
(The manual incorrectly states that with the use of flash and no
focus achieved that the distance is set between 3 and 3,8 m, but
maybe they mean this as a DOF range)
These are not random things, the camera consistently takes the same
decisions in the same circumstances

Other observations I made:
For a successful focus The camera makes either "one pass" attempt
consisting 3 in-out-in movements or either a "two pass" attempt
consisting of in-out-in-out-in
in both cases the last movement is very very short.
For an unsuccssful focus it makes a "two pass" in-out-in-out
movements.

The difference is here I think:
If the contrast is good then only one pass is used and the stepping
speed is higher.
If the contrast is poor, then two passes are used and the second
pass is executed slower to obtain better accuracy.
If no sharpness improvement whatsovever could be noticed during the
first pass, then the second pass will be shorter (only between
infinity and 1.5 meter or so) to save time.

Every time where the camera is being is significantly shaking
during focusing, a wrong focus distance will be achieved and
acknowledged as correct focus, but only for far bright objects, for
nearby or low contrast objects, a no focus indication is given.
This is not the case in contineous mode but then again, in this
mode you can never be sure that the picture you are taking is sharp
either since the red focus indicator can light up a fraction before
you press the shutter.

Anyone has different observations than mine ?
 
Just curious- Given that at wide open aperture a small sensor camera has much greater depth of field than we are used to from our 35mm camera - does this mean that if the D7 had a split prism optical finder one wouldn't see the sharp snap into focus that we are used to seeing - and therefore auto focus for these smaller sensor cameras is more technologically difficult?
Time for some new information!
I have been pressing the button on my D7 a lot, trying to figure
out how the autofocus system works...
 
Just curious- Given that at wide open aperture a small sensor
camera has much greater depth of field than we are used to from our
35mm camera - does this mean that if the D7 had a split prism
optical finder one wouldn't see the sharp snap into focus that we
are used to seeing - and therefore auto focus for these smaller
sensor cameras is more technologically difficult?
Well, I don't know about the split prisim, but one thing is for sure that the camera would need a larger lens for the same performance because the prism takes about 30% of the light. I wonder if the lens might not be as good if it were larger. It probably is true that digital cameras have a harder time focusing because of the small sensors and large depth of field for a number of reasons. The depth of field is one. Another factor is how many focus readings per second you can take, and how much light the sensor can gather while the CCD is in fast readout focus mode. The smaller pixels like on the 3.3 and 5 Mpixel sensors gather less light, so you can't focus as fast. If you look at the spec sheets the fast readout modes are usually 30 or 60 frames per second, so that limits how long an exposure you can make and how many readings per second you can take while focusing. Even with a binary search for the focus you only get 30 readings per second, assuming that you can move the lens fast enough. It is a miracle that it can focus at all!
Bryan
Time for some new information!
I have been pressing the button on my D7 a lot, trying to figure
out how the autofocus system works...
 
Thanks Bryan and JP for all the hard empirical work and technical information. Much of it confirms what has been obvious in practice, most importantly that poor contrast equals poor focus.

What I find interesting is that the camera sets itself at infinity if it cannot find focus in non flash mode. I had not observed that, perhaps because when I first see that it doesn't get it on 2 tries, I instinctively shift the focus point toward more contrast in the image( a habit made necessary with my 990). May be I should be more patient before hitting the M button. I will try that.

I have some strong doubt that it will be successful though, because IF camera movement essentially starts the procees over at 200mm, then the only time you will get the camera setting to infinity is when you have been fortunate enough to hold the focus point really steady--very hard to do with such a light camera if you are using spot focus, but somewhat easier if you are in multi seg mode where the camera will do some searching for you, although the focus box is quite small and as Bryan has suggested can be moved off the original area enough to start the process over. Doesn't this suggest that the AF success rate will be lower in spot or flex focus when the contrast is lower in the scene at long focal lengths where camera shake is accentuated?

I have noticed in using my Oly B300 tele on the D7 that focusing is appreciably better, faster and very assured. I discoverd that when using it on my 990+2X+B300 combo (c 400mm) the focus lock dramatically improved, and I long ago attributed that to the vastly better contrast of the B300 over the Nikon lenses. Now, I suspect that the same thing is happening with the D7+B300 based on your information. I should add that I have only used this combo for 40-50 shots and have done no testing to confirm the accuracy of my perception.

At any rate, pragmatically, aren't we better off setting to manual/infinity if we know we will be operating at distances/aperatures that will put us in an infinity focus context. For one thing, the LCD shows a steady state fully focused image from the get go, not having to be taken in and out of focus searching for a lock that may or may not occur. (Annoying to say the least) In many of my shooting contexts, I have found it to be much less frustrating and a lot quicker.

Thanks again for the hard work.

dh
Then
after all 4 passes, it seems to indicate focus/no focus, it does
not guess or try to use a hyperfocal setting. I don’t know if it
uses information from all 4 passes in “guessing” or not, but it
usually seems to indicate a clean focus/no focus that is accurate.
I mostly agree with Brian but let me add a few extra points:
(Note that I am not talking about these few occasions where focus
is incorrectly established)
If focus can not be established then 2 things may happen
Without flash, the focus will always be set to infinity
With flash, the focus will be set between 1,8 and 4m or infinity
depending on scene brightness and focal length setting.
(The manual incorrectly states that with the use of flash and no
focus achieved that the distance is set between 3 and 3,8 m, but
maybe they mean this as a DOF range)
These are not random things, the camera consistently takes the same
decisions in the same circumstances

Other observations I made:
For a successful focus The camera makes either "one pass" attempt
consisting 3 in-out-in movements or either a "two pass" attempt
consisting of in-out-in-out-in
in both cases the last movement is very very short.
For an unsuccssful focus it makes a "two pass" in-out-in-out
movements.

The difference is here I think:
If the contrast is good then only one pass is used and the stepping
speed is higher.
If the contrast is poor, then two passes are used and the second
pass is executed slower to obtain better accuracy.
If no sharpness improvement whatsovever could be noticed during the
first pass, then the second pass will be shorter (only between
infinity and 1.5 meter or so) to save time.

Every time where the camera is being is significantly shaking
during focusing, a wrong focus distance will be achieved and
acknowledged as correct focus, but only for far bright objects, for
nearby or low contrast objects, a no focus indication is given.
This is not the case in contineous mode but then again, in this
mode you can never be sure that the picture you are taking is sharp
either since the red focus indicator can light up a fraction before
you press the shutter.

Anyone has different observations than mine ?
 
Yeah, I was not aware that the Minolta used the hyperfocal trick at all when it could not focus. It seems that a better distance would have been about 20-30 feet, that would allow some closer objects to be in focus while still retaining pretty good infinity focus. Bryan
What I find interesting is that the camera sets itself at infinity
if it cannot find focus in non flash mode. I had not observed
that, perhaps because when I first see that it doesn't get it on 2
tries, I instinctively shift the focus point toward more contrast
in the image( a habit made necessary with my 990). May be I
should be more patient before hitting the M button. I will try
that.

I have some strong doubt that it will be successful though, because
IF camera movement essentially starts the procees over at 200mm,
then the only time you will get the camera setting to infinity is
when you have been fortunate enough to hold the focus point really
steady--very hard to do with such a light camera if you are using
spot focus, but somewhat easier if you are in multi seg mode where
the camera will do some searching for you, although the focus box
is quite small and as Bryan has suggested can be moved off the
original area enough to start the process over. Doesn't this
suggest that the AF success rate will be lower in spot or flex
focus when the contrast is lower in the scene at long focal lengths
where camera shake is accentuated?

I have noticed in using my Oly B300 tele on the D7 that focusing is
appreciably better, faster and very assured. I discoverd that when
using it on my 990+2X+B300 combo (c 400mm) the focus lock
dramatically improved, and I long ago attributed that to the vastly
better contrast of the B300 over the Nikon lenses. Now, I suspect
that the same thing is happening with the D7+B300 based on your
information. I should add that I have only used this combo for
40-50 shots and have done no testing to confirm the accuracy of my
perception.

At any rate, pragmatically, aren't we better off setting to
manual/infinity if we know we will be operating at
distances/aperatures that will put us in an infinity focus context.
For one thing, the LCD shows a steady state fully focused image
from the get go, not having to be taken in and out of focus
searching for a lock that may or may not occur. (Annoying to say
the least) In many of my shooting contexts, I have found it to be
much less frustrating and a lot quicker.

Thanks again for the hard work.

dh
Then
after all 4 passes, it seems to indicate focus/no focus, it does
not guess or try to use a hyperfocal setting. I don’t know if it
uses information from all 4 passes in “guessing” or not, but it
usually seems to indicate a clean focus/no focus that is accurate.
I mostly agree with Brian but let me add a few extra points:
(Note that I am not talking about these few occasions where focus
is incorrectly established)
If focus can not be established then 2 things may happen
Without flash, the focus will always be set to infinity
With flash, the focus will be set between 1,8 and 4m or infinity
depending on scene brightness and focal length setting.
(The manual incorrectly states that with the use of flash and no
focus achieved that the distance is set between 3 and 3,8 m, but
maybe they mean this as a DOF range)
These are not random things, the camera consistently takes the same
decisions in the same circumstances

Other observations I made:
For a successful focus The camera makes either "one pass" attempt
consisting 3 in-out-in movements or either a "two pass" attempt
consisting of in-out-in-out-in
in both cases the last movement is very very short.
For an unsuccssful focus it makes a "two pass" in-out-in-out
movements.

The difference is here I think:
If the contrast is good then only one pass is used and the stepping
speed is higher.
If the contrast is poor, then two passes are used and the second
pass is executed slower to obtain better accuracy.
If no sharpness improvement whatsovever could be noticed during the
first pass, then the second pass will be shorter (only between
infinity and 1.5 meter or so) to save time.

Every time where the camera is being is significantly shaking
during focusing, a wrong focus distance will be achieved and
acknowledged as correct focus, but only for far bright objects, for
nearby or low contrast objects, a no focus indication is given.
This is not the case in contineous mode but then again, in this
mode you can never be sure that the picture you are taking is sharp
either since the red focus indicator can light up a fraction before
you press the shutter.

Anyone has different observations than mine ?
 
Hi,
Other observations I made:
For a successful focus The camera makes either "one pass" attempt
consisting 3 in-out-in movements or either a "two pass" attempt
consisting of in-out-in-out-in
I think that the "one pass": three motion attempt is only used above 100mm focal length, and the "two pass" which is an in to out, then back in (or maybe it is out to in, then back out) motion is always used below 100mm no matter what the contrast. I'm still testing, but nice job noticing the two motions. I also think that there is a "slow pass" a thrid kind of thing, that you mention, and that is a slow seek in, that just stops when it gets good. It seems to use this when the contrast is low when the "one pass" attempt fails. I wish that it just used the slow seek all the time at telephoto, it would probably be just as good. I've got to think about this some more...

Bryan
in both cases the last movement is very very short.
For an unsuccssful focus it makes a "two pass" in-out-in-out
movements.

The difference is here I think:
If the contrast is good then only one pass is used and the stepping
speed is higher.
If the contrast is poor, then two passes are used and the second
pass is executed slower to obtain better accuracy.
If no sharpness improvement whatsovever could be noticed during the
first pass, then the second pass will be shorter (only between
infinity and 1.5 meter or so) to save time.

Every time where the camera is being is significantly shaking
during focusing, a wrong focus distance will be achieved and
acknowledged as correct focus, but only for far bright objects, for
nearby or low contrast objects, a no focus indication is given.
This is not the case in contineous mode but then again, in this
mode you can never be sure that the picture you are taking is sharp
either since the red focus indicator can light up a fraction before
you press the shutter.

Anyone has different observations than mine ?
 
Well IF Minolta is telling the truth...And IF the D7 is a good example.....
then your statement

"This means that they have rely on contrast detection instead, which is less accurrate and a lot
slower."

Is way off base.

I tend to agree with you..............I think they are BSing. OR there algorhythm is hosed. (IF so, it "could" be fixed in a later firmware release.

And it better be!!!

I have now gone to Philips Camera (Mostly Nkon...some Minolta 35 AND a couple of D7s) and the AF on the D7s he has is a joke. Just a bad joke.
I took my Two Sonys....CD1000 and D770 and we compared them to his D7s.

The Sony's were clear winners......and the CD1000 was cranked out to 380mm and STILL focused faster and more accuratly than the D7s.
While everybody else uses Contast Detection, and therefore contrast
is very important, I understood that the Minolta D7 used PHASE
detection. Contrast is of little or no importance in Phase
detection, right?
No, contrast detection means that the focus is changed until the
contrast is maximum: this is done by getting the edges as sharp as
possible by maximising the high frequency spectrum of the image.
I have never heard this. As far as I know, it is a simple procedure to move the lens back and forth unitil a Vertical edge within the Focus "zone" has maximum dark on one side and maximum light on another...in other wirds it is a physical movement of the lens..........What "Maximizing of high freq spectrum are you talking about??

If there is good contrast this is easy. If on the other hand there is kittke contrast you will nOT achieve focus.
Phase detection tries to measure the unsharpness by determining the
distance of the same pattern in different parts of the focussed
light cone.
Exactly. So as lomng as there is enough contrast there is a pattern.....and it doesn't have to be a Vertical edge as it does in
But both need contrast in order to work. A phase detection
algorithm can not focus on a sample with no contrast either.
The main difference is that phase detection can measure the amount
of and the direction in which focus must be altered to become sharp.
Contrast detection can not do this and must work iteratively by
trial and error.

Another point however is that I am not sure wheter Minolta is
telling us the whole truth about its AF.
For more technical details read this post:
http://www.dpreview.com/forums/read.asp?forum=1024&message=1322399
 
Interesting, but the bias is too clear. The article seems to be
posted for an underlying reason, not just to share information.
...
So what does that leave you with, for your comparison? An AF system
that does not compare favorably, in all aspects.

To me, the article sounds like one big excuse for a poor AF system.
Gonzo, I can´t hear you! And I won´t hear you.

For the rest of you reading this, I can report after one week of very intense shooting with the D7, (almost 2000 images), what Gonzo says is simply wrong. Bryan Biggers have done a good job and is quite spot on, it is not biased and Bryan DO have experience of other digicams - I know that.

The D7 sometimes hunts autofocus, but so do my EOS system camera, so does my CP990. I feel that the D7 autofocus is in fact quite fast and quite good, but you have to learn how it works, you have to start seeing patterns in the image that you know the AF will lock on, even if that sometimes means you have to move the camera slightly to get that focus point. I also do that, unconsciously with both the CP990 and the EOS. The D7 AF works differently than the CP990, most of the time vastly better! Especially in low light the D7 is in fact very good in finding focus, much better than the CP990.

Anyway, my preferred style with any AF camera I have tried seems to be:

1. Point the camera at something at the same distance as your focus point, if the focus didn´t lock immediately where you first intended.

2. If you are going to take more images, just switch of the AF (to manual focus), on the EOS and the D7 the focus remains where the AF left it. You can fineadjust manually or just leave it alone and keep shooting (fast!).
3. In many cases it is fastest and safest (D7, EOS) to use manual focus.

On the CP990 manual focus is hardly workable, on the D7 the manual focus and AF assist works very well. I like it.
 
Well IF Minolta is telling the truth...And IF the D7 is a good
example.....
then your statement

"This means that they have rely on contrast detection instead,
which is less accurrate and a lot
slower."

Is way off base.
I can assure you that the first generation SLRs used contrast detection and every manufacturer gave up on it in favour of REAL phase detection because of speed and accuracy!
I tend to agree with you..............I think they are BSing. OR
there algorhythm is hosed. (IF so, it "could" be fixed in a later
firmware release.
Yep that is what I said, if they are using phase detection it will be some software variant not the real stuff based on separator lenses, and indeed, what counts are the results, not the technology that is used.
And it better be!!!
I have now gone to Philips Camera (Mostly Nkon...some Minolta 35
AND a couple of D7s) and the AF on the D7s he has is a joke. Just a
bad joke.
I took my Two Sonys....CD1000 and D770 and we compared them to his
D7s.
The Sony's were clear winners......and the CD1000 was cranked out
to 380mm and STILL focused faster and more accuratly than the D7s.
While everybody else uses Contast Detection, and therefore contrast
is very important, I understood that the Minolta D7 used PHASE
detection. Contrast is of little or no importance in Phase
detection, right?
No, contrast detection means that the focus is changed until the
contrast is maximum: this is done by getting the edges as sharp as
possible by maximising the high frequency spectrum of the image.
I have never heard this. As far as I know, it is a simple procedure
to move the lens back and forth unitil a Vertical edge within the
Focus "zone" has maximum dark on one side and maximum light on
another...in other wirds it is a physical movement of the
lens..........What "Maximizing of high freq spectrum are you
talking about??
Well for a human brain, it is easy to see a black/white transition in the whink of an eye, just like we recognize the face of our friends but for a computer algorithm this is a whole lot more difficult.

So what they do is perform a Fourier transform of the image in the AF zone and evaluate the amount of high frequency components, which represent the fine details and sharp edges. Then the lens is moved and this spectral distribution is observed. When the amount of high frequency components is at maximum, then the image is in focus in the AF field.
If there is good contrast this is easy. If on the other hand there
is kittke contrast you will nOT achieve focus.
Phase detection tries to measure the unsharpness by determining the
distance of the same pattern in different parts of the focussed
light cone.
Exactly. So as lomng as there is enough contrast there is a
pattern.....and it doesn't have to be a Vertical edge as it does in
The CCDs used in phase detection AF of 35mm SLRs are one dimensional, which is why the do not work on edges that align exactly with the CCD (which is mostly placed horizontally).

Some solved this problem in some cameras with diagonal CCDs others with cross sensors.
Contrast detection does indeed not suffer this directional sensitivity problem.
But both need contrast in order to work. A phase detection
algorithm can not focus on a sample with no contrast either.
The main difference is that phase detection can measure the amount
of and the direction in which focus must be altered to become sharp.
Contrast detection can not do this and must work iteratively by
trial and error.
Another point however is that I am not sure wheter Minolta is
telling us the whole truth about its AF.
For more technical details read this post:
 

Keyboard shortcuts

Back
Top