OKVIS
|
an interface for 1-1 matching between lists of things. More...
#include <MatchingAlgorithm.hpp>
Public Types | |
typedef std::shared_ptr < MatchingAlgorithm > | Ptr |
typedef std::multimap< size_t, size_t > | listB_tree_structure_t |
Tree data structure for image space restricted matching mapping from image row to list of features (indices!) More... | |
Public Member Functions | |
MatchingAlgorithm () | |
virtual | ~MatchingAlgorithm () |
virtual void | doSetup () |
This will be called exactly once for each call to DenseMatcher::match() More... | |
virtual size_t | sizeA () const =0 |
What is the size of list A? More... | |
virtual size_t | sizeB () const =0 |
What is the size of list B? More... | |
virtual listB_tree_structure_t::iterator | getListBStartIterator (size_t indexA) |
Get begin iterator for elements of listB to be matched against the given element from list A (indexA) for a given index of listA, get an iterator into the listB multimap to the start of all elements in listB that should be matched against indexA note: implement this in your matching algorithm subclass. More... | |
virtual listB_tree_structure_t::iterator | getListBEndIterator (size_t indexA) |
Get end iterator for elements of listB to be matched against the given element from list A (indexA) for a given index of listA, get an iterator into the listB multimap to the end of all elements in listB that should be matched against indexA. More... | |
virtual float | distanceThreshold () const |
Distances above this threshold will not be returned as matches. More... | |
virtual float | distanceRatioThreshold () const |
By which factor does the first best match has to be better than the second best one. More... | |
virtual bool | skipA (size_t) const |
Should we skip the item in list A? This will be called once for each item in the list. More... | |
virtual bool | skipB (size_t) const |
Should we skip the item in list B? This will be called many times. More... | |
virtual float | distance (size_t indexA, size_t indexB) const =0 |
The "distance" between the two points. For points that absolutely don't match. Please use float max. More... | |
virtual void | reserveMatches (size_t numMatches)=0 |
A function that tells you how many times setBestMatch() will be called. More... | |
virtual void | setBestMatch (size_t indexA, size_t indexB, double distance)=0 |
At the end of the matching step, this function is called once for each pair of matches discovered. More... | |
float | matchFailed () const |
What to return if the match failed. More... | |
Private Attributes | |
listB_tree_structure_t | dummy_ |
an interface for 1-1 matching between lists of things.
This superclass defines the interface for a matching algorithm. Users of the DenseMatcher can implement a child class or simply reimplement the interface and call the templated function in the dense matcher.
typedef std::multimap<size_t, size_t> okvis::MatchingAlgorithm::listB_tree_structure_t |
Tree data structure for image space restricted matching mapping from image row to list of features (indices!)
typedef std::shared_ptr<MatchingAlgorithm> okvis::MatchingAlgorithm::Ptr |
okvis::MatchingAlgorithm::MatchingAlgorithm | ( | ) |
|
virtual |
|
pure virtual |
The "distance" between the two points. For points that absolutely don't match. Please use float max.
Implemented in okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >, and TestMatchingAlgorithm.
|
inlinevirtual |
By which factor does the first best match has to be better than the second best one.
Reimplemented in TestMatchingAlgorithm.
|
inlinevirtual |
Distances above this threshold will not be returned as matches.
Reimplemented in okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >, and TestMatchingAlgorithm.
|
inlinevirtual |
This will be called exactly once for each call to DenseMatcher::match()
Reimplemented in okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >, and TestMatchingAlgorithm.
|
virtual |
Get end iterator for elements of listB to be matched against the given element from list A (indexA) for a given index of listA, get an iterator into the listB multimap to the end of all elements in listB that should be matched against indexA.
|
virtual |
Get begin iterator for elements of listB to be matched against the given element from list A (indexA) for a given index of listA, get an iterator into the listB multimap to the start of all elements in listB that should be matched against indexA note: implement this in your matching algorithm subclass.
|
inline |
What to return if the match failed.
|
pure virtual |
A function that tells you how many times setBestMatch() will be called.
Implemented in okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >, and TestMatchingAlgorithm.
|
pure virtual |
At the end of the matching step, this function is called once for each pair of matches discovered.
Implemented in okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >, and TestMatchingAlgorithm.
|
pure virtual |
What is the size of list A?
Implemented in okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >, and TestMatchingAlgorithm.
|
pure virtual |
What is the size of list B?
Implemented in okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >, and TestMatchingAlgorithm.
|
inlinevirtual |
Should we skip the item in list A? This will be called once for each item in the list.
Reimplemented in okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >, and TestMatchingAlgorithm.
|
inlinevirtual |
Should we skip the item in list B? This will be called many times.
Reimplemented in okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >, and TestMatchingAlgorithm.
|
private |