9 #ifndef CImageGrabber_FlyCapture2_H
10 #define CImageGrabber_FlyCapture2_H
A wrapper for Point Gray Research (PGR) FlyCapture2 API for capturing images from Firewire,...
void startCapture()
Start the actual image capture of the camera.
void close()
Stop capture and closes the opened camera, if any.
void * m_triclops
Opaque pointer to the TriclopsContext objetc.
virtual ~CImageGrabber_FlyCapture2()
Destructor.
static std::string getFC2version()
Returns the PGR FlyCapture2 library version.
float m_baseline
Camera baseline (only for stereo cameras)
CImageGrabber_FlyCapture2(const CImageGrabber_FlyCapture2 &)=delete
float m_centerCol
Camera center coordinates.
CImageGrabber_FlyCapture2()
Constructor that does not open a camera.
void * m_img_buffer
Opaque pointer to the FlyCapture2::Image, used as a temporary buffer and to avoid mem alloc/reallocs.
void * m_camera_info
Opaque pointer to the FlyCapture2::CameraInfo object.
void * m_camera
Opaque pointer to the FlyCapture2::Camera object.
void open(const TCaptureOptions_FlyCapture2 &options, const bool startCapture=true)
Tries to open the camera with the given options, and starts capture.
const TCaptureOptions_FlyCapture2 & getCameraOptions() const
Returns the current settings of the camera.
TCaptureOptions_FlyCapture2 m_options
Camera options.
bool isStereo()
Returns if current configuration is stereo or not.
CImageGrabber_FlyCapture2 & operator=(const CImageGrabber_FlyCapture2 &)=delete
float m_focalLength
Camera focal length.
bool getObservation(mrpt::obs::CObservationImage &out_observation)
Grab mono image from the camera.
void stopCapture()
Stop capture.
static void startSyncCapture(int numCameras, const CImageGrabber_FlyCapture2 **cameras_array)
Starts a synchronous capture of several cameras, which must have been already opened.
Declares a class derived from "CObservation" that encapsules an image from a camera,...
Observation class for either a pair of left+right or left+disparity images from a stereo camera.
This class allows loading and storing values and vectors of different types from a configuration text...
GLsizei const GLfloat * value
GLsizei const GLchar ** string
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Options used when creating a camera capture object of type CImageGrabber_FlyCapture2.
std::string framerate
(Default="", which means default) A string with a framerate, from the list available in FlyCapture2::...
bool trigger_enabled
(default=false) Enable non-free-running mode, only capturing when a given input trigger signal is det...
bool gain_auto
(default=true)
std::string videomode
(Default="", which means default) A string with a video mode, from the list available in FlyCapture2:...
unsigned int camera_guid[4]
GUID of the camera to open, only when open_by_guid==true.
float shutter_time_ms
(default=4.0) Shutter time, if shutter_auto=false
float autoexposure_EV
(default=0.0) Exposure Value, if autoexposure_auto=false
bool shutter_abs
(default=true) Numeric mode (absolute or integer values)
unsigned int trigger_mode
(default=0) Refer to PGR docs.
bool gain_abs
(default=true) Numeric mode (absolute or integer values)
bool autoexposure_abs
(default=true) Numeric mode (absolute or integer values)
bool open_by_guid
(Default=false) Set to true to force opening a camera by its GUID, in camera_guid
TCaptureOptions_FlyCapture2()
int grabTimeout
(Default=5000) Time in milliseconds that RetrieveBuffer() and WaitForBufferEvent() will wait for an i...
void loadOptionsFrom(const mrpt::utils::CConfigFileBase &configSource, const std::string §ionName, const std::string &prefix=std::string())
Loads all the options from a config file.
bool stereo_mode
(default=false) Obtain images as stereo pairs with Flycapture2
bool shutter_auto
(default=true)
bool autoexposure_auto
(default=true)
unsigned int camera_index
(Default=0) If open_by_guid==false, will open the i'th camera based on this 0-based index.
float strobe_delay
(default=0.0) Delay in ms.
unsigned int strobe_polarity
(default=0) Refer to PGR docs.
unsigned int trigger_source
(default=0) Refer to PGR docs.
bool strobe_enabled
(default=false) Enable the generation of a strobe signal in GPIO.
unsigned int rect_height
(default=480) Height for output rectified images
bool autoexposure_onOff
(default=true) Activate this feature
unsigned int strobe_source
(default=0) Refer to PGR docs.
bool get_rectified
(default=false) Rectify stereo images (needs Triclops installed)
float gain_dB
(default=0.0) Sensor gain, if gain_auto=false
float strobe_duration
(default=1.0) Pulse durationin ms.
std::string grabmode
(Default="BUFFER_FRAMES") A string with a grab mode, from the list available in FlyCapture2::GrabMode
unsigned int trigger_polarity
(default=0) Refer to PGR docs.
unsigned int rect_width
(default=640) Width for output rectified images
unsigned int numBuffers
(Default=30) Number of images that can be stored in the buffer, if enabled with grabMode.