# Distance measurements with two cameras

1. Sep 21, 2015

### tiphaine

Hello,
I would like to know if there are simple ways (using trigonometric functions) to calculate distances between an object and two cameras.
I am using two CMUcam5 (pixy), closely placed (the distance between the two cameras is known). And I would like to calculate the distance between the object and each camera.
Thank you for your help !

#### Attached Files:

• ###### photo.JPG
File size:
47.1 KB
Views:
116
2. Sep 21, 2015

### RUber

I am not fully understanding your image. It lists f as a known variable, but that is not depicted on the graphic.
Also, are Ln and L2 the locations of your cameras?
Other than x' do you have any other information available about that smaller triangle you drew?
Do you have any information about the angles phi and theta?

The simplest solution I can see is if you know z', you can apply the fact that z'/z = x'/d, since they are similar triangles.
Otherwise, if you knew one of the angles, you could use tan(theta) = d/z, or tan(phi) = z/d to solve for z.

3. Sep 21, 2015

### tiphaine

f is the focal distance of the two lenses, and L1 and L2 are the locations of the two cameras. We unfortunatly don't have any further information on the little triangle nor on the angles.
Thank you for the tips!

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook