Image Component Library (ICL)
|
Grabber class that uses OpenCV's grabbing function to grab camera images. More...
#include <OpenCVCamGrabber.h>
Public Member Functions | |
virtual const core::ImgBase * | acquireImage () |
grab function grabs an image (destination image is adapted on demand) | |
void | processPropertyChange (const utils::Configurable::Property &prop) |
callback for changed configurable properties | |
OpenCVCamGrabber (int dev=0) throw (utils::ICLException) | |
Creates new OpenCV based grabber. | |
~OpenCVCamGrabber () | |
Destructor. | |
Static Public Member Functions | |
static const std::vector < GrabberDeviceDescription > & | getDeviceList (std::string hint, bool rescan) |
simpler version of getDeviceListN detecting a maxinum of 100 devices | |
Private Attributes | |
CvCapture * | cvc |
Wrapped Device struct. | |
int | device |
number of device | |
utils::Mutex | m_mutex |
locks all accesses to property values | |
core::ImgBase * | m_buffer |
Buffer for imagescaling. |
Grabber class that uses OpenCV's grabbing function to grab camera images.
icl::io::OpenCVCamGrabber::OpenCVCamGrabber | ( | int | dev = 0 | ) | throw (utils::ICLException) |
Creates new OpenCV based grabber.
dev | specifies the device index (0 chooses any available device automatically) you can also use opencv's so called 'domain offsets': current values are:
|
Destructor.
virtual const core::ImgBase* icl::io::OpenCVCamGrabber::acquireImage | ( | ) | [virtual] |
grab function grabs an image (destination image is adapted on demand)
grab function calls the Grabber-specific acquireImage-method and applies distortion if necessary
If dst is not NULL, it is exploited and filled with image data
Reimplemented from icl::io::Grabber.
static const std::vector<GrabberDeviceDescription>& icl::io::OpenCVCamGrabber::getDeviceList | ( | std::string | hint, |
bool | rescan | ||
) | [static] |
simpler version of getDeviceListN detecting a maxinum of 100 devices
Internally, for each device index i=0,1,2,..., a grabber-instance is created. If any of these creation trys returns an error, no further devices are tested.
rescan | if this params is a positive or zero integer, it defines the last device ID that is tried internally |
void icl::io::OpenCVCamGrabber::processPropertyChange | ( | const utils::Configurable::Property & | prop | ) |
callback for changed configurable properties
Reimplemented from icl::io::Grabber.
CvCapture* icl::io::OpenCVCamGrabber::cvc [private] |
Wrapped Device struct.
int icl::io::OpenCVCamGrabber::device [private] |
number of device
core::ImgBase* icl::io::OpenCVCamGrabber::m_buffer [private] |
Buffer for imagescaling.
locks all accesses to property values
adding and adapting properties is not thread safe!
Reimplemented from icl::utils::Configurable.