Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Calibration of a stereo system

Help
2008-10-24
2013-05-09
  • Olof Tångrot
    Olof Tångrot
    2008-10-24

    Hi there, I get the impression from the book (Computer Vision Principles and Practice) that the IVT example CalibrationApp should be used to calibrate the stereo system.

    But the implementation of the OpenCVCapture class only opens one camera so it seems impossible for the the code that uses the capture object to actually achive this.

    What should I do to calibrate a stereo system?

     
    • Pedram Azad
      Pedram Azad
      2008-10-24

      Hi,

      it is correct that the IVT example CalibrationApp should be used for calibration of a stereo camera system. It depends on the instantiated video capture module in IVT/examples/src/Organizer.cpp (from IVT/src/VideoCapture), if it supports capturing stereo images or not. Most of the implemented modules support multiple cameras and thus stereo camera systems.

      Unfortunately we have not yet implemented this support for the camera module CVFWCapture (mostly relevant for USB cameras under Windows), which I guess you are using? If you are using COpenCVCapture under Windows, then CVFWCapture should work as well though.

      Most users that work with a stereo system will probably work with Firewire cameras, and there the problem does not occur, since the related camera modules support multiple cameras.

      Anyways, thanks for mentioning this problem. We'll take care of multiple camera support for CVFWCapture in the near future...

      Pedram

       
    • Olof Tångrot
      Olof Tångrot
      2008-10-25

      Thanks for your quick response.

      Yes, I do try to use two USB-cameras running Windows. Though even if I did have firewire cams the header file OpenCVCapture.h hard wires the result of GetNumberOfCameras to 1.

      I guess what you tell me is that I should pick an capture interface implementation that supports two cameras but that alas the one I should choose, CVFWCapture, neither suppports two cameras.

      I am looking forward to test the some new code. Feel free to notify me if in need for a beta tester.

      Olof

       
  • Hi,

    are there any news about this topic?

    I tried to do some experiments with stereo vision (two USB webcams) on Windows Vista. The CaptureApp as well as the CalibrationApp still don't seem to support multiple cameras, which might be a general problem of the underlying VFW driver.

    What do you suggest in order to capture two USB webcams om Windows? Is coding an WDM (Windows Driver Mode) capture interface an option? How to start with it?

    Thanks,
    Lars

     
  • Hi Lars,

    good point, I totally forgot. I'll write it on the TODO list, but I can't promise anything.

    Also not that USB cameras are not synchronized by the bus system.

    If you want to implement a module yourself, you'll simply have to implement a module CVFWStereoCapture and internally instantiate two object of type CVFWCapture - I think that should do the job.

    Pedram

     
  • Hi Pedram,

    thanks for your quick answer.
    Actually, I already tried what you suggested, but had no luck. What kind of nDriverIndex parameter do I have to use with the CVFWCapture instances? I think it should be zero for both, but then I get only a black/no image from the second webcam.
    Did you ever get CVFWCapture to work with multiple USB webcams?

    Thanks,
    Lars

     
  • Pedram Azad
    Pedram Azad
    2010-11-02

    Hi Lars,

    the index is the index of the camera to be opened. Try a 0 for the first camera and 1 for the second camera. If you can't open the second camera, then try all other possible indexes from 2-9.

    I haven't worked with multiple USB cameras and CFWCapture yet. But I think it should work, since CFWCapture doesn't use any static variables - as long the VfW function capDriverConnect allows opening more than one camera at the same time.

    Pedram

     
  • Pedram Azad
    Pedram Azad
    2010-11-02

    Hi Lars,

    oh, I just saw that there are two global variables in VFWCapture.cpp - that will cause problems. Please let me know if opening the cameras works with trying another index than 0 for the second camera. If it does, the problem with the global variables can be fixed.

    Pedram