OpenCV  4.1.0
Open Source Computer Vision
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cv::aruco::Dictionary Class Reference

Dictionary/Set of markers. It contains the inner codification. More...

#include <opencv2/aruco/dictionary.hpp>

Public Member Functions

 Dictionary (const Mat &_bytesList=Mat(), int _markerSize=0, int _maxcorr=0)
 
 Dictionary (const Ptr< Dictionary > &_dictionary)
 
void drawMarker (int id, int sidePixels, OutputArray _img, int borderBits=1) const
 Draw a canonical marker image.
 
int getDistanceToId (InputArray bits, int id, bool allRotations=true) const
 Returns the distance of the input bits to the specific id. If allRotations is true, the four posible bits rotation are considered.
 
bool identify (const Mat &onlyBits, int &idx, int &rotation, double maxCorrectionRate) const
 Given a matrix of bits. Returns whether if marker is identified or not. It returns by reference the correct id (if any) and the correct rotation.
 

Static Public Member Functions

static Ptr< Dictionarycreate (int nMarkers, int markerSize, int randomSeed=0)
 
static Ptr< Dictionarycreate (int nMarkers, int markerSize, const Ptr< Dictionary > &baseDictionary, int randomSeed=0)
 
static Ptr< Dictionaryget (int dict)
 
static Mat getBitsFromByteList (const Mat &byteList, int markerSize)
 Transform list of bytes to matrix of bits.
 
static Mat getByteListFromBits (const Mat &bits)
 Transform matrix of bits to list of bytes in the 4 rotations.
 

Public Attributes

Mat bytesList
 
int markerSize
 
int maxCorrectionBits
 

Detailed Description

Dictionary/Set of markers. It contains the inner codification.

bytesList contains the marker codewords where

bytesList.ptr(i)[k*nbytes + j] is then the j-th byte of i-th marker, in its k-th rotation.

Constructor & Destructor Documentation

cv::aruco::Dictionary::Dictionary ( const Mat _bytesList = Mat(),
int  _markerSize = 0,
int  _maxcorr = 0 
)
cv::aruco::Dictionary::Dictionary ( const Ptr< Dictionary > &  _dictionary)

Dictionary(const Dictionary &_dictionary);

Member Function Documentation

static Ptr<Dictionary> cv::aruco::Dictionary::create ( int  nMarkers,
int  markerSize,
int  randomSeed = 0 
)
static
Python:
retval=cv.aruco.Dictionary_create(nMarkers, markerSize[, randomSeed])
retval=cv.aruco.Dictionary_create_from(nMarkers, markerSize, baseDictionary[, randomSeed])
static Ptr<Dictionary> cv::aruco::Dictionary::create ( int  nMarkers,
int  markerSize,
const Ptr< Dictionary > &  baseDictionary,
int  randomSeed = 0 
)
static
Python:
retval=cv.aruco.Dictionary_create(nMarkers, markerSize[, randomSeed])
retval=cv.aruco.Dictionary_create_from(nMarkers, markerSize, baseDictionary[, randomSeed])
void cv::aruco::Dictionary::drawMarker ( int  id,
int  sidePixels,
OutputArray  _img,
int  borderBits = 1 
) const
Python:
_img=cv.aruco_Dictionary.drawMarker(id, sidePixels[, _img[, borderBits]])

Draw a canonical marker image.

static Ptr<Dictionary> cv::aruco::Dictionary::get ( int  dict)
static
Python:
retval=cv.aruco.Dictionary_get(dict)
static Mat cv::aruco::Dictionary::getBitsFromByteList ( const Mat byteList,
int  markerSize 
)
static
Python:
retval=cv.aruco.Dictionary_getBitsFromByteList(byteList, markerSize)

Transform list of bytes to matrix of bits.

static Mat cv::aruco::Dictionary::getByteListFromBits ( const Mat bits)
static
Python:
retval=cv.aruco.Dictionary_getByteListFromBits(bits)

Transform matrix of bits to list of bytes in the 4 rotations.

int cv::aruco::Dictionary::getDistanceToId ( InputArray  bits,
int  id,
bool  allRotations = true 
) const

Returns the distance of the input bits to the specific id. If allRotations is true, the four posible bits rotation are considered.

bool cv::aruco::Dictionary::identify ( const Mat onlyBits,
int &  idx,
int &  rotation,
double  maxCorrectionRate 
) const

Given a matrix of bits. Returns whether if marker is identified or not. It returns by reference the correct id (if any) and the correct rotation.

Member Data Documentation

Mat cv::aruco::Dictionary::bytesList
int cv::aruco::Dictionary::markerSize
int cv::aruco::Dictionary::maxCorrectionBits

The documentation for this class was generated from the following file: