37 #include <DBoW2/BowVector.h>
38 #include <DBoW2/FeatureVector.h>
39 #include <opencv2/core/core.hpp>
46 using namespace ORB_SLAM2;
71 const std::vector<cv::KeyPoint>& vKeysUn,
72 const cv::Mat& descriptors,
76 const std::vector<float>& vScaleFactors,
77 const std::vector<float>& vLevelSigma2,
78 const std::vector<float>& vInvLevelSigma2,
89 void SetPose(
const cv::Mat& Tcw);
91 cv::Mat GetPoseInverse();
92 cv::Mat GetCameraCenter();
93 cv::Mat GetRotation();
94 cv::Mat GetTranslation();
103 void FindAndUpdateConnections(
bool buildSpanningTree =
true);
104 void UpdateConnections(std::map<WAIKeyFrame*, int> KFcounter,
bool buildSpanningTree);
105 void UpdateBestCovisibles();
106 std::set<WAIKeyFrame*> GetConnectedKeyFrames();
107 std::vector<WAIKeyFrame*> GetVectorCovisibleKeyFrames();
108 std::vector<WAIKeyFrame*> GetBestCovisibilityKeyFrames(
const int& N);
109 std::vector<WAIKeyFrame*> GetCovisiblesByWeight(
const int& w);
112 const std::map<WAIKeyFrame*, int>& GetConnectedKfWeights();
118 std::set<WAIKeyFrame*> GetChilds();
124 std::set<WAIKeyFrame*> GetLoopEdges();
129 void EraseMapPointMatch(
const size_t& idx);
130 void ReplaceMapPointMatch(
const size_t& idx,
WAIMapPoint* pMP);
131 std::set<WAIMapPoint*> GetMapPoints();
132 std::vector<WAIMapPoint*> GetMapPointMatches();
133 int TrackedMapPoints(
const int& minObs);
137 bool isFixed()
const;
140 std::vector<size_t> GetFeaturesInArea(
const float& x,
const float& y,
const float& r)
const;
143 bool IsInImage(
const float& x,
const float& y)
const;
156 float ComputeSceneMedianDepth(
const int q);
169 size_t getSizeOfCvMat(
const cv::Mat& mat);
181 const bool _fixed =
false;
199 long unsigned int mnMarker[7];
202 long unsigned int mnLoopQuery = 0;
204 float mLoopScore = -1.0;
205 long unsigned int mnRelocQuery = 0;
206 int mnRelocWords = 0;
207 float mRelocScore = -1.0f;
214 const float fx, fy,
cx, cy, invfx, invfy;
275 bool mbFirstConnection =
true;
298 cv::Mat getObjectMatrix();
303 void AssignFeaturesToGrid();
305 bool PosInGrid(
const cv::KeyPoint& kp,
int& posX,
int& posY);
AR Keyframe database class.
std::vector< int > mvOrderedWeights
std::string _pathToTexture
std::mutex mMutexConnections
const std::vector< float > mvInvLevelSigma2
const float mfGridElementHeightInv
std::vector< WAIMapPoint * > mvpMapPoints
void setTexturePath(const std::string &path)
std::set< WAIKeyFrame * > mspLoopEdges
static bool weightComp(int a, int b)
const std::vector< float > mvScaleFactors
const long unsigned int mnFrameId
std::map< WAIKeyFrame *, int > mConnectedKeyFrameWeights
const float mfScaleFactor
const std::vector< cv::KeyPoint > mvKeysUn
const float mfGridElementWidthInv
std::mutex mMutexFeatures
std::vector< WAIKeyFrame * > mvpOrderedConnectedKeyFrames
const std::vector< float > mvLevelSigma2
const std::string & getTexturePath()
std::set< WAIKeyFrame * > mspChildrens
const cv::Mat mDescriptors
const float mfLogScaleFactor
static bool lId(WAIKeyFrame *pKF1, WAIKeyFrame *pKF2)
static long unsigned int nNextId