OpenCV  3.4.14
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. More...
 
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. More...
 
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. More...
 

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. More...
 
static Mat getByteListFromBits (const Mat &bits)
 Transform matrix of bits to list of bytes in the 4 rotations. More...
 

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

◆ Dictionary() [1/2]

cv::aruco::Dictionary::Dictionary ( const Mat _bytesList = Mat(),
int  _markerSize = 0,
int  _maxcorr = 0 
)

◆ Dictionary() [2/2]

cv::aruco::Dictionary::Dictionary ( const Ptr< Dictionary > &  _dictionary)

Dictionary(const Dictionary &_dictionary);

Member Function Documentation

◆ create() [1/2]

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])

◆ create() [2/2]

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])

◆ drawMarker()

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.

◆ get()

static Ptr<Dictionary> cv::aruco::Dictionary::get ( int  dict)
static
Python:
retval=cv.aruco.Dictionary_get(dict)

◆ getBitsFromByteList()

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.

◆ getByteListFromBits()

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.

◆ getDistanceToId()

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.

◆ identify()

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

◆ bytesList

Mat cv::aruco::Dictionary::bytesList

◆ markerSize

int cv::aruco::Dictionary::markerSize

◆ maxCorrectionBits

int cv::aruco::Dictionary::maxCorrectionBits

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