A class for grabing images from a "OpenCV"-compatible camera, or from an AVI video file.
See the constructor for the options when opening the camera.
Unless input from AVI files is required, it is recommended to use the more generic class mrpt::hwdrivers::CCameraSensor.
Definition at line 66 of file CImageGrabber_OpenCV.h.
#include <mrpt/hwdrivers/CImageGrabber_OpenCV.h>
Public Member Functions | |
CImageGrabber_OpenCV (int cameraIndex=-1, TCameraType cameraType=CAMERA_CV_AUTODETECT, const TCaptureCVOptions &options=TCaptureCVOptions()) | |
Constructor for cameras: More... | |
CImageGrabber_OpenCV (const std::string &AVI_fileName) | |
Constructor for AVI files: More... | |
virtual | ~CImageGrabber_OpenCV () |
Destructor. More... | |
bool | isOpen () const |
Check whether the camera has been open successfully. More... | |
bool | getObservation (mrpt::obs::CObservationImage &out_observation) |
Grab an image from the opened camera. More... | |
Protected Attributes | |
bool | m_bInitialized |
Set to false if we could not initialize the camera. More... | |
mrpt::utils::void_ptr_noncopy | m_capture |
Internal use: More... | |
mrpt::hwdrivers::CImageGrabber_OpenCV::CImageGrabber_OpenCV | ( | int | cameraIndex = -1 , |
TCameraType | cameraType = CAMERA_CV_AUTODETECT , |
||
const TCaptureCVOptions & | options = TCaptureCVOptions() |
||
) |
Constructor for cameras:
cameraIndex | Set the camera index, or -1 if it does not matter and you select AUTODETECT as cameraType. |
cameraType | Can be any value of TCameraType, or CAMERA_CV_AUTODETECT if there is only one camera. |
options | Capture options, defined in mrpt::hwdrivers::TCaptureCVOptions. If not provided, all the default options will be used. |
mrpt::hwdrivers::CImageGrabber_OpenCV::CImageGrabber_OpenCV | ( | const std::string & | AVI_fileName | ) |
Constructor for AVI files:
|
virtual |
Destructor.
bool mrpt::hwdrivers::CImageGrabber_OpenCV::getObservation | ( | mrpt::obs::CObservationImage & | out_observation | ) |
Grab an image from the opened camera.
out_observation | The object to be filled with sensed data. |
|
inline |
Check whether the camera has been open successfully.
Definition at line 98 of file CImageGrabber_OpenCV.h.
|
protected |
Set to false if we could not initialize the camera.
Definition at line 71 of file CImageGrabber_OpenCV.h.
|
protected |
Internal use:
Definition at line 75 of file CImageGrabber_OpenCV.h.
Page generated by Doxygen 1.8.12 for MRPT 1.3.2 SVN: at Thu Nov 10 13:22:34 UTC 2016 |