Classes | Public Member Functions | Public Attributes | Protected Attributes | List of all members
alvar::SimpleSfM Class Reference

Simple structure from motion implementation using CameraEC , MarkerDetectorEC and TrackerFeaturesEC. More...

#include <SfM.h>

Classes

class  Feature
 Extended version of ExternalContainer structure used internally in SimpleSfM. More...
 

Public Member Functions

void AddMarker (int marker_id, double edge_length, Pose &pose)
 Add an marker to be a basis for tracking. It is good idea to call SetResetPoint after these. More...
 
bool AddMultiMarker (const char *fname, FILE_FORMAT format=FILE_FORMAT_XML)
 Add MultiMarker from file as a basis for tracking. It is good idea to call SetResetPoint after these. More...
 
bool AddMultiMarker (MultiMarkerEC *mm)
 Add MultiMarker to be a basis for tracking. It is good idea to call SetResetPoint after these. More...
 
void Clear ()
 Clear all tracked features. More...
 
void Draw (IplImage *rgba)
 Draw debug information about the tracked features and detected markers. More...
 
CameraECGetCamera ()
 Get the camera used internally. You need to use this to set correct camera calibration (see SamplePointcloud) More...
 
PoseGetPose ()
 Get the estimated pose. More...
 
void Reset (bool reset_also_triangulated=true)
 Reset the situation back to the point it was when SetResetPoint was called. More...
 
void SetResetPoint ()
 Remember the current state and return here when the Reset is called. More...
 
void SetScale (double s)
 Set the suitable scale to be used. This affects quite much how the tracking behaves (when features are triangulated etc.) More...
 
 SimpleSfM ()
 Constructor. More...
 
bool Update (IplImage *image, bool assume_plane=true, bool triangulate=true, float reproj_err_limit=5.f, float triangulate_angle=15.f)
 Update position assuming that camera is moving with 6-DOF. More...
 
bool UpdateRotationsOnly (IplImage *image)
 Update position assuming that user is more standing still and viewing the environment. More...
 
bool UpdateTriangulateOnly (IplImage *image)
 Update camera 6-DOF position using triangulated points only (This is the old version of Update) More...
 

Public Attributes

std::map< int, Featurecontainer
 The map of all tracked features. More...
 
std::map< int, Featurecontainer_triangulated
 

Protected Attributes

CameraEC cam
 
std::map< int, Featurecontainer_reset_point
 
std::map< int, Featurecontainer_triangulated_reset_point
 
MarkerDetectorEC< MarkerDatamarker_detector
 
bool markers_found
 
std::string multi_marker_file
 
Pose pose
 
Pose pose_difference
 
bool pose_ok
 
Pose pose_original
 
double scale
 
TrackerFeaturesEC tf
 
bool update_tri
 

Detailed Description

Simple structure from motion implementation using CameraEC , MarkerDetectorEC and TrackerFeaturesEC.

See SamplePointcloud for usage example.

Examples:
SamplePointcloud.cpp.

Definition at line 41 of file SfM.h.

Constructor & Destructor Documentation

alvar::SimpleSfM::SimpleSfM ( )
inline

Constructor.

Definition at line 93 of file SfM.h.

Member Function Documentation

void alvar::SimpleSfM::AddMarker ( int  marker_id,
double  edge_length,
Pose pose 
)

Add an marker to be a basis for tracking. It is good idea to call SetResetPoint after these.

Examples:
SamplePointcloud.cpp.

Definition at line 98 of file SfM.cpp.

bool alvar::SimpleSfM::AddMultiMarker ( const char *  fname,
FILE_FORMAT  format = FILE_FORMAT_XML 
)

Add MultiMarker from file as a basis for tracking. It is good idea to call SetResetPoint after these.

Examples:
SamplePointcloud.cpp.

Definition at line 89 of file SfM.cpp.

bool alvar::SimpleSfM::AddMultiMarker ( MultiMarkerEC mm)

Add MultiMarker to be a basis for tracking. It is good idea to call SetResetPoint after these.

Definition at line 94 of file SfM.cpp.

void alvar::SimpleSfM::Clear ( )

Clear all tracked features.

Examples:
SamplePointcloud.cpp.

Definition at line 81 of file SfM.cpp.

void alvar::SimpleSfM::Draw ( IplImage *  rgba)

Draw debug information about the tracked features and detected markers.

Examples:
SamplePointcloud.cpp.

Definition at line 456 of file SfM.cpp.

CameraEC * alvar::SimpleSfM::GetCamera ( )

Get the camera used internally. You need to use this to set correct camera calibration (see SamplePointcloud)

Examples:
SamplePointcloud.cpp.

Definition at line 85 of file SfM.cpp.

Pose * alvar::SimpleSfM::GetPose ( )

Get the estimated pose.

Examples:
SamplePointcloud.cpp.

Definition at line 87 of file SfM.cpp.

void alvar::SimpleSfM::Reset ( bool  reset_also_triangulated = true)

Reset the situation back to the point it was when SetResetPoint was called.

Examples:
SamplePointcloud.cpp.

Definition at line 66 of file SfM.cpp.

void alvar::SimpleSfM::SetResetPoint ( )

Remember the current state and return here when the Reset is called.

Examples:
SamplePointcloud.cpp.

Definition at line 76 of file SfM.cpp.

void alvar::SimpleSfM::SetScale ( double  s)
inline

Set the suitable scale to be used. This affects quite much how the tracking behaves (when features are triangulated etc.)

Examples:
SamplePointcloud.cpp.

Definition at line 101 of file SfM.h.

bool alvar::SimpleSfM::Update ( IplImage *  image,
bool  assume_plane = true,
bool  triangulate = true,
float  reproj_err_limit = 5.f,
float  triangulate_angle = 15.f 
)

Update position assuming that camera is moving with 6-DOF.

Examples:
SamplePointcloud.cpp.

Definition at line 154 of file SfM.cpp.

bool alvar::SimpleSfM::UpdateRotationsOnly ( IplImage *  image)

Update position assuming that user is more standing still and viewing the environment.

Definition at line 384 of file SfM.cpp.

bool alvar::SimpleSfM::UpdateTriangulateOnly ( IplImage *  image)

Update camera 6-DOF position using triangulated points only (This is the old version of Update)

Definition at line 339 of file SfM.cpp.

Member Data Documentation

CameraEC alvar::SimpleSfM::cam
protected

Definition at line 78 of file SfM.h.

std::map<int, Feature> alvar::SimpleSfM::container

The map of all tracked features.

Examples:
SamplePointcloud.cpp.

Definition at line 71 of file SfM.h.

std::map<int, Feature> alvar::SimpleSfM::container_reset_point
protected

Definition at line 75 of file SfM.h.

std::map<int, Feature> alvar::SimpleSfM::container_triangulated
Examples:
SamplePointcloud.cpp.

Definition at line 72 of file SfM.h.

std::map<int, Feature> alvar::SimpleSfM::container_triangulated_reset_point
protected

Definition at line 76 of file SfM.h.

MarkerDetectorEC<MarkerData> alvar::SimpleSfM::marker_detector
protected

Definition at line 79 of file SfM.h.

bool alvar::SimpleSfM::markers_found
protected

Definition at line 86 of file SfM.h.

std::string alvar::SimpleSfM::multi_marker_file
protected

Definition at line 85 of file SfM.h.

Pose alvar::SimpleSfM::pose
protected

Definition at line 81 of file SfM.h.

Pose alvar::SimpleSfM::pose_difference
protected

Definition at line 89 of file SfM.h.

bool alvar::SimpleSfM::pose_ok
protected

Definition at line 82 of file SfM.h.

Pose alvar::SimpleSfM::pose_original
protected

Definition at line 88 of file SfM.h.

double alvar::SimpleSfM::scale
protected

Definition at line 87 of file SfM.h.

TrackerFeaturesEC alvar::SimpleSfM::tf
protected

Definition at line 80 of file SfM.h.

bool alvar::SimpleSfM::update_tri
protected

Definition at line 84 of file SfM.h.


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


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Mon Jun 10 2019 12:47:05