struct mrpt::hwdrivers::TCaptureOptions_FlyCapture2

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

#include <mrpt/hwdrivers/CImageGrabber_FlyCapture2.h>

struct TCaptureOptions_FlyCapture2
{
    //
fields

    unsigned int camera_index {0};
    bool open_by_guid {false};
    unsigned int camera_guid[4];
    std::string videomode;
    std::string framerate;
    std::string grabmode;
    unsigned int numBuffers {30};
    int grabTimeout {-1};
    bool trigger_enabled {false};
    unsigned int trigger_polarity {0};
    unsigned int trigger_source {0};
    unsigned int trigger_mode {0};
    bool strobe_enabled {false};
    unsigned int strobe_source {0};
    unsigned int strobe_polarity {0};
    float strobe_delay {0.0f};
    float strobe_duration {1.0f};
    bool autoexposure_auto {true};
    bool autoexposure_onOff {true};
    bool autoexposure_abs {true};
    float autoexposure_EV {0.0f};
    bool shutter_auto {true};
    bool shutter_abs {true};
    float shutter_time_ms {4.0f};
    bool gain_auto {true};
    bool gain_abs {true};
    float gain_dB {0.0f};
    bool stereo_mode {false};
    unsigned int rect_width {800};
    unsigned int rect_height {600};

    //
methods

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

Fields

unsigned int camera_index {0}

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

bool open_by_guid {false}

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

unsigned int camera_guid[4]

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

std::string videomode

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

“VIDEOMODE_640x480Y8”, etc.

std::string framerate

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

“FRAMERATE_30”, etc.

std::string grabmode

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

unsigned int numBuffers {30}

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

int grabTimeout {-1}

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

bool trigger_enabled {false}

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

Refer to PGR docs.

unsigned int trigger_polarity {0}

(default=0) Refer to PGR docs.

unsigned int trigger_source {0}

(default=0) Refer to PGR docs.

unsigned int trigger_mode {0}

(default=0) Refer to PGR docs.

bool strobe_enabled {false}

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

Refer to PGR docs.

unsigned int strobe_source {0}

(default=0) Refer to PGR docs.

unsigned int strobe_polarity {0}

(default=0) Refer to PGR docs.

float strobe_delay {0.0f}

(default=0.0) Delay in ms.

Refer to PGR docs.

float strobe_duration {1.0f}

(default=1.0) Pulse durationin ms.

Refer to PGR docs.

bool autoexposure_auto {true}

(default=true)

bool autoexposure_onOff {true}

(default=true) Activate this feature

bool autoexposure_abs {true}

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

float autoexposure_EV {0.0f}

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

bool shutter_auto {true}

(default=true)

bool shutter_abs {true}

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

float shutter_time_ms {4.0f}

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

bool gain_auto {true}

(default=true)

bool gain_abs {true}

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

float gain_dB {0.0f}

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

bool stereo_mode {false}

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

unsigned int rect_width {800}

(default=800) Width for output rectified images

unsigned int rect_height {600}

(default=600) Height for output rectified images

Methods

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.

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

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.