OpenCV
3.1.0
Open Source Computer Vision
|
Dictionary/Set of markers. It contains the inner codification. More...
#include "dictionary.hpp"
Public Member Functions | |
Dictionary (const Mat &_bytesList=Mat(), int _markerSize=0, int _maxcorr=0) | |
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 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 |
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.
cv::aruco::Dictionary::Dictionary | ( | const Mat & | _bytesList = Mat() , |
int | _markerSize = 0 , |
||
int | _maxcorr = 0 |
||
) |
void cv::aruco::Dictionary::drawMarker | ( | int | id, |
int | sidePixels, | ||
OutputArray | _img, | ||
int | borderBits = 1 |
||
) | const |
Draw a canonical marker image.
|
static |
Transform list of bytes to matrix of 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.
Mat cv::aruco::Dictionary::bytesList |
int cv::aruco::Dictionary::markerSize |
int cv::aruco::Dictionary::maxCorrectionBits |