OKVIS
|
A MatchingAlgorithm implementation. More...
#include <VioKeyframeWindowMatchingAlgorithm.hpp>
Public Types | |
enum | MatchingTypes { Match3D2D = 1, Match2D2D = 2 } |
Public Types inherited from okvis::MatchingAlgorithm | |
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 | |
VioKeyframeWindowMatchingAlgorithm (okvis::Estimator &estimator, int matchingType, float distanceThreshold, bool usePoseUncertainty=true) | |
Constructor. More... | |
virtual | ~VioKeyframeWindowMatchingAlgorithm () |
void | setFrames (uint64_t mfIdA, uint64_t mfIdB, size_t camIdA, size_t camIdB) |
Set which frames to match. More... | |
void | setMatchingType (int matchingType) |
Set the matching type. More... | |
virtual void | doSetup () |
This will be called exactly once for each call to DenseMatcher::match(). More... | |
virtual size_t | sizeA () const |
What is the size of list A? More... | |
virtual size_t | sizeB () const |
What is the size of list B? More... | |
virtual float | distanceThreshold () const |
Get the distance threshold for which matches exceeding it will not be returned as matches. More... | |
void | setDistanceThreshold (float distanceThreshold) |
Set the distance threshold for which matches exceeding it will not be returned as matches. More... | |
virtual bool | skipA (size_t indexA) 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 indexB) 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 |
Calculate the distance between two keypoints. More... | |
bool | verifyMatch (size_t indexA, size_t indexB) const |
Geometric verification of a match. More... | |
virtual void | reserveMatches (size_t numMatches) |
A function that tells you how many times setMatching() will be called. More... | |
virtual void | setBestMatch (size_t indexA, size_t indexB, double distance) |
At the end of the matching step, this function is called once for each pair of matches discovered. More... | |
size_t | numMatches () |
Get the number of matches. More... | |
size_t | numUncertainMatches () |
Get the number of uncertain matches. More... | |
const okvis::Matches & | getMatches () const |
access the matching result. More... | |
bool | isRelativeUncertaintyValid () |
assess the validity of the relative uncertainty computation. More... | |
Public Member Functions inherited from okvis::MatchingAlgorithm | |
MatchingAlgorithm () | |
virtual | ~MatchingAlgorithm () |
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 | distanceRatioThreshold () const |
By which factor does the first best match has to be better than the second best one. More... | |
float | matchFailed () const |
What to return if the match failed. More... | |
Public Attributes | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef CAMERA_GEOMETRY_T | camera_geometry_t |
Private Member Functions | |
uint32_t | specificDescriptorDistance (const unsigned char *descriptorA, const unsigned char *descriptorB) const |
Calculates the distance between two descriptors. More... | |
Private Attributes | |
okvis::Estimator * | estimator_ |
This is essentially the map. More... | |
float | distanceThreshold_ |
Distances above this threshold will not be returned as matches. More... | |
size_t | numMatches_ = 0 |
The number of matches. More... | |
size_t | numUncertainMatches_ = 0 |
The number of uncertain matches. More... | |
double | fA_ = 0 |
Focal length of camera used in frame A. More... | |
double | fB_ = 0 |
Focal length of camera used in frame B. More... | |
int | matchingType_ |
Stored the matching type. See MatchingTypes(). More... | |
Eigen::Matrix< double, Eigen::Dynamic, 2 > | projectionsIntoB_ |
temporarily store all projections More... | |
Eigen::Matrix< double, Eigen::Dynamic, 2 > | projectionsIntoBUncertainties_ |
temporarily store all projection uncertainties More... | |
std::vector< bool > | skipA_ |
Should keypoint[index] in frame A be skipped. More... | |
std::vector< bool > | skipB_ |
Should keypoint[index] in frame B be skipped. More... | |
Eigen::Vector3d | pA_W_ |
Camera center of frame A. More... | |
Eigen::Vector3d | pB_W_ |
Camera center of frame B. More... | |
std::vector< double > | raySigmasA_ |
Temporarily store ray sigmas of frame A. More... | |
std::vector< double > | raySigmasB_ |
Temporarily store ray sigmas of frame B. More... | |
okvis::triangulation::ProbabilisticStereoTriangulator < camera_geometry_t > | probabilisticStereoTriangulator_ |
Stereo triangulator. More... | |
bool | validRelativeUncertainty_ = false |
bool | usePoseUncertainty_ = false |
Which frames to take | |
uint64_t | mfIdA_ = 0 |
uint64_t | mfIdB_ = 0 |
size_t | camIdA_ = 0 |
size_t | camIdB_ = 0 |
std::shared_ptr < okvis::MultiFrame > | frameA_ |
std::shared_ptr < okvis::MultiFrame > | frameB_ |
Store some transformations that are often used | |
use a fully relative formulation | |
okvis::kinematics::Transformation | T_CaCb_ |
okvis::kinematics::Transformation | T_CbCa_ |
okvis::kinematics::Transformation | T_SaCa_ |
okvis::kinematics::Transformation | T_SbCb_ |
okvis::kinematics::Transformation | T_WSa_ |
okvis::kinematics::Transformation | T_WSb_ |
okvis::kinematics::Transformation | T_SaW_ |
okvis::kinematics::Transformation | T_SbW_ |
okvis::kinematics::Transformation | T_WCa_ |
okvis::kinematics::Transformation | T_WCb_ |
okvis::kinematics::Transformation | T_CaW_ |
okvis::kinematics::Transformation | T_CbW_ |
A MatchingAlgorithm implementation.
CAMERA_GEOMETRY_T | Camera geometry model. See also okvis::cameras::CameraBase. |
enum okvis::VioKeyframeWindowMatchingAlgorithm::MatchingTypes |
okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >::VioKeyframeWindowMatchingAlgorithm | ( | okvis::Estimator & | estimator, |
int | matchingType, | ||
float | distanceThreshold, | ||
bool | usePoseUncertainty = true |
||
) |
Constructor.
estimator | Estimator. |
matchingType | Matching type. See MatchingTypes enum. |
distanceThreshold | Descriptor distance threshold. |
usePoseUncertainty | Use the pose uncertainty for matching. |
|
virtual |
|
inlinevirtual |
Calculate the distance between two keypoints.
indexA | Index of the first keypoint. |
indexB | Index of the other keypoint. |
Implements okvis::MatchingAlgorithm.
|
virtual |
Get the distance threshold for which matches exceeding it will not be returned as matches.
Reimplemented from okvis::MatchingAlgorithm.
|
virtual |
This will be called exactly once for each call to DenseMatcher::match().
Reimplemented from okvis::MatchingAlgorithm.
const okvis::Matches& okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >::getMatches | ( | ) | const |
access the matching result.
|
inline |
assess the validity of the relative uncertainty computation.
size_t okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >::numMatches | ( | ) |
Get the number of matches.
size_t okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >::numUncertainMatches | ( | ) |
Get the number of uncertain matches.
|
virtual |
A function that tells you how many times setMatching() will be called.
Implements okvis::MatchingAlgorithm.
|
virtual |
At the end of the matching step, this function is called once for each pair of matches discovered.
Implements okvis::MatchingAlgorithm.
void okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >::setDistanceThreshold | ( | float | distanceThreshold | ) |
Set the distance threshold for which matches exceeding it will not be returned as matches.
void okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >::setFrames | ( | uint64_t | mfIdA, |
uint64_t | mfIdB, | ||
size_t | camIdA, | ||
size_t | camIdB | ||
) |
Set which frames to match.
mfIdA | The multiframe ID to match against. |
mfIdB | The new multiframe ID. |
camIdA | ID of the frame inside multiframe A to match. |
camIdB | ID of the frame inside multiframe B to match. |
void okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >::setMatchingType | ( | int | matchingType | ) |
Set the matching type.
|
virtual |
What is the size of list A?
Implements okvis::MatchingAlgorithm.
|
virtual |
What is the size of list B?
Implements okvis::MatchingAlgorithm.
|
inlinevirtual |
Should we skip the item in list A? This will be called once for each item in the list.
Reimplemented from okvis::MatchingAlgorithm.
|
inlinevirtual |
Should we skip the item in list B? This will be called many times.
Reimplemented from okvis::MatchingAlgorithm.
|
inlineprivate |
Calculates the distance between two descriptors.
bool okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >::verifyMatch | ( | size_t | indexA, |
size_t | indexB | ||
) | const |
Geometric verification of a match.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef CAMERA_GEOMETRY_T okvis::VioKeyframeWindowMatchingAlgorithm< CAMERA_GEOMETRY_T >::camera_geometry_t |
|
private |
|
private |
|
private |
Distances above this threshold will not be returned as matches.
|
private |
This is essentially the map.
|
private |
Focal length of camera used in frame A.
|
private |
Focal length of camera used in frame B.
|
private |
|
private |
|
private |
Stored the matching type. See MatchingTypes().
|
private |
|
private |
|
private |
The number of matches.
|
private |
The number of uncertain matches.
|
private |
Camera center of frame A.
|
private |
Camera center of frame B.
|
private |
Stereo triangulator.
|
private |
temporarily store all projections
|
private |
temporarily store all projection uncertainties
|
private |
Temporarily store ray sigmas of frame A.
|
private |
Temporarily store ray sigmas of frame B.
|
private |
Should keypoint[index] in frame A be skipped.
|
private |
Should keypoint[index] in frame B be skipped.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |