RobotsIO
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RobotsIO::Camera::Camera Class Referenceabstract
Inheritance diagram for RobotsIO::Camera::Camera:
RobotsIO::Utils::ProbeContainer RobotsIO::Camera::DatasetCamera RobotsIO::Camera::YarpCamera RobotsIO::Camera::iCubCamera RobotsIO::Camera::RealsenseCameraYarp RobotsIO::Camera::iCubCameraRelative RobotsIO::Camera::iCubCameraDepth

Public Member Functions

virtual bool status () const
 
virtual bool reset ()
 
virtual std::pair< bool, Eigen::MatrixXd > deprojection_matrix () const
 
virtual std::pair< bool, RobotsIO::Camera::CameraParametersparameters () const
 
virtual std::pair< bool, Eigen::MatrixXf > depth (const bool &blocking)=0
 
virtual std::pair< bool, Eigen::MatrixXd > point_cloud (const bool &blocking, const double &maximum_depth=std::numeric_limits< double >::infinity(), const bool &use_root_frame=false, const bool &enable_colors=false)
 
virtual std::pair< bool, Eigen::Transform< double, 3, Eigen::Affine > > pose (const bool &blocking)=0
 
virtual std::pair< bool, cv::Mat > rgb (const bool &blocking)=0
 
virtual std::pair< bool, double > time_stamp_rgb () const
 
virtual std::pair< bool, double > time_stamp_depth () const
 
virtual std::pair< bool, Eigen::VectorXd > auxiliary_data (const bool &blocking)
 
virtual std::size_t auxiliary_data_size () const
 
virtual std::int32_t frame_index () const
 
virtual bool is_offline () const
 
virtual bool set_frame_index (const std::int32_t &index)
 
virtual bool step_frame ()
 
virtual bool log_frame (const bool &log_depth=false)
 
virtual bool start_log (const std::string &path)
 
virtual bool stop_log ()
 
- Public Member Functions inherited from RobotsIO::Utils::ProbeContainer
bool is_probe (const std::string &name) const
 
RobotsIO::Utils::Probeget_probe (const std::string &name) const
 
void set_probe (const std::string &name, std::unique_ptr< RobotsIO::Utils::Probe > probe)
 

Protected Member Functions

virtual bool initialize ()
 
virtual bool evaluate_deprojection_matrix ()
 
 Camera (const std::string &data_path, const std::size_t &width, const std::size_t &height, const double &fx, const double &cx, const double &fy, const double &cy)
 
virtual std::pair< bool, Eigen::MatrixXf > depth_offline ()
 
virtual std::pair< bool, Eigen::Transform< double, 3, Eigen::Affine > > pose_offline ()
 
virtual std::pair< bool, cv::Mat > rgb_offline ()
 
virtual std::pair< bool, double > time_stamp_rgb_offline () const
 
virtual std::pair< bool, double > time_stamp_depth_offline () const
 
virtual std::pair< bool, Eigen::VectorXd > auxiliary_data_offline ()
 
std::string compose_index (const std::size_t &index)
 
virtual std::pair< bool, Eigen::MatrixXd > load_data ()
 

Protected Attributes

bool status_ = true
 
RobotsIO::Camera::CameraParameters parameters_
 
Eigen::MatrixXd deprojection_matrix_
 
bool deprojection_matrix_initialized_ = false
 
RobotsIO::Camera::DatasetParameters dataset_parameters_
 
const bool offline_mode_ = false
 
Eigen::MatrixXd data_
 
std::int32_t frame_index_ = -1
 
std::size_t rgb_offset_ = 0
 
std::size_t depth_offset_ = 0
 
std::size_t number_frames_
 
std::ofstream log_
 
std::string log_path_
 
std::int32_t log_index_ = 0
 
const std::string log_name_ = "Camera"
 
- Protected Attributes inherited from RobotsIO::Utils::ProbeContainer
std::unordered_map< std::string, std::unique_ptr< RobotsIO::Utils::Probe > > probes_
 
const std::string log_name_ = "ProbeContainer"
 

Detailed Description

Definition at line 31 of file Camera.h.

Constructor & Destructor Documentation

◆ Camera() [1/2]

Definition at line 28 of file Camera.cpp.

◆ ~Camera()

Camera::~Camera ( )
virtual

Definition at line 32 of file Camera.cpp.

◆ Camera() [2/2]

Camera::Camera ( const std::string &  data_path,
const std::size_t &  width,
const std::size_t &  height,
const double &  fx,
const double &  cx,
const double &  fy,
const double &  cy 
)
protected

Constructor for offline playback.

Definition at line 353 of file Camera.cpp.

Member Function Documentation

◆ auxiliary_data()

std::pair< bool, VectorXd > Camera::auxiliary_data ( const bool &  blocking)
virtual

Auxiliary data.

Reimplemented in RobotsIO::Camera::iCubCamera.

Definition at line 178 of file Camera.cpp.

◆ auxiliary_data_offline()

std::pair< bool, VectorXd > Camera::auxiliary_data_offline ( )
protectedvirtual

Auxiliary data for offline playback.

Definition at line 519 of file Camera.cpp.

◆ auxiliary_data_size()

std::size_t Camera::auxiliary_data_size ( ) const
virtual

Definition at line 184 of file Camera.cpp.

◆ compose_index()

std::string Camera::compose_index ( const std::size_t &  index)
protected

Definition at line 539 of file Camera.cpp.

◆ deprojection_matrix()

std::pair< bool, MatrixXd > Camera::deprojection_matrix ( ) const
virtual

Camera parameters.

Reimplemented in RobotsIO::Camera::iCubCameraDepth.

Definition at line 53 of file Camera.cpp.

◆ depth()

virtual std::pair< bool, Eigen::MatrixXf > RobotsIO::Camera::Camera::depth ( const bool &  blocking)
pure virtual

◆ depth_offline()

std::pair< bool, MatrixXf > Camera::depth_offline ( )
protectedvirtual

RGB-D and pose for offline playback.

Definition at line 392 of file Camera.cpp.

◆ evaluate_deprojection_matrix()

bool Camera::evaluate_deprojection_matrix ( )
protectedvirtual

Camera parameters.

Definition at line 339 of file Camera.cpp.

◆ frame_index()

std::int32_t Camera::frame_index ( ) const
virtual

Offline playback.

Definition at line 190 of file Camera.cpp.

◆ initialize()

bool Camera::initialize ( )
protectedvirtual

Definition at line 319 of file Camera.cpp.

◆ is_offline()

bool Camera::is_offline ( ) const
virtual

Definition at line 199 of file Camera.cpp.

◆ load_data()

std::pair< bool, MatrixXd > Camera::load_data ( )
protectedvirtual

Definition at line 547 of file Camera.cpp.

◆ log_frame()

bool Camera::log_frame ( const bool &  log_depth = false)
virtual

Logging.

Definition at line 241 of file Camera.cpp.

◆ parameters()

std::pair< bool, CameraParameters > Camera::parameters ( ) const
virtual

Definition at line 62 of file Camera.cpp.

◆ point_cloud()

std::pair< bool, Eigen::MatrixXd > Camera::point_cloud ( const bool &  blocking,
const double &  maximum_depth = std::numeric_limits<double>::infinity(),
const bool &  use_root_frame = false,
const bool &  enable_colors = false 
)
virtual

Definition at line 71 of file Camera.cpp.

◆ pose()

virtual std::pair< bool, Eigen::Transform< double, 3, Eigen::Affine > > RobotsIO::Camera::Camera::pose ( const bool &  blocking)
pure virtual

◆ pose_offline()

std::pair< bool, Transform< double, 3, Affine > > Camera::pose_offline ( )
protectedvirtual

Definition at line 441 of file Camera.cpp.

◆ reset()

bool Camera::reset ( )
virtual

Definition at line 42 of file Camera.cpp.

◆ rgb_offline()

std::pair< bool, cv::Mat > Camera::rgb_offline ( )
protectedvirtual

Definition at line 469 of file Camera.cpp.

◆ set_frame_index()

bool Camera::set_frame_index ( const std::int32_t &  index)
virtual

Definition at line 205 of file Camera.cpp.

◆ start_log()

bool Camera::start_log ( const std::string &  path)
virtual

Definition at line 297 of file Camera.cpp.

◆ status()

bool Camera::status ( ) const
virtual

Definition at line 36 of file Camera.cpp.

◆ step_frame()

bool Camera::step_frame ( )
virtual

Reimplemented in RobotsIO::Camera::iCubCameraRelative.

Definition at line 216 of file Camera.cpp.

◆ stop_log()

bool Camera::stop_log ( )
virtual

Definition at line 311 of file Camera.cpp.

◆ time_stamp_depth()

std::pair< bool, double > Camera::time_stamp_depth ( ) const
virtual

Definition at line 172 of file Camera.cpp.

◆ time_stamp_depth_offline()

std::pair< bool, double > Camera::time_stamp_depth_offline ( ) const
protectedvirtual

Definition at line 506 of file Camera.cpp.

◆ time_stamp_rgb()

std::pair< bool, double > Camera::time_stamp_rgb ( ) const
virtual

Definition at line 166 of file Camera.cpp.

◆ time_stamp_rgb_offline()

std::pair< bool, double > Camera::time_stamp_rgb_offline ( ) const
protectedvirtual

Definition at line 493 of file Camera.cpp.

Member Data Documentation

◆ data_

Eigen::MatrixXd RobotsIO::Camera::Camera::data_
protected

Definition at line 150 of file Camera.h.

◆ dataset_parameters_

RobotsIO::Camera::DatasetParameters RobotsIO::Camera::Camera::dataset_parameters_
protected

Definition at line 146 of file Camera.h.

◆ deprojection_matrix_

Eigen::MatrixXd RobotsIO::Camera::Camera::deprojection_matrix_
protected

Definition at line 109 of file Camera.h.

◆ deprojection_matrix_initialized_

bool RobotsIO::Camera::Camera::deprojection_matrix_initialized_ = false
protected

Definition at line 111 of file Camera.h.

◆ depth_offset_

std::size_t RobotsIO::Camera::Camera::depth_offset_ = 0
protected

Definition at line 156 of file Camera.h.

◆ frame_index_

std::int32_t RobotsIO::Camera::Camera::frame_index_ = -1
protected

Definition at line 152 of file Camera.h.

◆ log_

std::ofstream RobotsIO::Camera::Camera::log_
protected

Definition at line 164 of file Camera.h.

◆ log_index_

std::int32_t RobotsIO::Camera::Camera::log_index_ = 0
protected

Definition at line 168 of file Camera.h.

◆ log_name_

const std::string RobotsIO::Camera::Camera::log_name_ = "Camera"
protected

Log name to be used in messages printed by the class.

Definition at line 174 of file Camera.h.

◆ log_path_

std::string RobotsIO::Camera::Camera::log_path_
protected

Definition at line 166 of file Camera.h.

◆ number_frames_

std::size_t RobotsIO::Camera::Camera::number_frames_
protected

Definition at line 158 of file Camera.h.

◆ offline_mode_

const bool RobotsIO::Camera::Camera::offline_mode_ = false
protected

Definition at line 148 of file Camera.h.

◆ parameters_

RobotsIO::Camera::CameraParameters RobotsIO::Camera::Camera::parameters_
protected

Definition at line 107 of file Camera.h.

◆ rgb_offset_

std::size_t RobotsIO::Camera::Camera::rgb_offset_ = 0
protected

Definition at line 154 of file Camera.h.

◆ status_

bool RobotsIO::Camera::Camera::status_ = true
protected

Definition at line 99 of file Camera.h.