Stereo Vision with Ubuntu

by Scott Preston - 2010-03-05 00:00:00

So how do you create stereo vision web cameras and access them with Java?

The core of the matter begins with the following command:

> lsusb

I got the following results

Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 003: ID 046d:08ad Logitech, Inc.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 003: ID 046d:08ad Logitech, Inc.
Bus 001 Device 001: ID 0000:0000

It's important for these cameras to be on separate busses, in my case Bus 001 and 002, when they were on the same Bus, I ran into bandwidth problems.

The second thing I did was create a separate shared library that accesses each camera. One on /dev/video0 and one on /dev/video1.

If the libraries are "shared" libraries and not "instance" libraries, you will get garbage or the stream of camera 0 on 1 or visa-versa.

If you would like more information and/or source code, contact me.