NDEVR
API Documentation
FrameDrawer.h
1#if NDEVR_DRAW_SLAM
2#ifndef FRAMEDRAWER_H
3#define FRAMEDRAWER_H
4
5#include "OrbSLAM/Headers/Tracking.h"
6#include "OrbSLAM/Headers/MapPoint.h"
7#include "OrbSLAM/Headers/Atlas.h"
8
9#include <opencv2/core/core.hpp>
10#include <opencv2/features2d/features2d.hpp>
11
12#include <mutex>
13#include <unordered_set>
14
15
16namespace NDEVR
17{
18
19class Tracking;
20class Viewer;
21
27class FrameDrawer
28{
29public:
30 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
34 FrameDrawer(Atlas* pAtlas);
35
39 void Update(Tracking *pTracker);
40
45 cv::Mat DrawFrame(float imageScale=1.f);
50 cv::Mat DrawRightFrame(float imageScale=1.f);
51
52 bool both;
53
54protected:
55
61 void DrawTextInfo(cv::Mat &im, int nState, cv::Mat &imText);
62
63 cv::Mat mIm, mImRight;
64 int N;
65 PrimitiveAlignedBuffer<cv::KeyPoint, 32> mvCurrentKeys, mvCurrentKeysRight;
66 Buffer<bool> mvbMap, mvbVO;
67 bool mbOnlyTracking;
68 int mnTracked, mnTrackedVO;
69 PrimitiveAlignedBuffer<cv::KeyPoint, 32> mvIniKeys;
70 Buffer<int> mvIniMatches;
71 int mState;
72 Buffer<float> mvCurrentDepth;
73 float mThDepth;
74
75 Atlas* mpAtlas;
76
77 std::mutex mMutex;
78 Buffer<pair<cv::Point2f, cv::Point2f> > mvTracks;
79
80 Frame mCurrentFrame;
81 Buffer<MapPoint*> mvpLocalMap;
82 PrimitiveAlignedBuffer<cv::KeyPoint, 32> mvMatchedKeys;
83 Buffer<MapPoint*> mvpMatchedMPs;
84 PrimitiveAlignedBuffer<cv::KeyPoint, 32> mvOutlierKeys;
85 Buffer<MapPoint*> mvpOutlierMPs;
86
87 Dictionary<long unsigned int, cv::Point2f> mmProjectPoints;
88 Dictionary<long unsigned int, cv::Point2f> mmMatchedInImage;
89
90};
91
92} //namespace ORB_SLAM
93
94#endif // FRAMEDRAWER_H
95#endif
Main tracking thread that processes each frame and estimates camera pose.
Definition Tracking.h:33
The primary namespace for the NDEVR SDK.