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.

Poll Of The Day

My Books

Robotics Programming 101

Robotics Programming 101

Robotics Programming 101 shows how program a real robot, speech, vision, more...

Ubuntu Robotics - A Robotics Programming 101 Extra

Ubuntu Robotics - A Robotics Programming 101 Extra

This extra highlights all of the Ubuntu specific robotics configuration details in Robotics Programming 101.

Only $0.99 on Amazon.Com

Motion Detection - A Robotics Programming 101 Extra

Motion Detection - A Robotics Programming 101 Extra

This extra shows you how to write a motion detector for your robot with a network or web camera.

Only $0.99 on Amazon.Com

The Definitive Guide To Building Java Robots

The Definitive Guide to Building Java Robots

This was my first book on robotics and using the Java Language to interface between sensors, motors and microcontrollers with a PC capable of doing speech and vision.