OKVIS ROS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Attributes | List of all members
okvis::MatchingAlgorithm Class Referenceabstract

an interface for 1-1 matching between lists of things. More...

#include <MatchingAlgorithm.hpp>

Inheritance diagram for okvis::MatchingAlgorithm:
okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T > TestMatchingAlgorithm

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_
 

Detailed Description

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.

Member Typedef Documentation

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!)

Constructor & Destructor Documentation

okvis::MatchingAlgorithm::MatchingAlgorithm ( )
okvis::MatchingAlgorithm::~MatchingAlgorithm ( )
virtual

Member Function Documentation

virtual float okvis::MatchingAlgorithm::distance ( size_t  indexA,
size_t  indexB 
) const
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.

virtual float okvis::MatchingAlgorithm::distanceRatioThreshold ( ) const
inlinevirtual

By which factor does the first best match has to be better than the second best one.

Reimplemented in TestMatchingAlgorithm.

virtual float okvis::MatchingAlgorithm::distanceThreshold ( ) const
inlinevirtual

Distances above this threshold will not be returned as matches.

Reimplemented in okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >, and TestMatchingAlgorithm.

virtual void okvis::MatchingAlgorithm::doSetup ( )
inlinevirtual

This will be called exactly once for each call to DenseMatcher::match()

Reimplemented in okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >, and TestMatchingAlgorithm.

MatchingAlgorithm::listB_tree_structure_t::iterator okvis::MatchingAlgorithm::getListBEndIterator ( size_t  indexA)
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.

MatchingAlgorithm::listB_tree_structure_t::iterator okvis::MatchingAlgorithm::getListBStartIterator ( size_t  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.

float okvis::MatchingAlgorithm::matchFailed ( ) const
inline

What to return if the match failed.

virtual void okvis::MatchingAlgorithm::reserveMatches ( size_t  numMatches)
pure virtual

A function that tells you how many times setBestMatch() will be called.

Implemented in okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >, and TestMatchingAlgorithm.

virtual void okvis::MatchingAlgorithm::setBestMatch ( size_t  indexA,
size_t  indexB,
double  distance 
)
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.

virtual size_t okvis::MatchingAlgorithm::sizeA ( ) const
pure virtual
virtual size_t okvis::MatchingAlgorithm::sizeB ( ) const
pure virtual
virtual bool okvis::MatchingAlgorithm::skipA ( size_t  ) const
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.

virtual bool okvis::MatchingAlgorithm::skipB ( size_t  ) const
inlinevirtual

Should we skip the item in list B? This will be called many times.

Reimplemented in okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >, and TestMatchingAlgorithm.

Member Data Documentation

listB_tree_structure_t okvis::MatchingAlgorithm::dummy_
private

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