# Is there maximum distance for stereoscopic photography?

I'd like to know if there is a distance limit in the use of stereovision with camera. Say I want to make a depth matrix of a fixed objet I'm seeing with my cameras.

For the exemple, I'll set some values :

• Camera separation distance : 2.5m
• Image quality : 2 Mpx (up to 9Mpx)
• Resolution of camera : 656 * 492
• Sensor : Sony ICX424
• Sensor Type : CCD Progressive
• Sensor size : Type 1/3
• Focal Length : 6 mm (I'm not sure of that one)
• Cell Size : 7.4 µm

Then, at which maximal distance would I be able to see ?

And in a more general context, would there be a maximum distance at which stereoscopic vision wouldn't work given some variables such as a baseline, a pixel size and/or other variables ?

• If you want a specific value, you should let us know the focal length of the lenses, and the size of the sensor, or the size of one pixel. – Unapiedra Jul 24 '13 at 19:06
• I've edited the question to give some variables. I've not deleted the more general aspect of the question because of the answers that are already there (and which are good btw) – Xaltar Jul 25 '13 at 7:58
• Plugging in the numbers (and watching the units) I get a value of 2000m. This means that 0px disparity means it is between infinity and 2000m, 1px disparity means it is between 2000 and 1000m. 2px it is between 1000m and 666m. Of course, this is a physical system with other sources of error (also in your algorithm, lens characteristics, etc), so I would expect even less. This should give you a ballpark figure. – Unapiedra Jul 25 '13 at 10:21
• Could you explain me your calculations ? – Xaltar Jul 26 '13 at 6:44
• Sure: 6mm * 2.5m / 7.4µm = 2000m, the next discrete distance is 6mm * 2.5m / (2 * 7.4µm) = 1000m, and so on. – Unapiedra Jul 26 '13 at 9:12

## 2 Answers

There is a distance limit. It depends on the baseline, the focal length and the pixel pitch.

# Disparity Maps

The depth information is calculated by comparing two feature points in the two images. The difference in point position is called disparity. In rectified, parallel stereo cameras you end up with a disparity map. This contains all the information for depth calculation, you only need the baseline and focal length of your two cameras.

# Maths

The further away your point in space is, the smaller the disparity becomes. A point at infinity will have zero disparity.

Test this with a camera. You could do this with the sun but for safety I'd recommend a really far away mountain. Take the camera. Point it at the mountain, take a picture. Move it perfectly parallel to the direction it is pointing. Take another picture. The object should not have moved. The test will probably fail because you can't move the camera that parallel.

However, there is a practical limit to the disparity. We can only calculate the disparity for discrete values (ignoring subpixel accuracy). Therefore the smallest values we can distinguish are between 0 and 1. So the disparity can be at 0px or at 1px. At 0px it would be at infinity and for 1px it would be the furthest away that we can still say something about the distance.

Given your pixel size in mm x, the focal length f and the baseline b we get the furthest distance as:

d = f * b / x


# My Model

Here is how to get to my calculation.

Sketch 1: Assume cameras are parallel by baseline, object is at distance d and use the standard pin-hole camera model.

Sketch2: Transform sketch 1 so that the cameras are atop each other and the object has split into two points. The first point is seen straight ahead, and the second is seen towards the side by a distance of b.

Calculations: Now x can be calculated using triangle ratios. To make a distinction of depth the length x must be 1px, or the equivalent length in mm.

• Wow, very complete. Any chance you could work out an example? Say, two cameras, 1 meter apart both with 10mp sensors? – Jay Carr Jul 24 '13 at 20:29
• Specific camera model? I need to know the resolution in each direction and the size of the sensor, like APS-C etc. Also what lens/focal length? – Unapiedra Jul 24 '13 at 23:14
• I think youre on the right track, but I believe there are more factors than baseline, focal length and pixel pitch. At least one I can think of is the size of the details you need to resolve. Perhaps that translates to the (b) in the second triangle in your diagram, which incidentally is a different (b) than the baseline in your first triangle. – Octopus Jul 24 '13 at 23:55
• You are right, detail makes a different. I assumed that we can resolve detail up to x and assumed it to be one pixel. Because of sub pixel accuracy in feature detection, it might actually be less. Or it might be more than one pixel but it depends on the optical quality. – Unapiedra Jul 25 '13 at 6:06
• Well, if we're being specific to me then it would be two Canon 550Ds, which are 18mpx, APS-c sensors. Both with 50mm 1.8f lenses, probably set to f/5.6 for maximum sharpness. – Jay Carr Jul 25 '13 at 12:27

There are telescopes that can take stereoscopic pictures of celestial bodies several light years away, so there really isn't a distance limit :-). Granted, they do it from opposite ends of the earths orbit (as noted in the comments), so they are quite far apart.

That being said, there is a practical limit, and it's is mostly based on the difference in angle of attack from both cameras viz a vi the object being photographed as well as the quality of the images being used.

I don't think there is an exact formula for what you are trying to do, but I think a good idea would be to find out how the human eye uses parallax to create stereoscopic images in the mind. This article states that 97% of people can see a stereo image when there is at least 2.3 arc minutes of separation (or roughly .03 degrees of separation on angle of attack). If you do a little math I'm sure you can figure out the maximum distance you can be at based on the fact that the cameras are roughly 2.5 meters apart. My guess it that it will be a very long distance... but I'm not all that great at math to be honest.

As far as picture quality, it would depend on how far away the subject is. If it's only 3 ft away and is filling up the majority of the frame I'd say 2mpx would be fine. But if it's a considerably distance, say 100m, I would probably want to be closer to 10mpx, or I'd be worried about losing too much detail.

Also, keep in mind, the sharpness of your images is also affected by your lens choice. If you have the money, you might consider getting a couple of SLRs and maybe a couple cheap 50mm or 85mm prime lenses. That way you would have great pixel density (12mpx +) and really good sharpness as well.

Sorry, not an exacting answer, but hopefully it helps...

• Any source for the telescopes? – Unapiedra Jul 24 '13 at 18:33
• This actually works because they photograph those objects from opposite ends of Earth's orbit, so the stereoscopic separation is on the order of about 300 million kms. – Octopus Jul 24 '13 at 18:53