Go to the documentation of this file.00001 #ifndef TAGDETECTION_H
00002 #define TAGDETECTION_H
00003
00004 #include <Eigen/Dense>
00005
00006 #include "opencv2/opencv.hpp"
00007
00008 #include <utility>
00009 #include <vector>
00010
00011 namespace AprilTags {
00012
00013 struct TagDetection {
00014
00016 TagDetection();
00017
00019 TagDetection(int id);
00020
00022 bool good;
00023
00025 long long obsCode;
00026
00028 long long code;
00029
00031 int id;
00032
00034 int hammingDistance;
00035
00037 int rotation;
00038
00041
00042
00043
00044 std::pair<float,float> p[4];
00045
00047 std::pair<float,float> cxy;
00048
00050
00051 float observedPerimeter;
00052
00054
00055
00056
00057
00058
00059 Eigen::Matrix3d homography;
00060
00062 float getXYOrientation() const;
00063
00065 std::pair<float,float> hxy;
00066
00068 std::pair<float,float> interpolate(float x, float y) const;
00069
00071 bool overlapsTooMuch(const TagDetection &other) const;
00072
00074
00075
00076
00077
00078
00079
00080
00081 Eigen::Matrix4d getRelativeTransform(double tag_size, double fx, double fy,
00082 double px, double py) const;
00083
00085
00086 void getRelativeTranslationRotation(double tag_size, double fx, double fy, double px, double py,
00087 Eigen::Vector3d& trans, Eigen::Matrix3d& rot) const;
00088
00090 void draw(cv::Mat& image) const;
00091 };
00092
00093 }
00094
00095 #endif