A wrapper for Point Gray Research (PGR) FlyCapture2 API for capturing images from Firewire, USB3 or GigaE cameras and stereo cameras.
This class is only available when compiling MRPT with "MRPT_HAS_PGR_FLYCAPTURE2".
Definition at line 131 of file CImageGrabber_FlyCapture2.h.
#include <mrpt/hwdrivers/CImageGrabber_FlyCapture2.h>
Public Member Functions | |
CImageGrabber_FlyCapture2 () | |
Constructor that does not open a camera. More... | |
CImageGrabber_FlyCapture2 (const TCaptureOptions_FlyCapture2 &options) | |
Constructor: tries to open the camera with the given options. More... | |
virtual | ~CImageGrabber_FlyCapture2 () |
Destructor. More... | |
const TCaptureOptions_FlyCapture2 & | getCameraOptions () const |
Returns the current settings of the camera. More... | |
void | open (const TCaptureOptions_FlyCapture2 &options, const bool startCapture=true) |
Tries to open the camera with the given options, and starts capture. More... | |
void | startCapture () |
Start the actual image capture of the camera. More... | |
void | stopCapture () |
Stop capture. More... | |
void | close () |
Stop capture and closes the opened camera, if any. More... | |
bool | getObservation (mrpt::obs::CObservationImage &out_observation) |
Grab mono image from the camera. More... | |
bool | getObservation (mrpt::obs::CObservationStereoImages &out_observation) |
Grab stereo image from the camera. More... | |
bool | isStereo () |
Returns if current configuration is stereo or not. More... | |
Static Public Member Functions | |
static void | startSyncCapture (int numCameras, const CImageGrabber_FlyCapture2 **cameras_array) |
Starts a synchronous capture of several cameras, which must have been already opened. More... | |
static std::string | getFC2version () |
Returns the PGR FlyCapture2 library version. More... | |
Protected Attributes | |
void * | m_camera |
Opaque pointer to the FlyCapture2::Camera object. NULL if no camera is grabbing. More... | |
void * | m_camera_info |
Opaque pointer to the FlyCapture2::CameraInfo object. NULL if no camera is grabbing. More... | |
void * | m_img_buffer |
Opaque pointer to the FlyCapture2::Image, used as a temporary buffer and to avoid mem alloc/reallocs. More... | |
void * | m_triclops |
Opaque pointer to the TriclopsContext objetc. NULL if no context is active. More... | |
float | m_baseline |
Camera baseline (only for stereo cameras) More... | |
float | m_focalLength |
Camera focal length. More... | |
float | m_centerCol |
float | m_centerRow |
Camera center coordinates. More... | |
TCaptureOptions_FlyCapture2 | m_options |
Camera options. More... | |
mrpt::hwdrivers::CImageGrabber_FlyCapture2::CImageGrabber_FlyCapture2 | ( | ) |
Constructor that does not open a camera.
mrpt::hwdrivers::CImageGrabber_FlyCapture2::CImageGrabber_FlyCapture2 | ( | const TCaptureOptions_FlyCapture2 & | options | ) |
Constructor: tries to open the camera with the given options.
Raises an exception on error.
|
virtual |
Destructor.
void mrpt::hwdrivers::CImageGrabber_FlyCapture2::close | ( | ) |
Stop capture and closes the opened camera, if any.
Called automatically on object destruction.
|
inline |
Returns the current settings of the camera.
Definition at line 157 of file CImageGrabber_FlyCapture2.h.
|
static |
Returns the PGR FlyCapture2 library version.
bool mrpt::hwdrivers::CImageGrabber_FlyCapture2::getObservation | ( | mrpt::obs::CObservationImage & | out_observation | ) |
Grab mono image from the camera.
This method blocks until the next frame is captured.
bool mrpt::hwdrivers::CImageGrabber_FlyCapture2::getObservation | ( | mrpt::obs::CObservationStereoImages & | out_observation | ) |
Grab stereo image from the camera.
This method blocks until the next frame is captured.
|
inline |
Returns if current configuration is stereo or not.
Definition at line 194 of file CImageGrabber_FlyCapture2.h.
References mrpt::hwdrivers::TCaptureOptions_FlyCapture2::stereo_mode.
void mrpt::hwdrivers::CImageGrabber_FlyCapture2::open | ( | const TCaptureOptions_FlyCapture2 & | options, |
const bool | startCapture = true |
||
) |
Tries to open the camera with the given options, and starts capture.
Raises an exception on error.
[in] | startCapture | If set to false, the camera is only opened and configured, but a posterior call to startCapture() is required to start grabbing images. |
void mrpt::hwdrivers::CImageGrabber_FlyCapture2::startCapture | ( | ) |
Start the actual image capture of the camera.
Must be called after open(), only when "startCapture" was set to false.
|
static |
Starts a synchronous capture of several cameras, which must have been already opened.
NOTE: This method only works with Firewire cameras, not with USB3 or GigaE ones (as confirmed by PGR support service).
void mrpt::hwdrivers::CImageGrabber_FlyCapture2::stopCapture | ( | ) |
Stop capture.
|
protected |
Camera baseline (only for stereo cameras)
Definition at line 140 of file CImageGrabber_FlyCapture2.h.
|
protected |
Opaque pointer to the FlyCapture2::Camera object. NULL if no camera is grabbing.
Definition at line 134 of file CImageGrabber_FlyCapture2.h.
|
protected |
Opaque pointer to the FlyCapture2::CameraInfo object. NULL if no camera is grabbing.
Definition at line 135 of file CImageGrabber_FlyCapture2.h.
|
protected |
Definition at line 142 of file CImageGrabber_FlyCapture2.h.
|
protected |
Camera center coordinates.
Definition at line 142 of file CImageGrabber_FlyCapture2.h.
|
protected |
Camera focal length.
Definition at line 141 of file CImageGrabber_FlyCapture2.h.
|
protected |
Opaque pointer to the FlyCapture2::Image, used as a temporary buffer and to avoid mem alloc/reallocs.
Definition at line 136 of file CImageGrabber_FlyCapture2.h.
|
protected |
Camera options.
Definition at line 144 of file CImageGrabber_FlyCapture2.h.
|
protected |
Opaque pointer to the TriclopsContext objetc. NULL if no context is active.
Definition at line 137 of file CImageGrabber_FlyCapture2.h.
Page generated by Doxygen 1.8.11 for MRPT 1.4.0 SVN: at Mon Aug 15 11:50:21 UTC 2016 |