Posts Tagged “vision”

Well, I just finished adding support for a Bumblebee2 camera to OpenCV. I wish I could give the code away, but it depends on Triclops, Point Grey’s proprietary library and I don’t really know how to submit a patch to OpenCV anyway. For those of you who are interested in accessing stereo vision capabilities for this type of camera through OpenCV, let me know and I can send you some patches or point you in the right direction.

The main useful source of information turned out to be this wiki on how to setup the Triclops library and the more important libpgrlibdcstereo. The latter is distributed with examples for reading right and left stereo channels using the library and computing disparities, which formed the basis for my OpenCV code. I followed the structure of cvcap*.cpp code and used calls to pgrstereolib to actually perform the capture.

[I noticed that support for Videre stereo cameras was already included. I suppose that must be what they use at Willow Garage. I was able to read from my Bumblebee2 camera without any code changes, but could not figure out how to access the channels separately or compute disparities.]

The tricky part is getting everything into OpenCV. This required adding a small number of carefully placed lines of code to the CMake files and a small number of careful #defines in the highgui source. The project is mature enough, and the patterns consistent enough, that doing so really just meant looking for how other’s did it for other, similar features.

ASIDE: For some weird reason libpgrlibstereo comes with an LGPL license, which might be compatible with OpenCV, but makes calls to Triclops, which doesn’t seem to have any license other than “you bought our very expensive camera so you get this library.” That, as I understand things, sort of nullifies the use of libpgrlibstereo in any setting where we would normally like to use LGPL library code.

Comments 8 Comments »