41 #ifndef INCLUDE_OKVIS_VIOKEYFRAMEWINDOWMATCHINGALGORITHM_HPP_ 
   42 #define INCLUDE_OKVIS_VIOKEYFRAMEWINDOWMATCHINGALGORITHM_HPP_ 
   52 #include <brisk/internal/hamming.h> 
   61 template<
class CAMERA_GEOMETRY_T>
 
   64   EIGEN_MAKE_ALIGNED_OPERATOR_NEW
 
   83                                      bool usePoseUncertainty = 
true);
 
   94   void setFrames(uint64_t mfIdA, uint64_t mfIdB, 
size_t camIdA, 
size_t camIdB);
 
  106   virtual size_t sizeA() 
const;
 
  108   virtual size_t sizeB() 
const;
 
  116   virtual bool skipA(
size_t indexA)
 const {
 
  121   virtual bool skipB(
size_t indexB)
 const {
 
  132   virtual float distance(
size_t indexA, 
size_t indexB)
 const {
 
  143     return std::numeric_limits<float>::max();
 
  147   bool verifyMatch(
size_t indexA, 
size_t indexB) 
const;
 
  247       const unsigned char * descriptorA,
 
  248       const unsigned char * descriptorB)
 const {
 
  250         Exception, descriptorA != NULL && descriptorB != NULL,
 
  251         "Trying to compare a descriptor with a null description vector");
 
  253     return brisk::Hamming::PopcntofXORed(descriptorA, descriptorB, 3);
 
bool isRelativeUncertaintyValid()
assess the validity of the relative uncertainty computation. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:166
virtual bool skipB(size_t indexB) const 
Should we skip the item in list B? This will be called many times. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:121
The estimator class. 
Definition: Estimator.hpp:77
virtual size_t sizeA() const 
What is the size of list A? 
Definition: VioKeyframeWindowMatchingAlgorithm.cpp:280
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...
Definition: VioKeyframeWindowMatchingAlgorithm.cpp:363
std::shared_ptr< okvis::MultiFrame > frameA_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:181
size_t camIdB_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:179
okvis::kinematics::Transformation T_SaW_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:197
okvis::kinematics::Transformation T_WCa_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:199
std::shared_ptr< okvis::MultiFrame > frameB_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:182
bool usePoseUncertainty_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:242
#define OKVIS_ASSERT_LT_DBG(exceptionType, value, upperBound, message)
Definition: assert_macros.hpp:240
std::vector< bool > skipB_
Should keypoint[index] in frame B be skipped. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:226
size_t numMatches()
Get the number of matches. 
Definition: VioKeyframeWindowMatchingAlgorithm.cpp:350
okvis::kinematics::Transformation T_WCb_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:200
virtual void doSetup()
This will be called exactly once for each call to DenseMatcher::match(). 
Definition: VioKeyframeWindowMatchingAlgorithm.cpp:122
virtual ~VioKeyframeWindowMatchingAlgorithm()
Definition: VioKeyframeWindowMatchingAlgorithm.cpp:70
okvis::kinematics::Transformation T_CaCb_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:191
Eigen::Matrix< double, Eigen::Dynamic, 2 > projectionsIntoBUncertainties_
temporarily store all projection uncertainties 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:221
okvis::kinematics::Transformation T_SaCa_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:193
okvis::kinematics::Transformation T_CbCa_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:192
Header file for the MatchingAlgorithm class. 
Header file for the MultiFrame class. 
uint64_t mfIdB_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:177
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef CAMERA_GEOMETRY_T camera_geometry_t
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:67
okvis::kinematics::Transformation T_SbCb_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:194
okvis::Estimator * estimator_
This is essentially the map. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:172
an interface for 1-1 matching between lists of things. 
Definition: MatchingAlgorithm.hpp:66
double fA_
Focal length of camera used in frame A. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:211
virtual float distanceThreshold() const 
Get the distance threshold for which matches exceeding it will not be returned as matches...
Definition: VioKeyframeWindowMatchingAlgorithm.cpp:298
std::vector< double > raySigmasA_
Temporarily store ray sigmas of frame A. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:234
size_t numMatches_
The number of matches. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:206
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. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:116
okvis::kinematics::Transformation T_CaW_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:201
uint32_t specificDescriptorDistance(const unsigned char *descriptorA, const unsigned char *descriptorB) const 
Calculates the distance between two descriptors. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:246
okvis::triangulation::ProbabilisticStereoTriangulator< camera_geometry_t > probabilisticStereoTriangulator_
Stereo triangulator. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:239
A MatchingAlgorithm implementation. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:62
virtual size_t sizeB() const 
What is the size of list B? 
Definition: VioKeyframeWindowMatchingAlgorithm.cpp:285
uint64_t mfIdA_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:176
Eigen::Vector3d pA_W_
Camera center of frame A. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:229
#define OKVIS_DEFINE_EXCEPTION(exceptionName, exceptionParent)
Macro for defining an exception with a given parent. 
Definition: assert_macros.hpp:52
virtual void reserveMatches(size_t numMatches)
A function that tells you how many times setMatching() will be called. 
Definition: VioKeyframeWindowMatchingAlgorithm.cpp:343
void setMatchingType(int matchingType)
Set the matching type. 
Definition: VioKeyframeWindowMatchingAlgorithm.cpp:115
Header file for the DenseMatcher class. 
okvis::kinematics::Transformation T_WSa_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:195
size_t camIdA_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:178
void setFrames(uint64_t mfIdA, uint64_t mfIdB, size_t camIdA, size_t camIdB)
Set which frames to match. 
Definition: VioKeyframeWindowMatchingAlgorithm.cpp:76
size_t numUncertainMatches_
The number of uncertain matches. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:208
std::vector< bool > skipA_
Should keypoint[index] in frame A be skipped. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:224
VioKeyframeWindowMatchingAlgorithm(okvis::Estimator &estimator, int matchingType, float distanceThreshold, bool usePoseUncertainty=true)
Constructor. 
Definition: VioKeyframeWindowMatchingAlgorithm.cpp:60
Header file for the ProbabilisticStereoTriangulator class. 
Eigen::Vector3d pB_W_
Camera center of frame B. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:231
void setDistanceThreshold(float distanceThreshold)
Set the distance threshold for which matches exceeding it will not be returned as matches...
Definition: VioKeyframeWindowMatchingAlgorithm.cpp:291
float distanceThreshold_
Distances above this threshold will not be returned as matches. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:186
okvis::kinematics::Transformation T_CbW_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:202
okvis::kinematics::Transformation T_SbW_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:198
MatchingTypes
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:69
std::vector< double > raySigmasB_
Temporarily store ray sigmas of frame B. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:236
const okvis::Matches & getMatches() const 
access the matching result. 
Header file for the Estimator class. This does all the backend work. 
virtual float distance(size_t indexA, size_t indexB) const 
Calculate the distance between two keypoints. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:132
int matchingType_
Stored the matching type. See MatchingTypes(). 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:216
bool validRelativeUncertainty_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:241
Eigen::Matrix< double, Eigen::Dynamic, 2 > projectionsIntoB_
temporarily store all projections 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:219
std::vector< Match > Matches
Definition: FrameTypedefs.hpp:134
okvis::kinematics::Transformation T_WSb_
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:196
Match 3D position of established landmarks to 2D keypoint position. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:70
#define OKVIS_ASSERT_TRUE_DBG(exceptionType, condition, message)
Definition: assert_macros.hpp:211
Match 2D position of established landmarks to 2D keypoint position. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:71
bool verifyMatch(size_t indexA, size_t indexB) const 
Geometric verification of a match. 
Definition: VioKeyframeWindowMatchingAlgorithm.cpp:304
double fB_
Focal length of camera used in frame B. 
Definition: VioKeyframeWindowMatchingAlgorithm.hpp:213
This file contains useful typedefs and structs related to frames. 
size_t numUncertainMatches()
Get the number of uncertain matches. 
Definition: VioKeyframeWindowMatchingAlgorithm.cpp:356