#include <marker.h>
|
void | calculateExtrinsics (float markerSize, const CameraParameters &CP, bool setYPerpendicular=true) |
|
void | calculateExtrinsics (float markerSize, cv::Mat CameraMatrix, cv::Mat Distorsion=cv::Mat(), cv::Mat Extrinsics=cv::Mat(), bool setYPerpendicular=true, bool correctFisheye=false) |
|
void | copyTo (Marker &m) const |
|
void | draw (cv::Mat &in, cv::Scalar color=cv::Scalar(0, 0, 255), int lineWidth=-1, bool writeId=true, bool writeInfo=false) const |
|
void | fromStream (std::istream &str) |
|
vector< cv::Point3f > | get3DPoints () const |
|
float | getArea () const |
|
cv::Point2f | getCenter () const |
|
float | getPerimeter () const |
|
float | getRadius () const |
|
cv::Mat | getTransformMatrix () const |
|
void | glGetModelViewMatrix (double modelview_matrix[16]) |
|
bool | isPoseValid () const |
|
bool | isValid () const |
|
| Marker () |
|
| Marker (const Marker &M) |
|
| Marker (const std::vector< cv::Point2f > &corners, int _id=-1) |
|
| Marker (int id) |
|
void | OgreGetPoseParameters (double position[3], double orientation[4]) |
|
Marker & | operator= (const Marker &m) |
|
bool | operator== (const Marker &m) const |
|
void | toStream (std::ostream &str) const |
|
| ~Marker () |
|
Definition at line 35 of file marker.h.
◆ Marker() [1/4]
aruco::Marker::Marker |
( |
| ) |
|
◆ Marker() [2/4]
aruco::Marker::Marker |
( |
int |
id | ) |
|
◆ Marker() [3/4]
aruco::Marker::Marker |
( |
const Marker & |
M | ) |
|
◆ Marker() [4/4]
aruco::Marker::Marker |
( |
const std::vector< cv::Point2f > & |
corners, |
|
|
int |
_id = -1 |
|
) |
| |
◆ ~Marker()
aruco::Marker::~Marker |
( |
| ) |
|
|
inline |
◆ calculateExtrinsics() [1/2]
void aruco::Marker::calculateExtrinsics |
( |
float |
markerSize, |
|
|
const CameraParameters & |
CP, |
|
|
bool |
setYPerpendicular = true |
|
) |
| |
Calculates the extrinsics (Rvec and Tvec) of the marker with respect to the camera
- Parameters
-
markerSize | size of the marker side expressed in meters |
CP | parmeters of the camera |
setYPerpendicular | If set the Y axis will be perpendicular to the surface. Otherwise, it will be the Z axis |
Definition at line 301 of file marker.cpp.
◆ calculateExtrinsics() [2/2]
void aruco::Marker::calculateExtrinsics |
( |
float |
markerSize, |
|
|
cv::Mat |
CameraMatrix, |
|
|
cv::Mat |
Distorsion = cv::Mat() , |
|
|
cv::Mat |
Extrinsics = cv::Mat() , |
|
|
bool |
setYPerpendicular = true , |
|
|
bool |
correctFisheye = false |
|
) |
| |
Calculates the extrinsics (Rvec and Tvec) of the marker with respect to the camera
- Parameters
-
markerSize | size of the marker side expressed in meters |
CameraMatrix | matrix with camera parameters (fx, fy, cx, cy) |
Distortion | matrix with distortion parameters (k1, k2, p1, p2) |
setYPerpendicular | If set the Y axis will be perpendicular to the surface. Otherwise, it will be the Z axis |
correctFisheye | Correct fisheye distortion |
Definition at line 316 of file marker.cpp.
◆ copyTo()
void aruco::Marker::copyTo |
( |
Marker & |
m | ) |
const |
◆ draw()
void aruco::Marker::draw |
( |
cv::Mat & |
in, |
|
|
cv::Scalar |
color = cv::Scalar(0, 0, 255) , |
|
|
int |
lineWidth = -1 , |
|
|
bool |
writeId = true , |
|
|
bool |
writeInfo = false |
|
) |
| const |
Draws this marker in the input image
Definition at line 249 of file marker.cpp.
◆ fromStream()
void aruco::Marker::fromStream |
( |
std::istream & |
str | ) |
|
◆ get3DPoints() [1/2]
vector<cv::Point3f> aruco::Marker::get3DPoints |
( |
| ) |
const |
|
inline |
◆ get3DPoints() [2/2]
std::vector< cv::Point3f > aruco::Marker::get3DPoints |
( |
float |
msize | ) |
|
|
static |
◆ getArea()
float aruco::Marker::getArea |
( |
| ) |
const |
◆ getCenter()
cv::Point2f aruco::Marker::getCenter |
( |
| ) |
const |
Returns the centroid of the marker
Definition at line 391 of file marker.cpp.
◆ getPerimeter()
float aruco::Marker::getPerimeter |
( |
| ) |
const |
Returns the perimeter of the marker
Definition at line 420 of file marker.cpp.
◆ getRadius()
float aruco::Marker::getRadius |
( |
| ) |
const |
Returns radius of enclosing circle
Definition at line 485 of file marker.cpp.
◆ getTransformMatrix()
cv::Mat aruco::Marker::getTransformMatrix |
( |
| ) |
const |
◆ glGetModelViewMatrix()
void aruco::Marker::glGetModelViewMatrix |
( |
double |
modelview_matrix[16] | ) |
|
Given the extrinsic camera parameters returns the GL_MODELVIEW matrix for opengl. Setting this matrix, the reference coordinate system will be set in this marker
Definition at line 102 of file marker.cpp.
◆ isPoseValid()
bool aruco::Marker::isPoseValid |
( |
| ) |
const |
|
inline |
◆ isValid()
bool aruco::Marker::isValid |
( |
| ) |
const |
|
inline |
Indicates if this object is valid
Definition at line 68 of file marker.h.
◆ OgreGetPoseParameters()
void aruco::Marker::OgreGetPoseParameters |
( |
double |
position[3], |
|
|
double |
orientation[4] |
|
) |
| |
Returns position vector and orientation quaternion for an Ogre scene node or entity. Use: ... Ogre::Vector3 ogrePos (position[0], position[1], position[2]); Ogre::Quaternion ogreOrient (orientation[0], orientation[1], orientation[2], orientation[3]); mySceneNode->setPosition( ogrePos ); mySceneNode->setOrientation( ogreOrient ); ...
Definition at line 159 of file marker.cpp.
◆ operator=()
◆ operator==()
bool aruco::Marker::operator== |
( |
const Marker & |
m | ) |
const |
|
inline |
◆ rotateXAxis()
void aruco::Marker::rotateXAxis |
( |
cv::Mat & |
rotation | ) |
|
|
private |
◆ toStream()
void aruco::Marker::toStream |
( |
std::ostream & |
str | ) |
const |
◆ operator<
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
str, |
|
|
const Marker & |
M |
|
) |
| |
|
friend |
◆ contourPoints
vector<cv::Point> aruco::Marker::contourPoints |
◆ dict_info
std::string aruco::Marker::dict_info |
◆ id
◆ Rvec
cv::Mat aruco::Marker::Rvec |
◆ ssize
float aruco::Marker::ssize |
◆ Tvec
cv::Mat aruco::Marker::Tvec |
The documentation for this class was generated from the following files: