# Stereo Vision Using Compute Module: Pi camera synchronization

Good day,

I am currently working on an obstacle avoiding UAV using stereo vision to obtain depth maps. I noticed that the quadcopter would sometimes not steer to the correct direction.

I am using the Raspberry Pi Compute Module IO board which comes with two CSI ports used with two v1 Pi Cameras.

Issue

I soon found out that due to the latency between the cameras, the left and the right images are not in sync thus the errors in the depth map result.

Steps taken:

I noticed the image blur when moving the cameras around so I adjusted the shutter speed by setting the UV4l/raspicam driver. With the shutter speed, I also tried to increase the framerate as I've read, it improves the latency issue. In my code which uses the opencv library, I used the grab() and retrieve() commands to replace the read() command so that the frames from both cameras is grabbed at the nearest time possible however it didn't help much.

Does anyone know any possible solutions?

If you ask for a low cost camera with external trigger - they cost about 300 USD from Point Grey - these are scientific USB cameras. The lowest cost I found is a See3CAM_10CUG from e-con Systems which starts at about $150. • " they cost about 300 USD from Point Grey" Not really. The PS3 Eye camera has a hardware trigger (some soldering is required) so that it can be synchronized and costs around 10$. instructables.com/id/The-EyeWriter-20/step9/… – FooTheBar Jul 15 '16 at 6:46