EasyMVS
simple 3D reconstruction framework
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
FrameObject::RelatedFrameInfo Class Reference

the related frame info class, related frame can be defined as the frames that have common field of views. which store Interframe information such as pose between two frames, prior believe of the pose, and the matched keypoints between frames. More...

#include <FrameObject.h>

Inheritance diagram for FrameObject::RelatedFrameInfo:
Inheritance graph
[legend]
Collaboration diagram for FrameObject::RelatedFrameInfo:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

std::shared_ptr< FrameObjectgetRelatedFrame ()
 get the pointer of related frame. More...
 
bool setRelatedFrame (FrameObject::Ptr frame)
 set the shared pointer of related frame. More...
 
bool isFrameExist ()
 query wether the frame exist. usually the frame exist when the frame info exist, but there might be some garbage collection errors, during development. this method is to make sure that the frame dose exist. 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...
 
 RelatedFrameInfo ()
 Construct a new Related Frame Info object.
 
 RelatedFrameInfo (std::shared_ptr< FrameObject > RelatedFrame)
 Construct a new Frameinfo object. instead of call this method, it is better to construct new frame info object with **Create**method. More...
 
 ~RelatedFrameInfo ()
 Destroy the object.
 
- 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 (std::shared_ptr< FrameObject > RelatedFrame)
 create the shared pointer of relatedframeinfo. More...
 
static Ptr Create (std::shared_ptr< FrameObject > RelatedFrame, std::shared_ptr< Sophus::SE3d > Pose, double sigma=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 (std::shared_ptr< FrameObject > RelatedFrame, const std::vector< cv::DMatch > &KeyPointMatch)
 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

std::shared_ptr< Sophus::SE3d > Pose
 shared pointer of pose. More...
 
double sigma
 variance of pose.
 
std::vector< cv::DMatch > KeyPointMatch
 matched feature points.
 

Friends

std::ostream & operator<< (std::ostream &os, FrameObject::RelatedFrameInfo &info)
 

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...
 

Detailed Description

the related frame info class, related frame can be defined as the frames that have common field of views. which store Interframe information such as pose between two frames, prior believe of the pose, and the matched keypoints between frames.

Constructor & Destructor Documentation

◆ RelatedFrameInfo()

FrameObject::RelatedFrameInfo::RelatedFrameInfo ( std::shared_ptr< FrameObject RelatedFrame)

Construct a new Frameinfo object. instead of call this method, it is better to construct new frame info object with **Create**method.

Parameters
RelatedFrame

Member Function Documentation

◆ Create() [1/3]

FrameObject::RelatedFrameInfo::Ptr FrameObject::RelatedFrameInfo::Create ( std::shared_ptr< FrameObject RelatedFrame)
static

create the shared pointer of relatedframeinfo.

Parameters
RelatedFrameshared pointer of related frame.
Returns
shared pointer, return empty pointer when create failed.

◆ Create() [2/3]

FrameObject::RelatedFrameInfo::Ptr FrameObject::RelatedFrameInfo::Create ( std::shared_ptr< FrameObject RelatedFrame,
const std::vector< cv::DMatch > &  KeyPointMatch 
)
static

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

Parameters
RelatedFrame
KeyPointMatch
Returns

◆ Create() [3/3]

FrameObject::RelatedFrameInfo::Ptr FrameObject::RelatedFrameInfo::Create ( std::shared_ptr< FrameObject RelatedFrame,
std::shared_ptr< Sophus::SE3d >  Pose,
double  sigma = 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
RelatedFrame
Pose
sigma
Returns

◆ getRelatedFrame()

std::shared_ptr< FrameObject > FrameObject::RelatedFrameInfo::getRelatedFrame ( )

get the pointer of related frame.

Returns
shared pointer of related frame, return empty pointer if the frame is not exist.

◆ isFrameExist()

bool FrameObject::RelatedFrameInfo::isFrameExist ( )

query wether the frame exist. usually the frame exist when the frame info exist, but there might be some garbage collection errors, during development. this method is to make sure that the frame dose exist.

Returns
wether the frame exist.

◆ load()

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

Implements MVSObject.

◆ save()

bool FrameObject::RelatedFrameInfo::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

Implements MVSObject.

◆ setRelatedFrame()

bool FrameObject::RelatedFrameInfo::setRelatedFrame ( FrameObject::Ptr  frame)

set the shared pointer of related frame.

Parameters
frame
Returns

◆ type_name()

std::string FrameObject::RelatedFrameInfo::type_name ( )
overridevirtual

get the typename.

Returns

Reimplemented from MVSObject.

Member Data Documentation

◆ Pose

std::shared_ptr<Sophus::SE3d> FrameObject::RelatedFrameInfo::Pose

shared pointer of pose.

the pose is the pose between current frame and related frame, many related frame may share the same pose, that is when in pose optimization process, all the pointer that point to the same pose will be optimized as one coeefficient.


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