28 #ifndef _Aruco_Marker_H    29 #define _Aruco_Marker_H    34 #include <opencv2/core/core.hpp>    62     Marker(
const std::vector< cv::Point2f > &corners, 
int _id = -1);
    68     bool isValid()
 const { 
return id != -1 && size() == 4; }
    72     void draw(cv::Mat &in, cv::Scalar color, 
int lineWidth = 1, 
bool writeId = 
true) 
const;
    79     void calculateExtrinsics(
float markerSize, 
const CameraParameters &CP, 
bool setYPerpendicular = 
true) 
throw(cv::Exception);
    86     void calculateExtrinsics(
float markerSize, cv::Mat CameraMatrix, cv::Mat Distorsion = cv::Mat(), 
bool setYPerpendicular = 
true) 
throw(cv::Exception);
    91     void glGetModelViewMatrix(
double modelview_matrix[16]) 
throw(cv::Exception);
   103     void OgreGetPoseParameters(
double position[3], 
double orientation[4]) 
throw(cv::Exception);
   107     cv::Point2f getCenter() 
const;
   110     float getPerimeter() 
const;
   113     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 toStream(ostream &str)
const;
   140     void fromStream(istream &str);
   143     static vector<cv::Point3f> get3DPoints(
float msize);
   145     void rotateXAxis(cv::Mat &rotation);
 
friend ostream & operator<<(ostream &str, const Marker &M)
bool operator==(const Marker &m) const 
TFSIMD_FORCE_INLINE const tfScalar & x() const 
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)