52 cv::Point2f projected_p2d_sh;
58 has_stored_pose =
false;
67 has_stored_pose = c.has_stored_pose;
71 projected_p2d_sh = c.projected_p2d_sh;
72 tri_cntr = c.tri_cntr;
73 estimation_type = c.estimation_type;
78 std::map<int, Feature> container_triangulated;
81 std::map<int, Feature> container_reset_point;
82 std::map<int, Feature> container_triangulated_reset_point;
91 std::string multi_marker_file;
100 : tf(200, 200, 0.01, 20, 4, 6), pose_ok(false), update_tri(false), markers_found(false)
104 void Reset(
bool reset_also_triangulated =
true);
127 bool assume_plane =
true,
128 bool triangulate =
true,
129 float reproj_err_limit = 5.f,
130 float triangulate_angle = 15.f);
This file implements a collection of External Container (EC) versions of many ALVAR classes.
Version of Camera using external container.
Basic structure to be usable with EC methods.
Version of MarkerDetector using external container.
Version of MultiMarker using external container.
Pose representation derived from the Rotation class
Extended version of ExternalContainer structure used internally in SimpleSfM.
Simple structure from motion implementation using CameraEC , MarkerDetectorEC and TrackerFeaturesEC.
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.
std::map< int, Feature > container
The map of all tracked features.
bool UpdateRotationsOnly(cv::Mat &image)
Update position assuming that user is more standing still and viewing the environment.
bool UpdateTriangulateOnly(cv::Mat &image)
Update camera 6-DOF position using triangulated points only (This is the old version of Update)
void SetScale(double s)
Set the suitable scale to be used. This affects quite much how the tracking behaves (when features ar...
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.
Pose * GetPose()
Get the estimated pose.
bool AddMultiMarker(MultiMarkerEC *mm)
Add MultiMarker to be a basis for tracking. It is good idea to call SetResetPoint after these.
CameraEC * GetCamera()
Get the camera used internally. You need to use this to set correct camera calibration (see SamplePoi...
void SetResetPoint()
Remember the current state and return here when the Reset is called.
void Draw(cv::Mat &rgba)
Draw debug information about the tracked features and detected markers.
void Clear()
Clear all tracked features.
void Reset(bool reset_also_triangulated=true)
Reset the situation back to the point it was when SetResetPoint was called.
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.
Version of TrackerFeatures using external container.
@ FILE_FORMAT_XML
XML file format.