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

this is the map point class, this class store sparse 3D point. More...

#include <MapPointObject.h>

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

Public Types

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

Public Member Functions

 MapPointObject ()
 Construct a new MapPointObject object. More...
 
 MapPointObject (int ID)
 Construct a new MapPointObject object. More...
 
 ~MapPointObject ()
 Destroy the MapPointObject object.
 
int getID ()
 Get the Frame ID. More...
 
int getObservedTimes ()
 Get the Observed Times. More...
 
bool addObservation (std::shared_ptr< FrameObject > Frame, int KeyPointID)
 add one observation More...
 
bool removeObservation (std::shared_ptr< FrameObject > Frame)
 remove one observation More...
 
bool updateObservation (std::shared_ptr< FrameObject > Frame, int KeyPointID=-1)
 update the observation info More...
 
bool getObservation (int FrameID, std::shared_ptr< FrameObject > &Frame, int &KeyPointID)
 Get the Observation object. More...
 
bool getAllObservation (std::set< std::shared_ptr< FrameObject > > &Frames)
 Get the All Observation object. More...
 
bool getAllObservation (std::set< int > &ids)
 Get all the Observation frame id. More...
 
bool setMapPointQuality (double quality)
 Set the Map Point Quality object. More...
 
double getMapPointQuality ()
 Get the Map Point Quality object. 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 Ptr Create (int ID)
 
- 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::Mat KeyPointDescriptor
 the discriptor of map point related 2D key point
 
Eigen::Vector4d Position
 the global coordinate of the map point
 
Eigen::Vector3d Normal
 the observation direction of the map point
 

Friends

std::ostream & operator<< (std::ostream &os, MapPointObject &obj)
 

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

this is the map point class, this class store sparse 3D point.

Constructor & Destructor Documentation

◆ MapPointObject() [1/2]

MapPointObject::MapPointObject ( )

Construct a new MapPointObject object.

Parameters
ID
Returns

◆ MapPointObject() [2/2]

MapPointObject::MapPointObject ( int  ID)

Construct a new MapPointObject object.

Parameters
IDMapPoint ID

Member Function Documentation

◆ addObservation()

bool MapPointObject::addObservation ( std::shared_ptr< FrameObject Frame,
int  KeyPointID 
)

add one observation

Parameters
Framethe frame of observation
KeyPointIDthe keypoint id of observation in the frame
Returns
true add succeed
false add failed

◆ Create()

MapPointObject::Ptr MapPointObject::Create ( int  ID)
static
Parameters
ID
Returns
Ptr

◆ getAllObservation() [1/2]

bool MapPointObject::getAllObservation ( std::set< int > &  ids)

Get all the Observation frame id.

Parameters
ids
Returns

◆ getAllObservation() [2/2]

bool MapPointObject::getAllObservation ( std::set< std::shared_ptr< FrameObject > > &  Frames)

Get the All Observation object.

Parameters
Framesvector of pointers of frame
Returns
true get succeed
false get failed

◆ getID()

int MapPointObject::getID ( )

Get the Frame ID.

Returns
int unique MapPoint ID

◆ getMapPointQuality()

double MapPointObject::getMapPointQuality ( )

Get the Map Point Quality object.

Returns
double the map point quality from 0 to 1

◆ getObservation()

bool MapPointObject::getObservation ( int  FrameID,
std::shared_ptr< FrameObject > &  Frame,
int &  KeyPointID 
)

Get the Observation object.

Parameters
FrameIDFrameID
Framethe shared pointer of frame
KeyPointIDthe keypoint id of observation in the frame
Returns
true get succeed
false get failed, may be the observation is not exist

◆ getObservedTimes()

int MapPointObject::getObservedTimes ( )

Get the Observed Times.

Returns
int the times of observation

◆ load()

bool MapPointObject::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.

◆ removeObservation()

bool MapPointObject::removeObservation ( std::shared_ptr< FrameObject Frame)

remove one observation

Parameters
Framethe frame of observation
Returns
true remove succeed
false remove failed

◆ save()

bool MapPointObject::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.

◆ setMapPointQuality()

bool MapPointObject::setMapPointQuality ( double  quality)

Set the Map Point Quality object.

Parameters
qualitythe mappoint quality from 0 to 1
Returns
true set succeed
false set faled

◆ type_name()

std::string MapPointObject::type_name ( )
overridevirtual

get the typename.

Returns

Reimplemented from MVSObject.

◆ updateObservation()

bool MapPointObject::updateObservation ( std::shared_ptr< FrameObject Frame,
int  KeyPointID = -1 
)

update the observation info

Parameters
Framethe pointer of oervation frame
KeyPointIDthe keypoint id of observation in the frame
Returns
true update succeed
false update failed, may be the observation is not exist, or input is invalid

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