40 #include <eigen3/Eigen/Dense>
55 std::map<int, cv::Point3d> pointcloud;
58 std::vector<int> marker_status;
60 int pointcloud_index(
int marker_id,
int marker_corner,
bool add_if_missing =
false);
61 int get_id_index(
int id,
bool add_if_missing =
false);
70 return _GetPose(begin, end, cam, pose, empty_img);
77 bool SaveXML(
const char *fname);
78 bool SaveText(
const char *fname);
79 bool LoadText(
const char *fname);
80 bool LoadXML(
const char *fname);
122 return _GetPose(begin, end, cam, pose, image);
127 GetPose(
const std::vector<M> *markers,
Camera *cam,
Pose &pose)
131 return _GetPose(begin, end, cam, pose);
139 if (markers->size() < 1)
142 return GetPose(markers, cam, pose, image);
147 Update(
const std::vector<M> *markers,
Camera *cam,
Pose &pose)
149 if (markers->size() < 1)
152 return GetPose(markers, cam, pose);
183 return pointcloud.empty();
190 return marker_indices.size();
200 void PointCloudGet(
int marker_id,
int point,
double &x,
double &y,
double &z);
217 return _SetTrackMarkers(marker_detector, cam, pose, image);
This file defines library export definitions, version numbers and build information.
This file implements a camera used for projecting points and computing homographies.
This file implements multiple filters.
This file implements a generic marker detector.
This file implements a parametrized rotation.
Simple Camera class for calculating distortions, orientation or projections with pre-calibrated camer...
MarkerDetector for detecting markers of type M
Templateless version of MarkerDetector. Please use MarkerDetector instead.
Iterator type for traversing templated Marker vector without the template.
Iterator implementation for traversing templated Marker vector without the template.
Base class for using MultiMarker.
double GetPose(const std::vector< M > *markers, Camera *cam, Pose &pose, cv::Mat &image)
Calculates the pose of the camera from multi marker. Method uses the true 3D coordinates of markers t...
double Update(const std::vector< M > *markers, Camera *cam, Pose &pose, cv::Mat &image)
Calls GetPose to obtain camera pose.
void PointCloudReset()
Reserts the 3D point cloud of the markers.
void PointCloudCopy(const MultiMarker *m)
Copies the 3D point cloud from other multi marker object.
bool IsValidMarker(int marker_id)
Returns true if the marker is in the point cloud.
virtual void Reset()
Resets the multi marker.
size_t Size()
Return the number of markers added using PointCloudAdd.
void PointCloudGet(int marker_id, int point, double &x, double &y, double &z)
Returns 3D co-ordinates of one corner point of a marker.
void PointCloudAdd(int marker_id, double edge_length, Pose &pose)
Adds marker corners to 3D point cloud of multi marker.
bool Save(const char *fname, FILE_FORMAT format=FILE_FORMAT_DEFAULT)
Saves multi marker configuration to a text file.
int SetTrackMarkers(MarkerDetector< M > &marker_detector, Camera *cam, Pose &pose, cv::Mat &image)
Set new markers to be tracked for MarkerDetector Sometimes the MultiMarker implementation knows more ...
bool Load(const char *fname, FILE_FORMAT format=FILE_FORMAT_DEFAULT)
Loads multi marker configuration from a text file.
MultiMarker(std::vector< int > &indices)
Constructor.
bool PointCloudIsEmpty()
Returns true if the are not points in the 3D opint cloud.
MultiMarker()
Default constructor.
void PointCloudCorners3d(double edge_length, Pose &pose, cv::Point3d corners[4])
Calculates 3D coordinates of marker corners relative to given pose (camera).
Pose representation derived from the Rotation class
@ FILE_FORMAT_DEFAULT
Default file format.