MRPT  2.0.0
List of all members | Public Types | Public Member Functions
mrpt::hwdrivers::TCaptureOptions_DUO3D Struct Reference

Detailed Description

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

Definition at line 20 of file CDUO3DCamera.h.

#include <mrpt/hwdrivers/CDUO3DCamera.h>

Public Types

enum  TYMLReadResult { yrr_NAME_NON_CONSISTENT, yrr_EMPTY, yrr_OK }
 

Public Member Functions

 TCaptureOptions_DUO3D ()
 
 ~TCaptureOptions_DUO3D ()
 
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...
 
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())
 

Public Attributes

Image settings
int m_img_width {640}
 (Default = 640) Width of the captured image. More...
 
int m_img_height {480}
 (Default = 480) Height of the captured image. More...
 
float m_fps {30}
 (Default = 30) Frames per second <= 30. More...
 
float m_exposure {50}
 (Default = 50) Exposure value. More...
 
float m_led {25}
 (Default = 25) Led intensity (some device models). More...
 
float m_gain {0}
 (Default = 10) Camera gain. More...
 
Behaviour selection
bool m_capture_imu {false}
 (Default = false) Capture IMU data. More...
 
bool m_capture_rectified {false}
 (Default = true) Rectify images. More...
 
bool m_calibration_from_file {true}
 (Default = true) Get calibration information from files provided by DUO3D Calibration App. More...
 
Files specification
std::string m_rectify_map_filename
 Rectification map file provided by DUO3D Calibration App (YML format). More...
 
std::string m_intrinsic_filename
 Intrinsic parameters file provided by DUO3D Calibration App (YML format). More...
 
std::string m_extrinsic_filename
 Extrinsic parameters file provided by DUO3D Calibration App (YML format). More...
 
Others
mrpt::img::TStereoCamera m_stereo_camera
 

Member Enumeration Documentation

◆ TYMLReadResult

Enumerator
yrr_NAME_NON_CONSISTENT 
yrr_EMPTY 
yrr_OK 

Definition at line 22 of file CDUO3DCamera.h.

Constructor & Destructor Documentation

◆ TCaptureOptions_DUO3D()

TCaptureOptions_DUO3D::TCaptureOptions_DUO3D ( )

Definition at line 55 of file CDUO3DCamera.cpp.

References duo_params.

◆ ~TCaptureOptions_DUO3D()

TCaptureOptions_DUO3D::~TCaptureOptions_DUO3D ( )

Definition at line 64 of file CDUO3DCamera.cpp.

References duo_params.

Member Function Documentation

◆ loadOptionsFrom()

void TCaptureOptions_DUO3D::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.
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 243 of file CDUO3DCamera.cpp.

References mrpt::img::TStereoCamera::leftCamera, mrpt::img::TStereoCamera::loadFromConfigFile(), m_calibration_from_file, m_capture_imu, m_capture_rectified, m_exposure, m_extrinsic_filename, m_fps, m_gain, m_img_height, m_img_width, m_intrinsic_filename, m_led, m_rectify_map_filename, m_stereo_camera, mrpt::img::TCamera::ncols, mrpt::img::TCamera::nrows, mrpt::config::CConfigFileBase::read_bool(), mrpt::config::CConfigFileBase::read_float(), mrpt::config::CConfigFileBase::read_int(), mrpt::config::CConfigFileBase::read_string(), and mrpt::img::TStereoCamera::rightCamera.

Here is the call graph for this function:

◆ m_camera_ext_params_from_yml()

TCaptureOptions_DUO3D::TYMLReadResult TCaptureOptions_DUO3D::m_camera_ext_params_from_yml ( const std::string &  _file_name = std::string())

Definition at line 107 of file CDUO3DCamera.cpp.

References mrpt::poses::CPose3DQuat::asTPose(), mrpt::containers::empty(), mrpt::system::extractFileName(), mrpt::format(), m_extrinsic_filename, m_img_height, m_img_width, m_stereo_camera, mrpt::img::TStereoCamera::rightCameraPose, THROW_EXCEPTION, yrr_EMPTY, yrr_NAME_NON_CONSISTENT, and yrr_OK.

Referenced by mrpt::hwdrivers::CDUO3DCamera::open().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m_camera_int_params_from_yml()

TCaptureOptions_DUO3D::TYMLReadResult TCaptureOptions_DUO3D::m_camera_int_params_from_yml ( const std::string &  _file_name = std::string())

Definition at line 169 of file CDUO3DCamera.cpp.

References mrpt::img::TCamera::dist, mrpt::containers::empty(), mrpt::system::extractFileName(), mrpt::format(), mrpt::img::TCamera::intrinsicParams, mrpt::img::TStereoCamera::leftCamera, m_img_height, m_img_width, m_intrinsic_filename, m_stereo_camera, mrpt::img::TStereoCamera::rightCamera, mrpt::img::TCamera::setDistortionParamsFromValues(), mrpt::img::TCamera::setIntrinsicParamsFromValues(), mrpt::math::MatrixVectorBase< Scalar, Derived >::setZero(), THROW_EXCEPTION, yrr_EMPTY, yrr_NAME_NON_CONSISTENT, and yrr_OK.

Referenced by mrpt::hwdrivers::CDUO3DCamera::open().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m_rectify_map_from_yml()

TCaptureOptions_DUO3D::TYMLReadResult TCaptureOptions_DUO3D::m_rectify_map_from_yml ( const std::string &  _file_name = std::string())

Definition at line 70 of file CDUO3DCamera.cpp.

References duo_params, mrpt::system::extractFileName(), mrpt::format(), m_img_height, m_img_width, m_rectify_map_filename, TDUOParams::m_rectify_map_left_x, TDUOParams::m_rectify_map_left_y, TDUOParams::m_rectify_map_right_x, TDUOParams::m_rectify_map_right_y, THROW_EXCEPTION, yrr_EMPTY, yrr_NAME_NON_CONSISTENT, and yrr_OK.

Referenced by mrpt::hwdrivers::CDUO3DCamera::open().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_calibration_from_file

bool mrpt::hwdrivers::TCaptureOptions_DUO3D::m_calibration_from_file {true}

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

Definition at line 57 of file CDUO3DCamera.h.

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

◆ m_capture_imu

bool mrpt::hwdrivers::TCaptureOptions_DUO3D::m_capture_imu {false}

(Default = false) Capture IMU data.

Definition at line 51 of file CDUO3DCamera.h.

Referenced by mrpt::hwdrivers::CDUO3DCamera::captureIMUIsSet(), mrpt::hwdrivers::CDUO3DCamera::getObservations(), and loadOptionsFrom().

◆ m_capture_rectified

bool mrpt::hwdrivers::TCaptureOptions_DUO3D::m_capture_rectified {false}

(Default = true) Rectify images.

Rectification map must be provided

See also
m_rectify_map_filename.

Definition at line 54 of file CDUO3DCamera.h.

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

◆ m_exposure

float mrpt::hwdrivers::TCaptureOptions_DUO3D::m_exposure {50}

(Default = 50) Exposure value.

Definition at line 41 of file CDUO3DCamera.h.

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

◆ m_extrinsic_filename

std::string mrpt::hwdrivers::TCaptureOptions_DUO3D::m_extrinsic_filename

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

Definition at line 70 of file CDUO3DCamera.h.

Referenced by loadOptionsFrom(), and m_camera_ext_params_from_yml().

◆ m_fps

float mrpt::hwdrivers::TCaptureOptions_DUO3D::m_fps {30}

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

Definition at line 39 of file CDUO3DCamera.h.

Referenced by loadOptionsFrom().

◆ m_gain

float mrpt::hwdrivers::TCaptureOptions_DUO3D::m_gain {0}

(Default = 10) Camera gain.

Definition at line 45 of file CDUO3DCamera.h.

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

◆ m_img_height

int mrpt::hwdrivers::TCaptureOptions_DUO3D::m_img_height {480}

◆ m_img_width

int mrpt::hwdrivers::TCaptureOptions_DUO3D::m_img_width {640}

◆ m_intrinsic_filename

std::string mrpt::hwdrivers::TCaptureOptions_DUO3D::m_intrinsic_filename

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

Definition at line 67 of file CDUO3DCamera.h.

Referenced by loadOptionsFrom(), and m_camera_int_params_from_yml().

◆ m_led

float mrpt::hwdrivers::TCaptureOptions_DUO3D::m_led {25}

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

Definition at line 43 of file CDUO3DCamera.h.

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

◆ m_rectify_map_filename

std::string mrpt::hwdrivers::TCaptureOptions_DUO3D::m_rectify_map_filename

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

Definition at line 64 of file CDUO3DCamera.h.

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

◆ m_stereo_camera

mrpt::img::TStereoCamera mrpt::hwdrivers::TCaptureOptions_DUO3D::m_stereo_camera



Page generated by Doxygen 1.8.14 for MRPT 2.0.0 Git: b38439d21 Tue Mar 31 19:58:06 2020 +0200 at miƩ abr 1 00:50:30 CEST 2020