struct mrpt::hwdrivers::TCaptureOptions_DUO3D

Overview

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

#include <mrpt/hwdrivers/CDUO3DCamera.h>

struct TCaptureOptions_DUO3D
{
    // enums

    enum TYMLReadResult;

    // fields

    int m_img_width {640};
    int m_img_height {480};
    float m_fps {30};
    float m_exposure {50};
    float m_led {25};
    float m_gain {0};
    bool m_capture_imu {false};
    bool m_capture_rectified {false};
    bool m_calibration_from_file {true};
    std::string m_rectify_map_filename;
    std::string m_intrinsic_filename;
    std::string m_extrinsic_filename;
    mrpt::img::TStereoCamera m_stereo_camera;

    // construction

    TCaptureOptions_DUO3D();

    // methods

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

    TYMLReadResult m_camera_int_params_from_yml(const std::string& _file_name = std::string());
    TYMLReadResult m_camera_ext_params_from_yml(const std::string& _file_name = std::string());
    TYMLReadResult m_rectify_map_from_yml(const std::string& _file_name = std::string());
};

Fields

int m_img_width {640}

(Default = 640) Width of the captured image.

int m_img_height {480}

(Default = 480) Height of the captured image.

float m_fps {30}

(Default = 30) Frames per second <= 30.

float m_exposure {50}

(Default = 50) Exposure value.

float m_led {25}

(Default = 25) Led intensity (some device models).

float m_gain {0}

(Default = 10) Camera gain.

bool m_capture_imu {false}

(Default = false) Capture IMU data.

bool m_capture_rectified {false}

(Default = true) Rectify images.

Rectification map must be provided

See also:

m_rectify_map_filename.

bool m_calibration_from_file {true}

(Default = true) Get calibration information from files provided by DUO3D Calibration App.

std::string m_rectify_map_filename

Rectification map file provided by DUO3D Calibration App (YML format).

std::string m_intrinsic_filename

Intrinsic parameters file provided by DUO3D Calibration App (YML format).

std::string m_extrinsic_filename

Extrinsic parameters file provided by DUO3D Calibration App (YML format).

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]
       image_width             = 640           // [int]    x Resolution
       image_height            = 480           // [int]    y Resolution
       fps                     = 30            // [int]    Frames per second (<= *30)
       exposure                = 50            // [int]    Exposure value (1..100)
       led                     = 0             // [int]    Led intensity (only for some device models) (1..100).
       gain                    = 50            // [int]    Camera gain (1..100)
       capture_rectified       = false         // [bool]   Rectify captured images
       capture_imu             = true          // [bool]   Capture IMU data from DUO3D device (if available)
       calibration_from_file   = true          // [bool]   Use YML calibration files provided by calibration application supplied with DUO3D device
       intrinsic_filename      = ""            // [string] Intrinsic parameters file.  This filename should contain a substring _RWWWxHHH_ with WWW being the image width and HHH the image height, as provided by the calibration application.
       extrinsic_filename      = ""            // [string] Extrinsic parameters file.  This filename should contain a substring _RWWWxHHH_ with WWW being the image width and HHH the image height, as provided by the calibration application.
       rectify_map_filename    = ""            // [string] Rectification map file.  This filename should contain a substring _RWWWxHHH_ with WWW being the image width and HHH the image height, as provided by the calibration application.

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.