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.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • Technorati
  • Furl
  • StumbleUpon
  • Tumblr
  • TwitThis
8 Responses to “OpenCV and Bumblebee2 Stereo”
  1. manfred says:

    Hello.. I read your post “OpenCV and Bumblebee2 Stereo” with interest, and find that we are attempting the same here – initially we want to do some benchmarking of what works in computing disparities. Our platform is OpenCV, and would be most greatful to get hold of your patches or any pointers you may provide to get us working with triclops & openCV.

    /M

  2. JS says:

    I’ll see what I can do to publish a patch.

  3. Fernando says:

    Hi, i was reading your post and i was wondering if you may give me a little help, so i need to use my bb2 camera with opencv.
    till now i just have the camera working with the pgr lib, but i need to use it directly from opencv.

    thanks before hand.

  4. JS says:

    I’ve put up a page on this blog with some example code I wrote for the integration. It isn’t much but hopefully it will help you get started. Check the sidebar.

  5. vijay says:

    Hi

    Iam trying to grab a image using Opencv from Point Grey (Chameleon CMLN-13S2M-CS).But iam not able tooooooooooo.I would be of great help if u tell me how to go about it..

    Thanks and regards

  6. zackgong says:

    hi, JS. I am using bumblebee2 with opencv. Now I have a question. While my camera is housed in a water-proof box, so I recalibrated it. The question is, how I used the rectified stereo pairs to get the depth map, with the function: triclopsGetImage16()? Thank you. Further more, I have been using bb2 and opencv for a certain time, and I am glad to communicate with guys online. My email gpl@sia.cn.

  7. JS says:

    If you are using Triclops then you need to call triclopsStereo and the use triclopsGetImage16 with the appropriate flags to get the disparity map. The example code from Point Grey that comes with the camera should have numerous examples. OpenCV also has some disparity functionality.

  8. leela says:

    Hi JS,

    I am commissioning a stereo vision system and am using opencv but am not using bb2. I am using cameras from SRI and bought them from videre design. There are three of us working on the project that needs the cameras and not one of us can figure out how to even get it started. Do you know anything about Videre cameras? Specifically the STH-DCSG series?

  9.  
Leave a Reply