Classes | Public Member Functions | Public Attributes | Protected Attributes
alvar::SimpleSfM Class Reference

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

#include <SfM.h>

List of all members.

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.
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.
bool AddMultiMarker (MultiMarkerEC *mm)
 Add MultiMarker to be a basis for tracking. It is good idea to call SetResetPoint after these.
void Clear ()
 Clear all tracked features.
void Draw (IplImage *rgba)
 Draw debug information about the tracked features and detected markers.
CameraECGetCamera ()
 Get the camera used internally. You need to use this to set correct camera calibration (see SamplePointcloud)
PoseGetPose ()
 Get the estimated pose.
void Reset (bool reset_also_triangulated=true)
 Reset the situation back to the point it was when SetResetPoint was called.
void SetResetPoint ()
 Remember the current state and return here when the Reset is called.
void SetScale (double s)
 Set the suitable scale to be used. This affects quite much how the tracking behaves (when features are triangulated etc.)
 SimpleSfM ()
 Constructor.
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.
bool UpdateRotationsOnly (IplImage *image)
 Update position assuming that user is more standing still and viewing the environment.
bool UpdateTriangulateOnly (IplImage *image)
 Update camera 6-DOF position using triangulated points only (This is the old version of Update)

Public Attributes

std::map< int, Featurecontainer
 The map of all tracked features.
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

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.

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.

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.

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.

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.

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

Definition at line 78 of file SfM.h.

The map of all tracked features.

Examples:
SamplePointcloud.cpp.

Definition at line 71 of file SfM.h.

Definition at line 75 of file SfM.h.

Examples:
SamplePointcloud.cpp.

Definition at line 72 of file SfM.h.

Definition at line 76 of file SfM.h.

Definition at line 79 of file SfM.h.

Definition at line 86 of file SfM.h.

std::string alvar::SimpleSfM::multi_marker_file [protected]

Definition at line 85 of file SfM.h.

Definition at line 81 of file SfM.h.

Definition at line 89 of file SfM.h.

bool alvar::SimpleSfM::pose_ok [protected]

Definition at line 82 of file SfM.h.

Definition at line 88 of file SfM.h.

double alvar::SimpleSfM::scale [protected]

Definition at line 87 of file SfM.h.

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 Thu Feb 16 2017 03:23:03