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< Dictionary > | get (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) |
Dictionary/Set of markers. It contains the inner codification.
bytesList contains the marker codewords where
nbytes = ceil(markerSize*markerSize/8.)
4*nbytes
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.
cv::aruco::Dictionary::Dictionary | ( | const Mat & | _bytesList = Mat() , |
int | _markerSize = 0 , |
||
int | _maxcorr = 0 |
||
) |
Definition at line 64 of file dictionary.cpp.
cv::aruco::Dictionary::Dictionary | ( | const Ptr< Dictionary > & | _dictionary | ) |
Dictionary(const Dictionary &_dictionary);
Definition at line 55 of file dictionary.cpp.
cv::aruco::Dictionary::CV_WRAP_AS | ( | create | ) |
cv::aruco::Dictionary::CV_WRAP_AS | ( | create_from | ) |
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.
|
static |
Definition at line 90 of file dictionary.cpp.
|
static |
Transform list of bytes to matrix of bits.
Definition at line 236 of file dictionary.cpp.
|
static |
Transform matrix of bits to list of bytes in the 4 rotations.
Definition at line 194 of file dictionary.cpp.
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.
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.
int const Ptr<Dictionary>& cv::aruco::Dictionary::baseDictionary |
Definition at line 93 of file dictionary.hpp.
CV_PROP_RW Mat cv::aruco::Dictionary::bytesList |
Definition at line 64 of file dictionary.hpp.
int cv::aruco::Dictionary::markerSize |
Definition at line 65 of file dictionary.hpp.
int cv::aruco::Dictionary::markerSize |
Definition at line 87 of file dictionary.hpp.
CV_PROP_RW int cv::aruco::Dictionary::maxCorrectionBits |
Definition at line 66 of file dictionary.hpp.
int int cv::aruco::Dictionary::randomSeed =0) |
Definition at line 87 of file dictionary.hpp.
int const Ptr<Dictionary> int cv::aruco::Dictionary::randomSeed =0) |
Definition at line 94 of file dictionary.hpp.