0

I use Raspberry Pi with python2.

I'm trying to calculate the disparity of two images captured by the left and right cameras.

But I don't know what code should I use.

All I want to do is make python using the target center of two images(disparity) in order to calculate distance between two cameras and target.

Left camera:

left camera

Right camera:

right camera

I want to calculate two centers (twp green cicle) and make their disparity into distance.

johnnyRose
  • 7,310
  • 17
  • 40
  • 61
  • I don't know much about disparity mapping, but the first stop for image processing in Python is [Pillow](https://pillow.readthedocs.org/en/3.1.x/). – Seth Mar 11 '16 at 03:39
  • Thanks! I have tried disparity map. But that is not what I want. But what code could I use for calculate the distance between target and two cameras? – 李國維 Mar 11 '16 at 08:25
  • The disparity map is the first step - if you have that you can find the depth, and if you know the camera matrix you can find distance. Or if you know the size of the target that could also work. Possibly helpful: http://stackoverflow.com/questions/23581238/distance-measurement-using-disparity-map, http://stackoverflow.com/questions/14038002/opencv-how-to-calculate-distance-between-camera-and-object-using-image – user812786 Mar 17 '16 at 20:10

0 Answers0