# A Stereoscopic Images and Distance Between Objects

Tags:
1. Apr 24, 2017

### Simcha

Hello Experts,

I leaned that using a sterescopic cameras (generates 2 photos) one can measure the distance to any object in the image produced by the camera.

For example, if I take a picture of a lamp post using a stereoscopic method, I can determine the Distance from the camera to the lamp post.

My question is as follows:
If I take a picture of two objects: object1 and object2 - BOTH of them in the SAME stereoscopic image(s). I can therefore determine the distance from the camera to object1 and distance from camera to object2.

Is there a way for me to get the distance FROM object1 to object2?

We can look at the problem in the following way: I have an origin - my camera. I have 2 points in space - to which I know the distances. This produces a triangle. In order for me to figure out the entire triangle I need 2 sides and one angle.

How do I get the angle between my object1 and object2 from the perspective of the camera? (my 3 points are camera, xyz of object1, and xyz of object2).

2. Apr 24, 2017

### sophiecentaur

This is difficult without a diagram to work from but, if you know the distances from the camera and if you can tell the angle subtended between the images*, you would have a triangle with two known side lengths and the angle between. That sounds to me like you could use the Cosine Rule.

*To find the angle subtended, you could calibrate your imagining system, for a number of known angles and the separation of points relative to the whole width of the image. You might need to test for barrel or pincushion distortion (pictures of a square grid) if accuracy is very important and calibrate at different points in the whole field.
[Edit: If the focal length of the lens is known and the actual size of the image sensor is known, you could work out the angle directly but That could be difficult where the object distance is short because camera lenses are not a single, flat lens and I don't know how to work out the actual geometry - easier to calibrate with known distances and angles. I think.

3. Apr 24, 2017

### Andy Resnick

My understanding of this type of analysis involves measurement of 'parallax':