EasyMVS
simple 3D reconstruction framework
Public Types | Public Member Functions | Static Public Member Functions | List of all members
PinholeImageReader Class Reference

read images from folder. More...

#include <ImageReaderCamera.h>

Inheritance diagram for PinholeImageReader:
Inheritance graph
[legend]
Collaboration diagram for PinholeImageReader:
Collaboration graph
[legend]

Public Types

using Ptr = std::shared_ptr< PinholeImageReader >
 
- Public Types inherited from PinholeCamera
using Ptr = std::shared_ptr< PinholeCamera >
 the shared pointer of PinholeCamera class
 
- Public Types inherited from CameraObject
using Ptr = std::shared_ptr< CameraObject >
 shared pointer
 
- Public Types inherited from DataFlowObject
using Ptr = std::shared_ptr< DataFlowObject >
 the shared pointer type of DataFlowObject
 

Public Member Functions

virtual std::string type_name () override
 get the typename. More...
 
virtual bool save (JsonNode &fs) override
 save data and settings to file More...
 
virtual bool load (JsonNode &fs) override
 load data and settings from file More...
 
virtual bool open () override
 open the camera with the preloaded parameter More...
 
virtual bool open (const cv::String &filename, int apiPreference=cv::CAP_ANY) override
 
virtual bool open (const cv::String &filename, int apiPreference, const std::vector< int > &params) override
 
virtual bool open (int index, int apiPreference=cv::CAP_ANY)
 
virtual bool open (int index, int apiPreference, const std::vector< int > &params)
 
virtual bool read (cv::OutputArray image)
 
virtual void release ()
 
virtual bool grab ()
 
virtual bool isOpened () const
 
virtual bool retrieve (cv::OutputArray image, int flag=0)
 
- Public Member Functions inherited from PinholeCamera
 PinholeCamera (const cv::Mat1d &CameraMatrix=cv::Mat1d(), const cv::Mat1d &DistCoeff=cv::Mat1d())
 Construct a new Pinhole Camera object. More...
 
virtual ~PinholeCamera ()
 Destroy the Pinhole Camera object.
 
virtual bool undistort (const cv::Mat &src, cv::Mat &dst) override
 Transforms an image to compensate for lens distortion. this is a pure virtual function, the real undistort algorithm should be implemented. More...
 
std::tuple< cv::Mat1d, cv::Mat1d > getCameraParameters ()
 Get the Camera Parameters. More...
 
bool updateCameraMatrix (const cv::Mat1d &CameraMatrix)
 set the new camera intrinsic matrix More...
 
bool updateDistCoeff (const cv::Mat1d &DistCoeff)
 
virtual std::string type_name () override
 get the typename. More...
 
virtual bool save (JsonNode &fs) override
 save data and settings to file More...
 
virtual bool load (JsonNode &fs) override
 load data and settings from file More...
 
- Public Member Functions inherited from CameraObject
 CameraObject ()
 Construct a new Camera Object object. More...
 
 CameraObject (std::string CameraName)
 Construct a new Camera Object object. More...
 
virtual ~CameraObject ()
 Destroy the Camera Object object.
 
std::string getCameraName ()
 Get the Camera Name. More...
 
virtual bool undistort (const cv::Mat &src, cv::Mat &dst)=0
 Transforms an image to compensate for lens distortion. this is a pure virtual function, the real undistort algorithm should be implemented. More...
 
virtual bool open ()
 open the camera with the preloaded parameter More...
 
bool save (JsonNode &fs) override
 save data and settings to file More...
 
bool load (JsonNode &fs) override
 load data and settings from file More...
 
virtual std::string type_name () override
 get the typename. More...
 
- Public Member Functions inherited from DataFlowObject
 DataFlowObject ()
 Construct a new Data Flow Object object.
 
virtual ~DataFlowObject ()
 Destroy the Data Flow Object object.
 
- Public Member Functions inherited from MVSObject
 MVSObject ()
 Construct a new MVSObject object.
 
virtual ~MVSObject ()
 Destroy the MVSObject object.
 
virtual bool save (JsonNode &fs)=0
 save data and settings to file More...
 
virtual bool load (JsonNode &fs)=0
 load data and settings from file More...
 
virtual std::string type_name ()
 get the typename. More...
 

Static Public Member Functions

static PinholeImageReader::Ptr Create (const cv::Mat1d &CameraMatrix=cv::Mat1d(), const cv::Mat1d &DistCoeff=cv::Mat1d())
 Creates PinholeImageReader object. More...
 
- Static Public Member Functions inherited from PinholeCamera
static Ptr Create (const cv::Mat1d &CameraMatrix=cv::Mat1d(), const cv::Mat1d &DistCoeff=cv::Mat1d())
 Creates PinholeCamera object. More...
 
- Static Public Member Functions inherited from DataFlowObject
static void cvMat2Sophus (const cv::Mat1d &Mat, Sophus::SE3d &Pose)
 create shared pointer of DataFlowObject, do NOT use this method directly, use the Create() method in derived class. More...
 
static void Sophus2cvMat (const Sophus::SE3d &pose, cv::Mat1d &Mat)
 
static cv::Mat1d Rt2T (const cv::Mat1d &R, const cv::Mat1d &t)
 
static std::tuple< cv::Mat1d, cv::Mat1d > T2Rt (const cv::Mat1d &T)
 

Additional Inherited Members

- Protected Member Functions inherited from MVSObject
bool isDirExist (std::string path)
 check if the directory is exist. More...
 
bool mkdir (std::string path)
 create directory in given path. More...
 
- Protected Attributes inherited from PinholeCamera
cv::Mat1d CameraMatrix
 Camera Intrinsic Matrix.
 
cv::Mat1d DistCoeff
 Camera Distortion Parameters.
 
- Protected Attributes inherited from CameraObject
std::string CameraName
 
cv::Size2i ImageSize
 

Detailed Description

read images from folder.

Member Function Documentation

◆ Create()

PinholeImageReader::Ptr PinholeImageReader::Create ( const cv::Mat1d &  CameraMatrix = cv::Mat1d(),
const cv::Mat1d &  DistCoeff = cv::Mat1d() 
)
static

Creates PinholeImageReader object.

Parameters
CameraNamethe unique name of Camera
CameraMatrixthe 3x3 camera intrinsic matrix
DistCoeffthe camera distortion parameters
Returns
Ptr the shared pointer of PinholeCamera class

◆ load()

bool PinholeImageReader::load ( JsonNode &  fs)
overridevirtual

load data and settings from file

this method will load data such as keypoints, descriptors, translation matrices in DataFlowObject and its sub-classes from the given JsonNode instance. or will load parameters and settings in WorkFlowObject and its sub-classes to the given JsonNode instance, and automatically initialize the WorkFlow with these parameters

Parameters
fsthe json handler
Returns
true load successfully
false load failed or initialization falied.

Reimplemented from PinholeCamera.

◆ open()

bool PinholeImageReader::open ( )
overridevirtual

open the camera with the preloaded parameter

Returns
true
false

Reimplemented from CameraObject.

◆ save()

bool PinholeImageReader::save ( JsonNode &  fs)
overridevirtual

save data and settings to file

this method will save data such as keypoints, descriptors, translation matrices in DataFlowObject and its sub-classes to the given JsonNode instance, or will save parameters and settings in WorkFlowObject and its sub-classes to the given JsonNode instance.

Parameters
fsthe json handler
Returns
true save successfully
false save failed

Reimplemented from PinholeCamera.

◆ type_name()

std::string PinholeImageReader::type_name ( )
overridevirtual

get the typename.

Returns

Reimplemented from PinholeCamera.


The documentation for this class was generated from the following files: