OpenCV 2.2 Unicap driver supporting the call-back interface.

Support This Project

This code is an adaptation of the old opencv unicap CvCapture code
which only supports the queue buffer interface.
 
Instead, the new code works with the more efficiente callback interface.
 
The new code have been proved with Imaging Source "one4all"
DFM 22BUC03-ML board camera.
 
To compile this code you need:
 
- OpenCV >= 2.2.0
- libunicap >= 0.9.13
- libatomic_ops later than 2008-06-01.
 
Usage example:
 
#include <opencv2/core/core.hpp>
#include <opencv_unicap2.hpp>
 
...
 
   VideoCaptureUnicap2 cap (device);      
This code is an adaptation of the old opencv unicap CvCapture code
which only supports the queue buffer interface.
 
Instead, the new code works with the more efficiente callback interface.
 
The new code have been proved with Imaging Source "one4all"
DFM 22BUC03-ML board camera.
 
To compile this code you need:
 
- OpenCV >= 2.2.0
- libunicap >= 0.9.13
- libatomic_ops later than 2008-06-01.
 
Usage example:
 
#include <opencv2/core/core.hpp>
#include <opencv_unicap2.hpp>
 
...
 
   VideoCaptureUnicap2 cap (device);      
This code is a replacement of the old opencv unicap CvCapture code which only supports the queue buffer interface.
 
Instead, the new code works with the more efficiente callback interface.
 
The new code have been proved with Imaging Source "one4all" DFM 22BUC03-ML board camera.
 

To compile this code you need:
  • OpenCV >= 2.2.0
  • libunicap >= 0.9.13
  • libatomic_ops later than 2008-06-01.

Compiling steps:

  1. tar zxf libopencv_unicap2-x.y.z.tar.gz
  2. cd libopencv_unicap2-x.y.z
  3. mkdir build
  4. cd build
  5. cmake -DCMAKE_INSTALL_PREFIX=<path> -DCMAKE_BUILD_TYPE=Release ..
  6. make
  7. [sudo] make install

Usage:

 
#include <opencv2/core/core.hpp>
#include <opencv_unicap2.hpp>
 
...
 
   VideoCaptureUnicap2 cap (device);      
   //now you can use cap as usual.
   if (!cap.isOpened ())
   {
     std::cerr << "Error: could not open device." << std::endl
     exit (-1);
   }
 
   while (cap.grab ())
   {
      cv::Mat img;
      cap.retrieve (img);
      ....
   }
...