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

#include <VocTreeMatcher.h>

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

Public Types

using Ptr = std::shared_ptr< VocTreeMatcher >
 
- Public Types inherited from FeatureMatcher
using Ptr = std::shared_ptr< FeatureMatcher >
 shared pointer type of FeatureMatcher
 
- Public Types inherited from WorkFlowObject
using DataQueue = std::queue< DataFlowObject::Ptr >
 
using Ptr = std::shared_ptr< WorkFlowObject >
 shared pointer of WorkFlowObject
 

Public Member Functions

 VocTreeMatcher (GlobalMapObject::Ptr GlobalMap)
 
bool Compute (FrameObject::Ptr frame, GlobalMapObject::Ptr GlobalMap=GlobalMapObject::Ptr()) override
 match the features of the current frame within the global map More...
 
virtual bool MatchRelatedFrame (FrameObject::Ptr frame, std::list< FrameObject::Ptr > &related, GlobalMapObject::Ptr GlobalMap=GlobalMapObject::Ptr()) override
 find related frames of input frame within the global map. More...
 
virtual bool MatchKeyPoints (FrameObject::Ptr frame) override
 find matched keypoints between the input frame and its related frame. More...
 
virtual bool MatchKeyPoints (FrameObject::Ptr queryFrames, FrameObject::Ptr trainFrames, std::vector< cv::DMatch > &matches) override
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 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...
 
bool clear () override
 clear the workflow state, the workflow should be re-init after clear. More...
 
virtual bool isInit () override
 check if the workflow is inited More...
 
- Public Member Functions inherited from FeatureMatcher
FeatureMatcher::Ptr Create (GlobalMapObject::Ptr GlobalMap)
 create shared pointer of FeatureMatcher More...
 
 FeatureMatcher (GlobalMapObject::Ptr GlobalMap)
 Construct a new Feature Matcher object. More...
 
virtual ~FeatureMatcher ()
 Destroy the Feature Matcher object.
 
std::string type_name () override
 get the typename. More...
 
virtual bool clear () override
 clear the workflow state, the workflow should be re-init after clear. More...
 
virtual bool Compute (FrameObject::Ptr frame, GlobalMapObject::Ptr GlobalMap=GlobalMapObject::Ptr())
 match the features of the current frame within the global map More...
 
virtual bool MatchRelatedFrame (FrameObject::Ptr frame, std::list< FrameObject::Ptr > &related, GlobalMapObject::Ptr GlobalMap=GlobalMapObject::Ptr())
 find related frames of input frame within the global map. More...
 
virtual bool MatchKeyPoints (FrameObject::Ptr frame)
 find matched keypoints between the input frame and its related frame. More...
 
virtual bool MatchKeyPoints (FrameObject::Ptr queryFrames, FrameObject::Ptr trainFrames, std::vector< cv::DMatch > &matches)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 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...
 
- Public Member Functions inherited from WorkFlowObject
 WorkFlowObject ()
 Construct a new Work Flow Object object.
 
virtual ~WorkFlowObject ()
 Destroy the Work Flow Object object.
 
virtual bool clear ()=0
 clear the workflow state, the workflow should be re-init after clear. More...
 
virtual bool isInit ()
 check if the workflow is inited More...
 
- 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 VocTreeMatcher::Ptr Create (GlobalMapObject::Ptr GlobalMap)
 

Public Attributes

std::string VocPath
 the path of vocabulary tree database.
 

Additional Inherited Members

- Public Slots inherited from FeatureMatcher
void Trigger () override
 
void Trigger (DataQueue data) override
 
- Public Slots inherited from WorkFlowObject
virtual void Trigger ()=0
 trigger one work load of the workflow with preload input and output settings.
 
virtual void Trigger (DataQueue data)=0
 trigger one work load of the workflow with input data. More...
 
- Signals inherited from WorkFlowObject
void Finished (DataQueue)
 the current work load of the workflow is finished, and the processeed data pointer is stored in the queue, the workflow can be assigned to new work load with trigger() method More...
 
void Finished ()
 the current work load of the workflow is finished, the workflow can be assigned to new work load with trigger() method
 
void Failed ()
 the current work failed.
 
void Error (std::string error)
 emit error message More...
 
void Progress (int progress)
 emit percentage of the work load 0-100 More...
 
void Warning (std::string warning)
 emit warning output message More...
 
void Info (std::string info)
 emit information output message More...
 
- 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 FeatureMatcher
GlobalMapObject::Ptr GlobalMap
 pointer of globalmap.
 
- Protected Attributes inherited from WorkFlowObject
bool m_isInit = false
 default indicator of wether the workflow is initialized, the workflow may or may not use this variable to indicate if its initialized, it depends on the implementation of isInit() method.
 

Detailed Description

VocabularyTree It uses image retrieval techniques to find images that share some content without the cost of resolving all feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all images descriptors very efficiently. If your scene contains less than "Voc Tree: Minimal Number of Images", all image pairs will be selected.

Member Function Documentation

◆ clear()

bool VocTreeMatcher::clear ( )
overridevirtual

clear the workflow state, the workflow should be re-init after clear.

Returns
true clear succeed
false clear failed

Reimplemented from FeatureMatcher.

◆ Compute()

bool VocTreeMatcher::Compute ( FrameObject::Ptr  frame,
GlobalMapObject::Ptr  GlobalMap = GlobalMapObject::Ptr() 
)
overridevirtual

match the features of the current frame within the global map

Parameters
frameinputoutput frame object
GlobalMapthe global map pointer, if the global map is empty, the method will use preloaded global map
Returns
true match succeed
false match failed or input parameter incorrect

Reimplemented from FeatureMatcher.

◆ isInit()

bool VocTreeMatcher::isInit ( )
overridevirtual

check if the workflow is inited

Returns
true inited
false not inited

Reimplemented from WorkFlowObject.

◆ load()

bool VocTreeMatcher::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 FeatureMatcher.

◆ MatchKeyPoints() [1/2]

bool VocTreeMatcher::MatchKeyPoints ( FrameObject::Ptr  frame)
overridevirtual

find matched keypoints between the input frame and its related frame.

Parameters
frameinputoutput frame object
Returns
if matched keypoints found

Reimplemented from FeatureMatcher.

◆ MatchKeyPoints() [2/2]

bool VocTreeMatcher::MatchKeyPoints ( FrameObject::Ptr  queryFrames,
FrameObject::Ptr  trainFrames,
std::vector< cv::DMatch > &  matches 
)
overridevirtual

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

Parameters
queryFramesquery frame
trainFramestrain frame
matcheskeypoint match info
Returns
if related frame found

Reimplemented from FeatureMatcher.

◆ MatchRelatedFrame()

bool VocTreeMatcher::MatchRelatedFrame ( FrameObject::Ptr  frame,
std::list< FrameObject::Ptr > &  related,
GlobalMapObject::Ptr  GlobalMap = GlobalMapObject::Ptr() 
)
overridevirtual

find related frames of input frame within the global map.

Parameters
frameinput frame object
relatedoutput related frame
theglobal map pointer, if the global map is empty, the method will use preloaded global map @ return if related frame found

Reimplemented from FeatureMatcher.

◆ save()

bool VocTreeMatcher::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 FeatureMatcher.


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