SLAMflex SE  0.1.0
SLAMflex provides detection and tracking of dominant planes for smartphone devices. This plane can then be used to show AR content relative to the plane orientation. The detection of plane is performed in the field of view of the smartphone camera. In subsequent frames it is tracked. The interface returns the plane position and orientation.
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
MapMaker Class Reference

#include <MapMaker.h>

Inheritance diagram for MapMaker:
CVD::Thread CVD::Runnable

Classes

struct  Command
 

Public Member Functions

 MapMaker (Map &m, const ATANCamera &cam)
 
 ~MapMaker ()
 
bool InitFromStereo (KeyFrame &kFirst, KeyFrame &kSecond, std::vector< std::pair< CVD::ImageRef, CVD::ImageRef > > &vMatches, SE3<> &se3CameraPos)
 
bool InitFromStereo_OLD (KeyFrame &kFirst, KeyFrame &kSecond, std::vector< std::pair< CVD::ImageRef, CVD::ImageRef > > &vMatches, SE3<> &se3CameraPos)
 
void AddKeyFrame (KeyFrame &k)
 
void RequestReset ()
 
bool ResetDone ()
 
int QueueSize ()
 
bool NeedNewKeyFrame (KeyFrame &kCurrent)
 
bool IsDistanceToNearestKeyFrameExcessive (KeyFrame &kCurrent)
 
void SetSendMessageToUnity (SendMessage sm)
 

Protected Member Functions

virtual void run ()
 Override this method to do whatever it is the thread should do. More...
 
SE3 CalcPlaneAligner ()
 
void ApplyGlobalTransformationToMap (SE3<> se3NewFromOld)
 
void ApplyGlobalScaleToMap (double dScale)
 
void AddKeyFrameFromTopOfQueue ()
 
void ThinCandidates (KeyFrame &k, int nLevel)
 
void AddSomeMapPoints (int nLevel)
 
bool AddPointEpipolar (KeyFrame &kSrc, KeyFrame &kTarget, int nLevel, int nCandidate)
 
Vector< 3 > ReprojectPoint (SE3<> se3AfromB, const Vector< 2 > &v2A, const Vector< 2 > &v2B)
 
void BundleAdjust (std::set< KeyFrame * >, std::set< KeyFrame * >, std::set< MapPoint * >, bool)
 
void BundleAdjustAll ()
 
void BundleAdjustRecent ()
 
int ReFindInSingleKeyFrame (KeyFrame &k)
 
void ReFindFromFailureQueue ()
 
void ReFindNewlyMade ()
 
void ReFindAll ()
 
bool ReFind_Common (KeyFrame &k, MapPoint &p)
 
void SubPixelRefineMatches (KeyFrame &k, int nLevel)
 
void Reset ()
 
void HandleBadPoints ()
 
double DistToNearestKeyFrame (KeyFrame &kCurrent)
 
double KeyFrameLinearDist (KeyFrame &k1, KeyFrame &k2)
 
KeyFrameClosestKeyFrame (KeyFrame &k)
 
std::vector< KeyFrame * > NClosestKeyFrames (KeyFrame &k, unsigned int N)
 
void RefreshSceneDepth (KeyFrame *pKF)
 
void GUICommandHandler (std::string sCommand, std::string sParams)
 
- Protected Member Functions inherited from CVD::Thread
 Thread ()
 Construct a thread. If runnable != 0, use that runnable, else use our own "run" method. More...
 
virtual ~Thread ()
 This does not destroy the object until the thread has been terminated. More...
 
void start (Runnable *runnable=0)
 Start execution of "run" method in separate thread. More...
 
void stop ()
 Tell the thread to stop. More...
 
bool shouldStop () const
 Returns true if the stop() method been called, false otherwise. More...
 
bool isRunning () const
 Returns true if the thread is still running. More...
 
void join ()
 This blocks until the thread has actually terminated. More...
 
pthread_t getID ()
 Get the ID of this thread. More...
 
- Protected Member Functions inherited from CVD::Runnable
virtual ~Runnable ()
 

Static Protected Member Functions

static void GUICommandCallBack (void *ptr, std::string sCommand, std::string sParams)
 
- Static Protected Member Functions inherited from CVD::Thread
static unsigned int count ()
 Returns how many threads are actually running, not including the main thread. More...
 
static ThreadgetCurrent ()
 Returns a pointer to the currently running thread. More...
 
static void sleep (unsigned int milli)
 Tell the current thread to sleep for milli milliseconds. More...
 
static void yield ()
 Tell the current thread to yield the processor. More...
 

Protected Attributes

MapmMap
 
ATANCamera mCamera
 
std::vector< CommandmvQueuedCommands
 
std::vector< KeyFrame * > mvpKeyFrameQueue
 
std::vector< std::pair< KeyFrame *, MapPoint * > > mvFailureQueue
 
std::queue< MapPoint * > mqNewQueue
 
double mdWiggleScale
 
double mgvdWiggleScale
 
double mdWiggleScaleDepthNormalized
 
bool mbBundleConverged_Full
 
bool mbBundleConverged_Recent
 
bool mbResetRequested
 
bool mbResetDone
 
bool mbBundleAbortRequested
 
bool mbBundleRunning
 
bool mbBundleRunningIsRecent
 
SendMessage sendStringToUnity
 
int counterForConvergence
 
int counterForConvergenceLimit
 

Detailed Description

Definition at line 39 of file MapMaker.h.

Constructor & Destructor Documentation

MapMaker::MapMaker ( Map m,
const ATANCamera cam 
)

Definition at line 29 of file MapMaker.cpp.

MapMaker::~MapMaker ( )

Definition at line 160 of file MapMaker.cpp.

Member Function Documentation

void MapMaker::AddKeyFrame ( KeyFrame k)

Definition at line 453 of file MapMaker.cpp.

void MapMaker::AddKeyFrameFromTopOfQueue ( )
protected

Definition at line 464 of file MapMaker.cpp.

bool MapMaker::AddPointEpipolar ( KeyFrame kSrc,
KeyFrame kTarget,
int  nLevel,
int  nCandidate 
)
protected

Definition at line 497 of file MapMaker.cpp.

void MapMaker::AddSomeMapPoints ( int  nLevel)
protected

Definition at line 407 of file MapMaker.cpp.

void MapMaker::ApplyGlobalScaleToMap ( double  dScale)
protected

Definition at line 435 of file MapMaker.cpp.

void MapMaker::ApplyGlobalTransformationToMap ( SE3<>  se3NewFromOld)
protected

Definition at line 420 of file MapMaker.cpp.

void MapMaker::BundleAdjust ( std::set< KeyFrame * >  ,
std::set< KeyFrame * >  ,
std::set< MapPoint * >  ,
bool   
)
protected

Definition at line 789 of file MapMaker.cpp.

void MapMaker::BundleAdjustAll ( )
protected

Definition at line 718 of file MapMaker.cpp.

void MapMaker::BundleAdjustRecent ( )
protected

Definition at line 739 of file MapMaker.cpp.

SE3 MapMaker::CalcPlaneAligner ( )
protected

Definition at line 1052 of file MapMaker.cpp.

KeyFrame * MapMaker::ClosestKeyFrame ( KeyFrame k)
protected

Definition at line 680 of file MapMaker.cpp.

double MapMaker::DistToNearestKeyFrame ( KeyFrame kCurrent)
protected

Definition at line 699 of file MapMaker.cpp.

void MapMaker::GUICommandCallBack ( void *  ptr,
std::string  sCommand,
std::string  sParams 
)
staticprotected

Definition at line 1178 of file MapMaker.cpp.

void MapMaker::GUICommandHandler ( std::string  sCommand,
std::string  sParams 
)
protected

Definition at line 1186 of file MapMaker.cpp.

void MapMaker::HandleBadPoints ( )
protected

Definition at line 133 of file MapMaker.cpp.

bool MapMaker::InitFromStereo ( KeyFrame kFirst,
KeyFrame kSecond,
std::vector< std::pair< CVD::ImageRef, CVD::ImageRef > > &  vMatches,
SE3<> &  se3CameraPos 
)

Definition at line 196 of file MapMaker.cpp.

bool MapMaker::InitFromStereo_OLD ( KeyFrame kFirst,
KeyFrame kSecond,
std::vector< std::pair< CVD::ImageRef, CVD::ImageRef > > &  vMatches,
SE3<> &  se3CameraPos 
)
bool MapMaker::IsDistanceToNearestKeyFrameExcessive ( KeyFrame kCurrent)

Definition at line 1046 of file MapMaker.cpp.

double MapMaker::KeyFrameLinearDist ( KeyFrame k1,
KeyFrame k2 
)
protected

Definition at line 651 of file MapMaker.cpp.

vector< KeyFrame * > MapMaker::NClosestKeyFrames ( KeyFrame k,
unsigned int  N 
)
protected

Definition at line 660 of file MapMaker.cpp.

bool MapMaker::NeedNewKeyFrame ( KeyFrame kCurrent)

Definition at line 706 of file MapMaker.cpp.

int MapMaker::QueueSize ( )
inline

Definition at line 58 of file MapMaker.h.

bool MapMaker::ReFind_Common ( KeyFrame k,
MapPoint p 
)
protected

Definition at line 911 of file MapMaker.cpp.

void MapMaker::ReFindAll ( )
protected
void MapMaker::ReFindFromFailureQueue ( )
protected

Definition at line 1031 of file MapMaker.cpp.

int MapMaker::ReFindInSingleKeyFrame ( KeyFrame k)
protected

Definition at line 992 of file MapMaker.cpp.

void MapMaker::ReFindNewlyMade ( )
protected

Definition at line 1009 of file MapMaker.cpp.

void MapMaker::RefreshSceneDepth ( KeyFrame pKF)
protected

Definition at line 1159 of file MapMaker.cpp.

Vector< 3 > MapMaker::ReprojectPoint ( SE3<>  se3AfromB,
const Vector< 2 > &  v2A,
const Vector< 2 > &  v2B 
)
protected

Definition at line 173 of file MapMaker.cpp.

void MapMaker::RequestReset ( )

Definition at line 120 of file MapMaker.cpp.

void MapMaker::Reset ( )
protected

Definition at line 38 of file MapMaker.cpp.

bool MapMaker::ResetDone ( )

Definition at line 126 of file MapMaker.cpp.

void MapMaker::run ( )
protectedvirtual

Override this method to do whatever it is the thread should do.

Reimplemented from CVD::Thread.

Definition at line 66 of file MapMaker.cpp.

void MapMaker::SetSendMessageToUnity ( SendMessage  sm)

Definition at line 56 of file MapMaker.cpp.

void MapMaker::SubPixelRefineMatches ( KeyFrame k,
int  nLevel 
)
protected
void MapMaker::ThinCandidates ( KeyFrame k,
int  nLevel 
)
protected

Definition at line 369 of file MapMaker.cpp.

Member Data Documentation

int MapMaker::counterForConvergence
protected

Definition at line 135 of file MapMaker.h.

int MapMaker::counterForConvergenceLimit
protected

Definition at line 136 of file MapMaker.h.

bool MapMaker::mbBundleAbortRequested
protected

Definition at line 129 of file MapMaker.h.

bool MapMaker::mbBundleConverged_Full
protected

Definition at line 123 of file MapMaker.h.

bool MapMaker::mbBundleConverged_Recent
protected

Definition at line 124 of file MapMaker.h.

bool MapMaker::mbBundleRunning
protected

Definition at line 130 of file MapMaker.h.

bool MapMaker::mbBundleRunningIsRecent
protected

Definition at line 131 of file MapMaker.h.

bool MapMaker::mbResetDone
protected

Definition at line 128 of file MapMaker.h.

bool MapMaker::mbResetRequested
protected

Definition at line 127 of file MapMaker.h.

ATANCamera MapMaker::mCamera
protected

Definition at line 66 of file MapMaker.h.

double MapMaker::mdWiggleScale
protected

Definition at line 117 of file MapMaker.h.

double MapMaker::mdWiggleScaleDepthNormalized
protected

Definition at line 120 of file MapMaker.h.

double MapMaker::mgvdWiggleScale
protected

Definition at line 119 of file MapMaker.h.

Map& MapMaker::mMap
protected

Definition at line 65 of file MapMaker.h.

std::queue<MapPoint*> MapMaker::mqNewQueue
protected

Definition at line 115 of file MapMaker.h.

std::vector<std::pair<KeyFrame*, MapPoint*> > MapMaker::mvFailureQueue
protected

Definition at line 114 of file MapMaker.h.

std::vector<KeyFrame*> MapMaker::mvpKeyFrameQueue
protected

Definition at line 113 of file MapMaker.h.

std::vector<Command> MapMaker::mvQueuedCommands
protected

Definition at line 109 of file MapMaker.h.

SendMessage MapMaker::sendStringToUnity
protected

Definition at line 134 of file MapMaker.h.


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