EasyMVS
simple 3D reconstruction framework
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
PinholeFrameObject Class Reference
Inheritance diagram for PinholeFrameObject:
Inheritance graph
[legend]
Collaboration diagram for PinholeFrameObject:
Collaboration graph
[legend]

Public Types

using Ptr = std::shared_ptr< PinholeFrameObject >
 
- Public Types inherited from FrameObject
using Ptr = std::shared_ptr< FrameObject >
 
- Public Types inherited from DataFlowObject
using Ptr = std::shared_ptr< DataFlowObject >
 the shared pointer type of DataFlowObject
 

Public Member Functions

 PinholeFrameObject (int ID, uint32_t Timestamp=0)
 Construct a new PinholeFrameObject object. More...
 
 ~PinholeFrameObject ()
 Destroy the Pinhole Frame Object object.
 
virtual bool load (JsonNode &fs) override
 
virtual bool save (JsonNode &fs) override
 save data and settings to file More...
 
virtual std::string type_name () override
 get the typename. More...
 
- Public Member Functions inherited from FrameObject
 FrameObject ()
 Construct a new Frame Object object.
 
 FrameObject (int ID, uint32_t Timestamp=0)
 Construct a new Frame Object object. More...
 
virtual ~FrameObject ()
 Destroy the Frame Object object.
 
int getID ()
 Get the Frame ID. More...
 
uint32_t getTimestamp ()
 Get the timestamp. More...
 
bool setTimestamp (uint32_t time)
 set the timestamp. More...
 
bool setBestFrame (RelatedFrameInfo::Ptr FramePtr)
 set the best frame, the best camera pair is the camera that will be used during dual camera dense reconstruction. the best frame should be set after pose reconstruction in mono camera scenario, or be set when the frame is generated in dual camera or RGBD camera scenario. More...
 
RelatedFrameInfo::Ptr getBestFrame ()
 get the best frame. More...
 
bool addRelatedFrame (RelatedFrameInfo::Ptr FramePtr)
 add relate frame, the related frame is the frame with common field of view, it may because the two frames have matched feature points, or because the two frames are created from an dual cameras, or RGBD camera. More...
 
bool removeRelatedFrame (int FrameID)
 remove the related camera frame, the related camera frame is the frame which has the common filed of view with current frame. More...
 
bool removeAllRelatedFrames ()
 remove all of the related camera frame of current frame. More...
 
bool updateRelatedFrame (RelatedFrameInfo::Ptr FramePtr)
 update related frame. More...
 
RelatedFrameInfo::Ptr getRelatedFrame (int FrameID)
 Get the Related Frame object. More...
 
bool getAllRelatedFrames (std::set< RelatedFrameInfo::Ptr > &Frames)
 Get all the Related Frames object. More...
 
bool getAllRelatedFrames (std::set< int > &FrameID)
 get all the related frame id. More...
 
int hasRelatedFrame ()
 
bool addMapPoint (int KeyPointID, std::shared_ptr< MapPointObject > MapPoint, const Eigen::Vector4d &LocalCoordinate)
 add frame observed map point More...
 
bool removeMapPoint (int KeyPointID)
 remove map point from frame More...
 
bool removeAllMapPoints ()
 remove all map points More...
 
bool getMapPoint (int KeyPointID, std::shared_ptr< MapPointObject > &MapPoint, Eigen::Vector4d &LocalCoordinate)
 Get the Map Point object. More...
 
bool getMapPoint (int KeyPointID, int &MappointID, Eigen::Vector4d &LocalCoordinate)
 get mappoint id related to keypoint. More...
 
std::shared_ptr< MapPointObjectgetMapPoint (int KeyPointID)
 Get the Map Point object.
 
bool hasMappoint (int KeyPointID)
 
bool getAllMappointID (std::set< int > &KeyPointID)
 get all keypoint id related to mappoint. More...
 
bool updateMapPoint (int KeyPointID, std::shared_ptr< MapPointObject > MapPoint, const Eigen::Vector4d &LocalCoordinate)
 update the map point More...
 
virtual bool load (JsonNode &fs) override
 load data and settings from file More...
 
virtual bool save (JsonNode &fs) override
 save data and settings to file More...
 
virtual std::string type_name () override
 get the typename. More...
 
Sophus::SE3d getGlobalPose ()
 
void setGlobalPose (Sophus::SE3d &pose)
 
Sophus::SE3d & GlobalPose ()
 
bool isGlobalPoseKnown ()
 
- 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 Ptr Create (int ID, int MapID, uint32_t Timestamp=0)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
static Ptr Create (int ID, const cv::Mat &CameraMatrix, const cv::Mat &DistCoeff, int MapID, uint32_t Timestamp=0, const cv::Mat &RGBMat=cv::Mat(), const cv::Mat &XYZMat=cv::Mat())
 Create the PinholeFrameObject object. More...
 
- Static Public Member Functions inherited from FrameObject
static Ptr Create (int ID, int MapID, const cv::Mat &RGBMat, uint32_t Timestamp=0, const cv::Mat &XYZMat=cv::Mat())
 Create FrameObject object. More...
 
static Ptr Create (int ID, int MapID, uint32_t Timestamp=0)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 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)
 

Public Attributes

cv::Mat1d CameraMatrix
 Camera intrinsic matrix.
 
cv::Mat1d DistCoeff
 camera distortion parameters
 
- Public Attributes inherited from FrameObject
cv::Mat RGBMat
 the RGB image in the current frame the current frame may NOT contain RGB frame, if the frame is created by projectors, the RGB image is empty.
 
cv::Mat XYZMat
 the depth map in the current frame the current frame may contain depth map when it is created, if the frame is created by RGBD cameras, the original depth map will be stored here when frame is created.
 
std::vector< cv::KeyPoint > KeyPoints
 vector of KeyPoints
 
cv::Mat KeyPointsDescriptors
 KeyPoints descriptors, the storeage details is the same as it in OpenCV the details can be seen in OpenCV documents.
 
DBoW2::BowVector BoWDescriptors
 the Bag of Words descriptor of the current frame.
 
int MapID = -1
 this variable indicate which submap this frame belong.
 

Additional Inherited Members

- Protected Types inherited from FrameObject
using MapPointInfo = std::tuple< std::weak_ptr< MapPointObject >, Eigen::Vector4d, int >
 
- 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 FrameObject
int FrameID
 
uint32_t Timestamp
 
RelatedFrameInfo::Ptr BestCamera
 pointer of the related frame, the pose of related frame, the pose confidence of related frame (-1 means invalid)
 
std::map< int, RelatedFrameInfo::PtrRelatedFrame
 int is the frame ID, the second is the related frame pointer. the related frame pose might inaccurate once the global pose is found.
 
std::map< int, MapPointInfo > ObservedMapPoints
 
bool KnownPose = false
 

Constructor & Destructor Documentation

◆ PinholeFrameObject()

PinholeFrameObject::PinholeFrameObject ( int  ID,
uint32_t  Timestamp = 0 
)

Construct a new PinholeFrameObject object.

Parameters
IDunique frame ID

Member Function Documentation

◆ Create() [1/2]

PinholeFrameObject::Ptr PinholeFrameObject::Create ( int  ID,
const cv::Mat &  CameraMatrix,
const cv::Mat &  DistCoeff,
int  MapID,
uint32_t  Timestamp = 0,
const cv::Mat &  RGBMat = cv::Mat(),
const cv::Mat &  XYZMat = cv::Mat() 
)
static

Create the PinholeFrameObject object.

Parameters
IDunique frame ID
CameraMatrixCamera intrinsic matrix
DistCoeffCamera distortion parameters
RGBMatthe undistorted RGB image.
XYZMapthe XYZ map or depth map, the RGBD camera may already compute the original depth map when frame is created.
Returns
Ptr

◆ Create() [2/2]

PinholeFrameObject::Ptr PinholeFrameObject::Create ( int  ID,
int  MapID,
uint32_t  Timestamp = 0 
)
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
ID
Returns
Ptr

◆ load()

bool PinholeFrameObject::load ( JsonNode &  fs)
overridevirtual
Parameters
fs
Returns
true
false
Bug:
the shared states between multiple same intrinsic matrix and distortion coefficient will lost.

Reimplemented from FrameObject.

◆ save()

bool PinholeFrameObject::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 FrameObject.

◆ type_name()

std::string PinholeFrameObject::type_name ( )
overridevirtual

get the typename.

Returns

Reimplemented from FrameObject.


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