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
#1
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?
 

sulhan

Moderator
Staff member
May 11, 2002
4,028
0
36
45
Melbourne, Australia
www.md-sulhan.com
#3
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
 

vader

New Member
Aug 25, 2003
604
0
0
DEATH*
Visit site
#4
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....
 

loupgarou

New Member
Sep 9, 2003
1,766
0
0
#5
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.
 

Zerstorer

Senior Member
Jul 8, 2002
3,437
0
0
#6
Lens to film plane is known, focal length is known, the subject distance can be computed from there.
 

justarius

Senior Member
Nov 9, 2003
1,226
0
36
Northeast
Visit site
#7
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.
 

YSLee

Senior Member
Jan 17, 2002
2,326
1
38
Visit site
#8
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.
 

contaxes

New Member
Feb 6, 2004
56
0
0
#9
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.
 

ST1100

Senior Member
Jun 18, 2003
1,785
0
0
Singapore, Bedok
#10
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.
 

gtsoh

New Member
Jan 28, 2004
74
0
0
#11
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
 

loupgarou

New Member
Sep 9, 2003
1,766
0
0
#12
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.
 

loupgarou

New Member
Sep 9, 2003
1,766
0
0
#13
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?
 

zod

New Member
Mar 30, 2003
1,279
0
0
#14
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....
 

zod

New Member
Mar 30, 2003
1,279
0
0
#15
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.
 

StreetShooter

Senior Member
Jan 17, 2002
4,634
0
0
Katong
streetshooter.clubsnap.org
#16
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
 

Brandon

New Member
Mar 12, 2004
419
0
0
CCK
#17
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:
 

TME

Senior Member
Jan 19, 2002
6,580
0
0
41
Clementi
#18
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:
 

hwchoy

Senior Member
Jul 16, 2003
1,899
0
0
55
Tampines, Singapore.
www.hexazona.com
#19
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.
 

justarius

Senior Member
Nov 9, 2003
1,226
0
36
Northeast
Visit site
#20
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.
Top Bottom