MRPT  2.0.4
List of all members | Public Member Functions
mrpt::hwdrivers::TCaptureOptions_FlyCapture2 Struct Reference

Detailed Description

Options used when creating a camera capture object of type CImageGrabber_FlyCapture2.

Definition at line 18 of file CImageGrabber_FlyCapture2.h.

#include <mrpt/hwdrivers/CImageGrabber_FlyCapture2.h>

Public Member Functions

 TCaptureOptions_FlyCapture2 ()
 
void loadOptionsFrom (const mrpt::config::CConfigFileBase &configSource, const std::string &sectionName, const std::string &prefix=std::string())
 Loads all the options from a config file. More...
 

Public Attributes

Camera to open
unsigned int camera_index {0}
 (Default=0) If open_by_guid==false, will open the i'th camera based on this 0-based index. More...
 
bool open_by_guid {false}
 (Default=false) Set to true to force opening a camera by its GUID, in camera_guid More...
 
unsigned int camera_guid [4]
 GUID of the camera to open, only when open_by_guid==true. More...
 
Camera settings
std::string videomode
 (Default="", which means default) A string with a video mode, from the list available in FlyCapture2::VideoMode, eg. More...
 
std::string framerate
 (Default="", which means default) A string with a framerate, from the list available in FlyCapture2::FrameRate, eg. More...
 
std::string grabmode
 (Default="BUFFER_FRAMES") A string with a grab mode, from the list available in FlyCapture2::GrabMode More...
 
unsigned int numBuffers {30}
 (Default=30) Number of images that can be stored in the buffer, if enabled with grabMode. More...
 
int grabTimeout {-1}
 (Default=5000) Time in milliseconds that RetrieveBuffer() and WaitForBufferEvent() will wait for an image before timing out and returning. More...
 
bool trigger_enabled {false}
 (default=false) Enable non-free-running mode, only capturing when a given input trigger signal is detected. More...
 
unsigned int trigger_polarity {0}
 (default=0) Refer to PGR docs. More...
 
unsigned int trigger_source {0}
 (default=0) Refer to PGR docs. More...
 
unsigned int trigger_mode {0}
 (default=0) Refer to PGR docs. More...
 
bool strobe_enabled {false}
 (default=false) Enable the generation of a strobe signal in GPIO. More...
 
unsigned int strobe_source {0}
 (default=0) Refer to PGR docs. More...
 
unsigned int strobe_polarity {0}
 (default=0) Refer to PGR docs. More...
 
float strobe_delay {0.0f}
 (default=0.0) Delay in ms. More...
 
float strobe_duration {1.0f}
 (default=1.0) Pulse durationin ms. More...
 
bool autoexposure_auto {true}
 (default=true) More...
 
bool autoexposure_onOff {true}
 (default=true) Activate this feature More...
 
bool autoexposure_abs {true}
 (default=true) Numeric mode (absolute or integer values) More...
 
float autoexposure_EV {0.0f}
 (default=0.0) Exposure Value, if autoexposure_auto=false More...
 
bool shutter_auto {true}
 (default=true) More...
 
bool shutter_abs {true}
 (default=true) Numeric mode (absolute or integer values) More...
 
float shutter_time_ms {4.0f}
 (default=4.0) Shutter time, if shutter_auto=false More...
 
bool gain_auto {true}
 (default=true) More...
 
bool gain_abs {true}
 (default=true) Numeric mode (absolute or integer values) More...
 
float gain_dB {0.0f}
 (default=0.0) Sensor gain, if gain_auto=false More...
 
bool stereo_mode {false}
 (default=false) Obtain images as stereo pairs with Flycapture2 More...
 
unsigned int rect_width {800}
 (default=800) Width for output rectified images More...
 
unsigned int rect_height {600}
 (default=600) Height for output rectified images More...
 

Constructor & Destructor Documentation

◆ TCaptureOptions_FlyCapture2()

TCaptureOptions_FlyCapture2::TCaptureOptions_FlyCapture2 ( )

Definition at line 144 of file CImageGrabber_FlyCapture2.cpp.

References camera_guid.

Member Function Documentation

◆ loadOptionsFrom()

void TCaptureOptions_FlyCapture2::loadOptionsFrom ( const mrpt::config::CConfigFileBase configSource,
const std::string &  sectionName,
const std::string &  prefix = std::string() 
)

Loads all the options from a config file.

Expected format:

[sectionName]
# Camera selection:
camera_index = 0 // (Default=0) If open_by_guid==false, will open the i'th camera based on this 0-based index.
open_by_guid = false // (Default=false) Set to true to force opening a camera by its GUID, in \a camera_guid
camera_guid = 11223344-55667788-99AABBCC-DDEEFF00 // GUID of the camera to open, only when open_by_guid==true. Hexadecimal blocks separated by dashes ("-")
# Camera settings:
videomode = VIDEOMODE_640x480Y8 // (Default="", which means default) A string with a video mode, from the list available in [FlyCapture2::VideoMode](http://www.ptgrey.com/support/downloads/documents/flycapture/Doxygen/html/), eg. "VIDEOMODE_640x480Y8", etc.
framerate = FRAMERATE_30 // (Default="", which means default) A string with a framerate, from the list available in [FlyCapture2::FrameRate](http://www.ptgrey.com/support/downloads/documents/flycapture/Doxygen/html/), eg. "FRAMERATE_30", etc.
grabmode = BUFFER_FRAMES // (Default="BUFFER_FRAMES") A string with a grab mode, from the list available in
[FlyCapture2::GrabMode](http://www.ptgrey.com/support/downloads/documents/flycapture/Doxygen/html/)
numBuffers = 30 // (Default=30) Number of images that
can be stored in the buffer, if enabled with grabMode.
grabTimeout = 5000 // (Default=5000) Time in milliseconds that RetrieveBuffer() and WaitForBufferEvent() will wait for an image before timing out and returning.
trigger_enabled = false // (default=false) Enable non-free-running mode, only capturing when a given input trigger signal is detected. Refer to PGR docs.
#trigger_polarity = 0 // (default=0) Refer to PGR docs.
#trigger_source = 0 // (default=0) Refer to PGR docs.
#trigger_mode = 0 // (default=0) Refer to PGR docs.
strobe_enabled = false // (default=false) Enable the generation of a strobe signal in GPIO. Refer to PGR docs.
#strobe_source = 1 // (default=0) Refer to PGR docs.
#strobe_polarity = 0 // (default=0) Refer to PGR docs.
#strobe_delay = 0.0 // (default=0.0) Delay in ms. Refer to PGR docs.
#strobe_duration = 1.0 // (default=1.0) Pulse durationin ms. Refer to PGR docs.
#autoexposure_auto; //!< (default=true)
#autoexposure_abs; //!< (default=true) Numeric mode (absolute or integer values)
#autoexposure_onoff;//!< (default=true) Activate this feature
#autoexposure_EV; //!< (default=0.0) Exposure Value, if autoexposure_auto=false
#shutter_auto = false // (default=true)
#shutter_abs; //!< (default=true) Numeric mode (absolute or integer values)
#shutter_time_ms = 4.0 // (default=4.0) Shutter time, if shutter_auto=false
#gain_auto; //!< (default=true)
#gain_abs; //!< (default=true) Numeric mode (absolute or integer values)
#gain_dB; //!< (default=0.0) Sensor gain, if gain_auto=false
flycap_stereo_mode = 1 // (default=0) Obtain images as stereo pairs with Flycapture2
flycap_rect_width = 320 // (default=640) Width for output rectified images
flycap_rect_height = 240 // (default=480) Height for output rectified images
Note
All parameter names may have an optional prefix, set with the "prefix" parameter. For example, if prefix="LEFT_", the expected variable name "camera_index" in the config section will be "LEFT_camera_index", and so on.

Definition at line 153 of file CImageGrabber_FlyCapture2.cpp.

References ASSERTMSG_, autoexposure_abs, autoexposure_auto, autoexposure_EV, autoexposure_onOff, camera_guid, camera_index, framerate, gain_abs, gain_auto, gain_dB, grabmode, grabTimeout, numBuffers, open_by_guid, mrpt::config::CConfigFileBase::read_bool(), mrpt::config::CConfigFileBase::read_float(), mrpt::config::CConfigFileBase::read_int(), mrpt::config::CConfigFileBase::read_string(), mrpt::config::CConfigFileBase::read_uint64_t(), rect_height, rect_width, sect, shutter_abs, shutter_auto, shutter_time_ms, stereo_mode, strobe_delay, strobe_duration, strobe_enabled, strobe_polarity, strobe_source, mrpt::system::tokenize(), trigger_enabled, trigger_mode, trigger_polarity, trigger_source, and videomode.

Here is the call graph for this function:

Member Data Documentation

◆ autoexposure_abs

bool mrpt::hwdrivers::TCaptureOptions_FlyCapture2::autoexposure_abs {true}

(default=true) Numeric mode (absolute or integer values)

Definition at line 86 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ autoexposure_auto

bool mrpt::hwdrivers::TCaptureOptions_FlyCapture2::autoexposure_auto {true}

(default=true)

Definition at line 82 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ autoexposure_EV

float mrpt::hwdrivers::TCaptureOptions_FlyCapture2::autoexposure_EV {0.0f}

(default=0.0) Exposure Value, if autoexposure_auto=false

Definition at line 88 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ autoexposure_onOff

bool mrpt::hwdrivers::TCaptureOptions_FlyCapture2::autoexposure_onOff {true}

(default=true) Activate this feature

Definition at line 84 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ camera_guid

unsigned int mrpt::hwdrivers::TCaptureOptions_FlyCapture2::camera_guid[4]

GUID of the camera to open, only when open_by_guid==true.

Definition at line 31 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), mrpt::hwdrivers::CImageGrabber_FlyCapture2::open(), and TCaptureOptions_FlyCapture2().

◆ camera_index

unsigned int mrpt::hwdrivers::TCaptureOptions_FlyCapture2::camera_index {0}

(Default=0) If open_by_guid==false, will open the i'th camera based on this 0-based index.

Definition at line 26 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ framerate

std::string mrpt::hwdrivers::TCaptureOptions_FlyCapture2::framerate

(Default="", which means default) A string with a framerate, from the list available in FlyCapture2::FrameRate, eg.

"FRAMERATE_30", etc.

Definition at line 45 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ gain_abs

bool mrpt::hwdrivers::TCaptureOptions_FlyCapture2::gain_abs {true}

(default=true) Numeric mode (absolute or integer values)

Definition at line 98 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ gain_auto

bool mrpt::hwdrivers::TCaptureOptions_FlyCapture2::gain_auto {true}

(default=true)

Definition at line 96 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ gain_dB

float mrpt::hwdrivers::TCaptureOptions_FlyCapture2::gain_dB {0.0f}

(default=0.0) Sensor gain, if gain_auto=false

Definition at line 100 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ grabmode

std::string mrpt::hwdrivers::TCaptureOptions_FlyCapture2::grabmode

(Default="BUFFER_FRAMES") A string with a grab mode, from the list available in FlyCapture2::GrabMode

Definition at line 50 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ grabTimeout

int mrpt::hwdrivers::TCaptureOptions_FlyCapture2::grabTimeout {-1}

(Default=5000) Time in milliseconds that RetrieveBuffer() and WaitForBufferEvent() will wait for an image before timing out and returning.

Definition at line 57 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ numBuffers

unsigned int mrpt::hwdrivers::TCaptureOptions_FlyCapture2::numBuffers {30}

(Default=30) Number of images that can be stored in the buffer, if enabled with grabMode.

Definition at line 53 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ open_by_guid

bool mrpt::hwdrivers::TCaptureOptions_FlyCapture2::open_by_guid {false}

(Default=false) Set to true to force opening a camera by its GUID, in camera_guid

Definition at line 29 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ rect_height

unsigned int mrpt::hwdrivers::TCaptureOptions_FlyCapture2::rect_height {600}

(default=600) Height for output rectified images

Definition at line 107 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ rect_width

unsigned int mrpt::hwdrivers::TCaptureOptions_FlyCapture2::rect_width {800}

(default=800) Width for output rectified images

Definition at line 105 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ shutter_abs

bool mrpt::hwdrivers::TCaptureOptions_FlyCapture2::shutter_abs {true}

(default=true) Numeric mode (absolute or integer values)

Definition at line 92 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ shutter_auto

bool mrpt::hwdrivers::TCaptureOptions_FlyCapture2::shutter_auto {true}

(default=true)

Definition at line 90 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ shutter_time_ms

float mrpt::hwdrivers::TCaptureOptions_FlyCapture2::shutter_time_ms {4.0f}

(default=4.0) Shutter time, if shutter_auto=false

Definition at line 94 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ stereo_mode

bool mrpt::hwdrivers::TCaptureOptions_FlyCapture2::stereo_mode {false}

(default=false) Obtain images as stereo pairs with Flycapture2

Definition at line 103 of file CImageGrabber_FlyCapture2.h.

Referenced by mrpt::hwdrivers::CImageGrabber_FlyCapture2::isStereo(), loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ strobe_delay

float mrpt::hwdrivers::TCaptureOptions_FlyCapture2::strobe_delay {0.0f}

(default=0.0) Delay in ms.

Refer to PGR docs.

Definition at line 77 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ strobe_duration

float mrpt::hwdrivers::TCaptureOptions_FlyCapture2::strobe_duration {1.0f}

(default=1.0) Pulse durationin ms.

Refer to PGR docs.

Definition at line 79 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ strobe_enabled

bool mrpt::hwdrivers::TCaptureOptions_FlyCapture2::strobe_enabled {false}

(default=false) Enable the generation of a strobe signal in GPIO.

Refer to PGR docs.

Definition at line 71 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ strobe_polarity

unsigned int mrpt::hwdrivers::TCaptureOptions_FlyCapture2::strobe_polarity {0}

(default=0) Refer to PGR docs.

Definition at line 75 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ strobe_source

unsigned int mrpt::hwdrivers::TCaptureOptions_FlyCapture2::strobe_source {0}

(default=0) Refer to PGR docs.

Definition at line 73 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ trigger_enabled

bool mrpt::hwdrivers::TCaptureOptions_FlyCapture2::trigger_enabled {false}

(default=false) Enable non-free-running mode, only capturing when a given input trigger signal is detected.

Refer to PGR docs.

Definition at line 61 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ trigger_mode

unsigned int mrpt::hwdrivers::TCaptureOptions_FlyCapture2::trigger_mode {0}

(default=0) Refer to PGR docs.

Definition at line 67 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ trigger_polarity

unsigned int mrpt::hwdrivers::TCaptureOptions_FlyCapture2::trigger_polarity {0}

(default=0) Refer to PGR docs.

Definition at line 63 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ trigger_source

unsigned int mrpt::hwdrivers::TCaptureOptions_FlyCapture2::trigger_source {0}

(default=0) Refer to PGR docs.

Definition at line 65 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().

◆ videomode

std::string mrpt::hwdrivers::TCaptureOptions_FlyCapture2::videomode

(Default="", which means default) A string with a video mode, from the list available in FlyCapture2::VideoMode, eg.

"VIDEOMODE_640x480Y8", etc.

Definition at line 40 of file CImageGrabber_FlyCapture2.h.

Referenced by loadOptionsFrom(), and mrpt::hwdrivers::CImageGrabber_FlyCapture2::open().




Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020