My Project
Classes | Public Member Functions | Public Attributes | Protected Attributes | List of all members
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

 SimpleSfM ()
 Constructor.
 
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 Clear ()
 Clear all tracked features.
 
void SetScale (double s)
 Set the suitable scale to be used. This affects quite much how the tracking behaves (when features are triangulated etc.)
 
CameraECGetCamera ()
 Get the camera used internally. You need to use this to set correct camera calibration (see SamplePointcloud)
 
PoseGetPose ()
 Get the estimated pose.
 
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 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 Update (cv::Mat &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 UpdateTriangulateOnly (cv::Mat &image)
 Update camera 6-DOF position using triangulated points only (This is the old version of Update)
 
bool UpdateRotationsOnly (cv::Mat &image)
 Update position assuming that user is more standing still and viewing the environment.
 
void Draw (cv::Mat &rgba)
 Draw debug information about the tracked features and detected markers.
 

Public Attributes

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

Protected Attributes

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

Detailed Description

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

See SamplePointcloud for usage example.

Definition at line 41 of file SfM.h.


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