SLProject 4.0.000
WAISlamTrackPool Class Reference

#include <WAISlamTrackPool.h>

Inheritance diagram for WAISlamTrackPool:
[legend]

Classes

struct  Params
 

Public Member Functions

 WAISlamTrackPool (const cv::Mat &intrinsic, const cv::Mat &distortion, WAIOrbVocabulary *voc, KPextractor *iniExtractor, KPextractor *relocExtractor, KPextractor *extractor, std::unique_ptr< WAIMap > globalMap, Params params)
 
virtual ~WAISlamTrackPool ()
 
bool update (cv::Mat &imageGray)
 
virtual WAITrackingState getTrackingState ()
 
void changeIntrinsic (cv::Mat intrinsic, cv::Mat distortion)
 
cv::Mat getPose ()
 
void drawInfo (cv::Mat &imageBGR, float scale, bool showInitLine, bool showKeyPoints, bool showKeyPointsMatched)
 
virtual std::vector< WAIMapPoint * > getMapPoints ()
 
std::vector< WAIMapPoint * > getMatchedMapPoints ()
 

Private Member Functions

void createFrame (WAIFrame &frame, cv::Mat &imageGray)
 
void updatePose (WAIFrame &frame)
 

Private Attributes

Params _params
 
unsigned int _relocFrameCounter = 0
 
unsigned long _lastRelocFrameId = 0
 
unsigned long _lastKeyFrameFrameId = 0
 
KPextractor * _extractor = nullptr
 
KPextractor * _relocExtractor = nullptr
 
KPextractor * _iniExtractor = nullptr
 
int _infoMatchedInliners = 0
 
WAITrackingState _state
 
std::mutex _cameraExtrinsicMutex
 

Additional Inherited Members

- Static Public Member Functions inherited from WAISlamTools
static void drawKeyPointInfo (WAIFrame &frame, cv::Mat &image, float scale)
 
static void drawKeyPointMatches (WAIFrame &frame, cv::Mat &image, float scale)
 
static void drawInitInfo (WAIInitializerData &iniData, WAIFrame &frame, cv::Mat &imageBGR, float scale)
 
static bool initialize (WAIInitializerData &iniData, WAIFrame &frame, WAIOrbVocabulary *voc, LocalMap &localMap, int mapPointsNeeded=100)
 
static bool genInitialMap (WAIMap *globalMap, LocalMapping *localMapper, LoopClosing *loopCloser, LocalMap &localMap)
 
static bool oldInitialize (WAIFrame &frame, WAIInitializerData &iniData, WAIMap *map, LocalMap &localMap, LocalMapping *localMapper, LoopClosing *loopCloser, WAIOrbVocabulary *voc, int mapPointsNeeded=100)
 
static int findFrameFixedMapMatches (WAIFrame &frame, WAIMap *waiMap, std::vector< cv::Point2f > &points2d, std::vector< cv::Point3f > &points3d)
 
static bool relocalization (WAIFrame &currentFrame, WAIMap *waiMap, LocalMap &localMap, float minCommonWordFactor, int &inliers, bool minAccScoreFilter=false)
 
static bool relocalizationGPS (WAIFrame &currentFrame, WAIMap *waiMap, LocalMap &localMap, cv::Mat locENU, cv::Mat dirENU, float minCommonWordFactor, int &inliers, bool minAccScoreFilter)
 
static bool tracking (WAIMap *map, LocalMap &localMap, WAIFrame &frame, WAIFrame &lastFrame, int lastRelocFrameId, cv::Mat &velocity, int &inliers)
 
static bool strictTracking (WAIMap *map, LocalMap &localMap, WAIFrame &frame, WAIFrame &lastFrame, int lastRelocFrameId, int &inliers)
 
static bool trackLocalMap (LocalMap &localMap, WAIFrame &frame, int lastRelocFrameId, int &inliers)
 
static void mapping (WAIMap *map, LocalMap &localMap, LocalMapping *localMapper, WAIFrame &frame, int inliers, const unsigned long lastRelocFrameId, unsigned long &lastKeyFrameFrameId)
 
static void strictMapping (WAIMap *map, LocalMap &localMap, LocalMapping *localMapper, WAIFrame &frame, int inliers, const unsigned long lastRelocFrameId, unsigned long &lastKeyFrameFrameId)
 
static void motionModel (WAIFrame &frame, WAIFrame &lastFrame, cv::Mat &velocity, cv::Mat &pose)
 
static bool trackReferenceKeyFrame (LocalMap &map, WAIFrame &lastFrame, WAIFrame &frame)
 
static bool strictTrackReferenceKeyFrame (LocalMap &map, WAIFrame &lastFrame, WAIFrame &frame)
 
static bool trackWithMotionModel (cv::Mat velocity, WAIFrame &previousFrame, WAIFrame &frame)
 
static void updateLocalMap (WAIFrame &frame, LocalMap &localMap)
 
static int trackLocalMapPoints (LocalMap &localMap, int lastRelocFrameId, WAIFrame &frame)
 
static bool needNewKeyFrame (WAIMap *globalMap, LocalMap &localMap, LocalMapping *localMapper, WAIFrame &frame, int nInliners, const unsigned long lastRelocFrameId, const unsigned long lastKeyFrameFrameId)
 
static bool strictNeedNewKeyFrame (WAIMap *map, LocalMap &localMap, LocalMapping *localMapper, WAIFrame &frame, int nInliers, const unsigned long lastRelocFrameId, const unsigned long lastKeyFrameFrameId)
 
static void createNewKeyFrame (LocalMapping *localMapper, LocalMap &localMap, WAIMap *globalMap, WAIFrame &frame, unsigned long &lastKeyFrameFrameId)
 
static WAIFrame createMarkerFrame (std::string markerFile, KPextractor *markerExtractor, const cv::Mat &markerCameraIntrinsic, WAIOrbVocabulary *voc)
 
static bool findMarkerHomography (WAIFrame &markerFrame, WAIKeyFrame *kfCand, cv::Mat &homography, int minMatches)
 
static bool doMarkerMapPreprocessing (std::string markerFile, cv::Mat &nodeTransform, float markerWidthInM, KPextractor *markerExtractor, WAIMap *map, const cv::Mat &markerCameraIntrinsic, WAIOrbVocabulary *voc)
 
static bool detectCycle (WAIKeyFrame *kf, std::set< WAIKeyFrame * > &visitedNode)
 
static bool checkKFConnectionsTree (WAIMap *map)
 
- Protected Member Functions inherited from WAISlamTools
virtual ~WAISlamTools ()
 
 WAISlamTools ()
 
- Static Protected Member Functions inherited from WAISlamTools
static void countReprojectionOutliers (WAIFrame &frame, unsigned int &m, unsigned int &n, unsigned int &outliers)
 
- Protected Attributes inherited from WAISlamTools
cv::Mat _distortion
 
cv::Mat _cameraIntrinsic
 
cv::Mat _cameraExtrinsic
 
cv::Mat _cameraExtrinsicGuess
 
WAIInitializerData _iniData
 
WAIFrame _lastFrame
 
std::unique_ptr< WAIMap_globalMap
 
LocalMap _localMap
 
WAIOrbVocabulary_voc = nullptr
 
cv::Mat _velocity
 
bool _initialized = false
 
LocalMapping * _localMapping = nullptr
 
LoopClosing * _loopClosing = nullptr
 
std::thread * _processNewKeyFrameThread = nullptr
 
std::vector< std::thread * > _mappingThreads
 
std::thread * _loopClosingThread = nullptr
 

Constructor & Destructor Documentation

◆ WAISlamTrackPool()

WAISlamTrackPool::WAISlamTrackPool ( const cv::Mat &  intrinsic,
const cv::Mat &  distortion,
WAIOrbVocabulary voc,
KPextractor *  iniExtractor,
KPextractor *  relocExtractor,
KPextractor *  extractor,
std::unique_ptr< WAIMap globalMap,
WAISlamTrackPool::Params  params 
)

◆ ~WAISlamTrackPool()

WAISlamTrackPool::~WAISlamTrackPool ( )
virtual

Member Function Documentation

◆ changeIntrinsic()

void WAISlamTrackPool::changeIntrinsic ( cv::Mat  intrinsic,
cv::Mat  distortion 
)

◆ createFrame()

void WAISlamTrackPool::createFrame ( WAIFrame frame,
cv::Mat &  imageGray 
)
private

◆ drawInfo()

void WAISlamTrackPool::drawInfo ( cv::Mat &  imageBGR,
float  scale,
bool  showInitLine,
bool  showKeyPoints,
bool  showKeyPointsMatched 
)

◆ getMapPoints()

virtual std::vector< WAIMapPoint * > WAISlamTrackPool::getMapPoints ( )
inlinevirtual

◆ getMatchedMapPoints()

std::vector< WAIMapPoint * > WAISlamTrackPool::getMatchedMapPoints ( )

◆ getPose()

cv::Mat WAISlamTrackPool::getPose ( )

◆ getTrackingState()

virtual WAITrackingState WAISlamTrackPool::getTrackingState ( )
inlinevirtual

◆ update()

bool WAISlamTrackPool::update ( cv::Mat &  imageGray)

◆ updatePose()

void WAISlamTrackPool::updatePose ( WAIFrame frame)
private

Member Data Documentation

◆ _cameraExtrinsicMutex

std::mutex WAISlamTrackPool::_cameraExtrinsicMutex
private

◆ _extractor

KPextractor* WAISlamTrackPool::_extractor = nullptr
private

◆ _infoMatchedInliners

int WAISlamTrackPool::_infoMatchedInliners = 0
private

◆ _iniExtractor

KPextractor* WAISlamTrackPool::_iniExtractor = nullptr
private

◆ _lastKeyFrameFrameId

unsigned long WAISlamTrackPool::_lastKeyFrameFrameId = 0
private

◆ _lastRelocFrameId

unsigned long WAISlamTrackPool::_lastRelocFrameId = 0
private

◆ _params

Params WAISlamTrackPool::_params
private

◆ _relocExtractor

KPextractor* WAISlamTrackPool::_relocExtractor = nullptr
private

◆ _relocFrameCounter

unsigned int WAISlamTrackPool::_relocFrameCounter = 0
private

◆ _state

WAITrackingState WAISlamTrackPool::_state
private

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