28 #ifndef _Aruco_Marker_H 29 #define _Aruco_Marker_H 32 #include <opencv2/opencv.hpp> 59 Marker(
const std::vector<cv::Point2f> &corners,
int _id=-1);
65 bool isValid()
const{
return id!=-1 && size()==4;}
69 void draw(cv::Mat &in, cv::Scalar color,
int lineWidth=1,
bool writeId=
true)
const;
76 void calculateExtrinsics(
float markerSize,
const CameraParameters &CP,
bool setYPerpendicular=
true)
throw(cv::Exception);
83 void calculateExtrinsics(
float markerSize, cv::Mat CameraMatrix, cv::Mat Distorsion=cv::Mat(),
bool setYPerpendicular=
true)
throw(cv::Exception);
88 void glGetModelViewMatrix(
double modelview_matrix[16])
throw(cv::Exception);
100 void OgreGetPoseParameters(
double position[3],
double orientation[4] )
throw(cv::Exception);
104 cv::Point2f getCenter()
const;
107 float getPerimeter()
const;
110 float getArea()
const;
124 for (
int i=0;i<4;i++)
125 str<<
"("<<M[i].x<<
","<<M[i].y<<
") ";
127 for (
int i=0;i<3;i++)
128 str<<M.
Tvec.ptr<
float>(0)[i]<<
" ";
130 for (
int i=0;i<3;i++)
131 str<<M.
Rvec.ptr<
float>(0)[i]<<
" ";
138 void rotateXAxis(cv::Mat &rotation);
friend ostream & operator<<(ostream &str, const Marker &M)
This class represents a marker. It is a vector of the fours corners ot the marker.
Parameters of the camera.
friend bool operator<(const Marker &M1, const Marker &M2)