# calculate distance using disparity map

i am wondering how can i calculate the distance between tow webcams(stereo vision) and an object in front of them using the disparity map?

calculate distance using disparity map

4

looking at this nice page, we get:

```
D:= Distance of point in real world,
b:= base offset, (the distance *between* your cameras)
f:= focal length of camera,
d:= disparity:
D = b*f/d
```

Asked: **
2014-03-17 13:19:15 -0500
**

Seen: **4,795 times**

Last updated: **Mar 18 '14**

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.

Any help please!