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 <dictionary.hpp>

Public Member Functions

 CV_WRAP_AS (create) static Ptr< Dictionary > create(int nMarkers
 
 CV_WRAP_AS (create_from) static Ptr< Dictionary > create(int nMarkers
 
 Dictionary (const Mat &_bytesList=Mat(), int _markerSize=0, int _maxcorr=0)
 
 Dictionary (const Ptr< Dictionary > &_dictionary)
 
CV_WRAP 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 CV_WRAP Ptr< Dictionaryget (int dict)
 
static CV_WRAP Mat getBitsFromByteList (const Mat &byteList, int markerSize)
 Transform list of bytes to matrix of bits. More...
 
static CV_WRAP Mat getByteListFromBits (const Mat &bits)
 Transform matrix of bits to list of bytes in the 4 rotations. More...
 

Public Attributes

int const Ptr< Dictionary > & baseDictionary
 
CV_PROP_RW Mat bytesList
 
CV_PROP_RW int markerSize
 
int markerSize
 
CV_PROP_RW int maxCorrectionBits
 
int int randomSeed =0)
 
int const Ptr< Dictionary > int randomSeed =0)
 

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.

Definition at line 61 of file dictionary.hpp.

Constructor & Destructor Documentation

◆ Dictionary() [1/2]

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

Definition at line 64 of file dictionary.cpp.

◆ Dictionary() [2/2]

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

Dictionary(const Dictionary &_dictionary);

Definition at line 55 of file dictionary.cpp.

Member Function Documentation

◆ CV_WRAP_AS() [1/2]

cv::aruco::Dictionary::CV_WRAP_AS ( create  )

◆ CV_WRAP_AS() [2/2]

cv::aruco::Dictionary::CV_WRAP_AS ( create_from  )

◆ drawMarker()

void cv::aruco::Dictionary::drawMarker ( int  id,
int  sidePixels,
OutputArray  _img,
int  borderBits = 1 
) const

Draw a canonical marker image.

Definition at line 166 of file dictionary.cpp.

◆ get()

Ptr< Dictionary > cv::aruco::Dictionary::get ( int  dict)
static
See also
getPredefinedDictionary

Definition at line 90 of file dictionary.cpp.

◆ getBitsFromByteList()

Mat cv::aruco::Dictionary::getBitsFromByteList ( const Mat &  byteList,
int  markerSize 
)
static

Transform list of bytes to matrix of bits.

Definition at line 236 of file dictionary.cpp.

◆ getByteListFromBits()

Mat cv::aruco::Dictionary::getByteListFromBits ( const Mat &  bits)
static

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

Definition at line 194 of file dictionary.cpp.

◆ 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.

Definition at line 139 of file dictionary.cpp.

◆ 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.

Definition at line 97 of file dictionary.cpp.

Member Data Documentation

◆ baseDictionary

int const Ptr<Dictionary>& cv::aruco::Dictionary::baseDictionary

Definition at line 93 of file dictionary.hpp.

◆ bytesList

CV_PROP_RW Mat cv::aruco::Dictionary::bytesList

Definition at line 64 of file dictionary.hpp.

◆ markerSize [1/2]

int cv::aruco::Dictionary::markerSize

Definition at line 65 of file dictionary.hpp.

◆ markerSize [2/2]

int cv::aruco::Dictionary::markerSize

Definition at line 87 of file dictionary.hpp.

◆ maxCorrectionBits

CV_PROP_RW int cv::aruco::Dictionary::maxCorrectionBits

Definition at line 66 of file dictionary.hpp.

◆ randomSeed [1/2]

int int cv::aruco::Dictionary::randomSeed =0)

Definition at line 87 of file dictionary.hpp.

◆ randomSeed [2/2]

int const Ptr<Dictionary> int cv::aruco::Dictionary::randomSeed =0)

Definition at line 94 of file dictionary.hpp.


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


aruco_pose
Author(s): Oleg Kalachev
autogenerated on Mon Feb 28 2022 22:08:24