How do camera's know the distance to subject?


Status
Not open for further replies.

loupgarou

New Member
Sep 9, 2003
1,766
0
0
there seems to be a lot of hype, does anyone know how its done?

afaik, there's no laser distance measuring or triangulation going on. how do they know?
 

the lens will "tell" the camera the distance focused..that is usually the subject distance..
 

Hieee.....

FYI......its basically a position encoder.....which is plated onto the lens barrel. SO for specific discrete position there is a encoded signal/combination obtained from this position encoder and this translate to a distance...."data" which may be send from the lens IC chip to the body.

rgds,
me
 

sulhan said:
Hieee.....

FYI......its basically a position encoder.....which is plated onto the lens barrel. SO for specific discrete position there is a encoded signal/combination obtained from this position encoder and this translate to a distance...."data" which may be send from the lens IC chip to the body.

rgds,
me

yes.... :D

actually...the camera relies on the CCD sensors located on the camera to focus. Light goes through the lens and is reflected by the sub-mirror to the CCD sensors located below the mirrorbox.once infomation is caculated by the processor the AF drive motor will work the coupler to rotate the focusing lens group.....circuit-board on the lens serve to tell the camera what focal length is used....
 

doesn't tell me much at all

mathematically how does one derive the distance ? ie: what physics is it using?
considering any scene, to a 2 dimensional sensor, there is no depth information, eg: humans without binocular vision (ie: lazy eye or blind in one eye) have no depth perception. since the lens has only one focal point, is there another hardware that helps triangulates the position ?

or is it complete software based where they GUESS the nearest subject based on contrast and resolution.
 

Lens to film plane is known, focal length is known, the subject distance can be computed from there.
 

erm, I maybe wrong but here it goes..

Take a look at your lens. There should be a distance scale on it somewhere, going from the closing min focussing distance of your lens to infinity. There might also be other markings showing depth of field at different apertures or Infra-ed focussing mark, but ignore them for now. Now turn the focusing ring. You will then see the distance changing as you turn the ring: this tells you the distance the lens is focussed at, ie. subject distance.

To relay this distance to the camera, there can be mechanical or electronic linkage which tells the camera the distance the lens is focussing at, as outlined by previous posters.
 

Zerstorer's got it. There are two common formulas, the first is Gaussian, which I think we covered in secondary school, and it goes like this:

1/focal length = 1/distance to object from lens + 1/distance to image from lens

Newtonian formula is as follows:

(distance to object from lens - focal length) * (distance to object from image - focal length) = focal length ^ 2

These formulas are used by the processors in the lens and camera to derive the distance.
 

Yes, distance can be computed with the formula. But do SLR actually compute the distance ? What is it for ?
I don't own DSLR so not sure about that.
 

i'm sorry, i think he *didn't* get it.

Sure, the formula uses 3 variables, 1) focal length, 2) film distance and 3) subject distance. But 2 and 3 are unknown to the camera until focus is established.

YSLee's formula is correct, but how does the camera know the lens-to-film distance WITHOUT focusing in the first place? In other words, the camera needs to establish the subject-to-lens distance (ie focus).

Put another way, we're answering the wrong question. loupgarou's question is how the camera/lens achieves focus in the first place, since the camera's vision is monocular and unable to tri-angulate.

YSLee said:
Zerstorer's got it. There are two common formulas, the first is Gaussian, which I think we covered in secondary school, and it goes like this:

i believe the technology used in SLR AF systems is called 'phase detection' or 'phase difference detection'. Dig it up on the net if you're interested.
 

I don't know guys but for whatever its worth, in the old days, I am taught that ( and of course it is true) the position of objects etc can make use of the Doppler effect ie wavelengths of light or any electromagnetic waves change when a it approaches/or rebounds off a stationery object, to calculate distance. We can then (in modern terms via a processor) calculated the change in wavelength to get a correspondent distance. That could be why it is so difficult to get a distance calculation when you are shooting animals in cages or close-ups as beam is confused. I remember my Sec4 Physics books ( and I am 50 yrs old!) always use the change in pitch of an approaching/departing train or car honk to illustrate this. But I am sure there are new fangled things available today but use variations of the same principle.

BTW, since I am on the line, can anyone tell me how to get some pix or attachments posted in CS? Thanks

Cheers
 

isn't the doppler effect about moving objects? ie: a radar gun uses the doppler effect to calculating the speed of a moving object. ie: you literally need to shoot a beam and time it when it comes back to you.

if I'm not wrong, photographic lenses are passive, with the exception of the AF assist beams/pre flashes, they don't emit anything.
 

oh another thing, eg; nikon's 3d matrix metering, canon's evaluative metering etc etc, all have the means to locate the nearest object (or at least tries) at each af point.

if you're using a wide angle lens where nearly everything is in focus, how does it tell which af point to trigger?
 

ST1100 said:
Put another way, we're answering the wrong question. loupgarou's question is how the camera/lens achieves focus in the first place, since the camera's vision is monocular and unable to tri-angulate.

this is your answer

VADER said:
actually...the camera relies on the CCD sensors located on the camera to focus. Light goes through the lens and is reflected by the sub-mirror to the CCD sensors located below the mirrorbox.once infomation is caculated by the processor the AF drive motor will work the coupler to rotate the focusing lens group.....circuit-board on the lens serve to tell the camera what focal length is used....
 

after focus is achieved, this is the 2nd part of the answer

YSLee said:
Zerstorer's got it. There are two common formulas, the first is Gaussian, which I think we covered in secondary school, and it goes like this:

1/focal length = 1/distance to object from lens + 1/distance to image from lens

Newtonian formula is as follows:

(distance to object from lens - focal length) * (distance to object from image - focal length) = focal length ^ 2

These formulas are used by the processors in the lens and camera to derive the distance.
 

Well, actually, nobody knows how it all works. According to some people, it's alien technology which we exchanged for some human bodies (all volunteers, apparently). There's even a movie about it.

Anyway, some of us tried to reverse engineer the autofocus technology:

http://electronics.howstuffworks.com/autofocus.htm
 

StreetShooter said:
Well, actually, nobody knows how it all works. According to some people, it's alien technology which we exchanged for some human bodies (all volunteers, apparently). There's even a movie about it.

Anyway, some of us tried to reverse engineer the autofocus technology:

http://electronics.howstuffworks.com/autofocus.htm

:thumbsup: Very helpful
how stuff works is my fave website now :lovegrin:
 

I'm trying to follow this so am I right to say then that if the focus is right, then the rest of the stuff falls in place?

Cos it would seem from justarius that the different points of focus (however the camera may define it in its internal processor) is related to different subject distances. So when the SLR (using phase change detection) to determine that the subject is in focus, it automatically assigns a distance that has been pre-programmed into the camera. Is that how it is done? Justarius did I quote u correctly? If I didn't sorry.... :)

How do film distance to lens (would that be the front or rear of lens?) and focal length play a part in determining the subject distance? :dunno:
 

loupgarou said:
isn't the doppler effect about moving objects? ie: a radar gun uses the doppler effect to calculating the speed of a moving object. ie: you literally need to shoot a beam and time it when it comes back to you.

if I'm not wrong, photographic lenses are passive, with the exception of the AF assist beams/pre flashes, they don't emit anything.


Chris, you are right. Doppler effect works only if there is relative motion between the observer and the "observee" :think: This is why the search and rescue satellites are moving (in low Earth orbit) so that they are able to estimate the location of a rescue beacon by Doppler effect. Geostationary satellites cannot do this.
 

TME said:
I'm trying to follow this so am I right to say then that if the focus is right, then the rest of the stuff falls in place?

Cos it would seem from justarius that the different points of focus (however the camera may define it in its internal processor) is related to different subject distances. So when the SLR (using phase change detection) to determine that the subject is in focus, it automatically assigns a distance that has been pre-programmed into the camera. Is that how it is done? Justarius did I quote u correctly? If I didn't sorry.... :)

How do film distance to lens (would that be the front or rear of lens?) and focal length play a part in determining the subject distance? :dunno:

Erm, I'm not too sure whether my explanation is correct or not, so don't worry about it :embrass: It's more of a guess based on practical observations rather than technical knowledge...

If you have a close-focussing or macro lens, it's easier to see that the point of focus of the lens is related to the distance to the object. Try focussing at a spot. Now move in and out: the image goes from blurred to sharp to blur again. The point of sharpest focus is your lens to subject distance and also the focussing distance stated on your lens. A chip in the lens (or something) then relays this focussing distance to the camera. When autofocussing, the autofocus system determines when the image is sharp.


OK.. now waiting for someone to tell me that my guess above is total bulls**t
 

Status
Not open for further replies.