OpenCV for Unity  2.6.0
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.9.0/index.html ) for the details of the argument of the method.
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OpenCVForUnity.ObjdetectModule.Dictionary Class Reference

Dictionary is a set of unique ArUco markers of the same size. More...

Inheritance diagram for OpenCVForUnity.ObjdetectModule.Dictionary:
OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableObject

Public Member Functions

IntPtr getNativeObjAddr ()
 
 Dictionary ()
 
 Dictionary (Mat bytesList, int _markerSize, int maxcorr)
 Basic ArUco dictionary constructor. More...
 
 Dictionary (Mat bytesList, int _markerSize)
 Basic ArUco dictionary constructor. More...
 
bool identify (Mat onlyBits, int[] idx, int[] rotation, double maxCorrectionRate)
 Given a matrix of bits. Returns whether if marker is identified or not. More...
 
int getDistanceToId (Mat bits, int id, bool allRotations)
 Returns Hamming distance of the input bits to the specific id. More...
 
int getDistanceToId (Mat bits, int id)
 Returns Hamming distance of the input bits to the specific id. More...
 
void generateImageMarker (int id, int sidePixels, Mat _img, int borderBits)
 Generate a canonical marker image. More...
 
void generateImageMarker (int id, int sidePixels, Mat _img)
 Generate a canonical marker image. More...
 
Mat get_bytesList ()
 
void set_bytesList (Mat bytesList)
 
int get_markerSize ()
 
void set_markerSize (int markerSize)
 
int get_maxCorrectionBits ()
 
void set_maxCorrectionBits (int maxCorrectionBits)
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static Dictionary __fromPtr__ (IntPtr addr)
 
static Mat getByteListFromBits (Mat bits)
 Transform matrix of bits to list of bytes with 4 marker rotations. More...
 
static Mat getBitsFromByteList (Mat byteList, int markerSize)
 Transform list of bytes to matrix of bits. More...
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

Dictionary is a set of unique ArUco markers of the same size.

bytesList storing as 2-dimensions Mat with 4-th channels (CV_8UC4 type was used) and contains the marker codewords where:

Constructor & Destructor Documentation

◆ Dictionary() [1/3]

OpenCVForUnity.ObjdetectModule.Dictionary.Dictionary ( )

◆ Dictionary() [2/3]

OpenCVForUnity.ObjdetectModule.Dictionary.Dictionary ( Mat  bytesList,
int  _markerSize,
int  maxcorr 
)

Basic ArUco dictionary constructor.

Parameters
bytesListbits for all ArUco markers in dictionary see memory layout in the class description
_markerSizeArUco marker size in units
maxcorrmaximum number of bits that can be corrected

◆ Dictionary() [3/3]

OpenCVForUnity.ObjdetectModule.Dictionary.Dictionary ( Mat  bytesList,
int  _markerSize 
)

Basic ArUco dictionary constructor.

Parameters
bytesListbits for all ArUco markers in dictionary see memory layout in the class description
_markerSizeArUco marker size in units
maxcorrmaximum number of bits that can be corrected

Member Function Documentation

◆ __fromPtr__()

static Dictionary OpenCVForUnity.ObjdetectModule.Dictionary.__fromPtr__ ( IntPtr  addr)
static

◆ Dispose()

override void OpenCVForUnity.ObjdetectModule.Dictionary.Dispose ( bool  disposing)
protectedvirtual

◆ generateImageMarker() [1/2]

void OpenCVForUnity.ObjdetectModule.Dictionary.generateImageMarker ( int  id,
int  sidePixels,
Mat  _img,
int  borderBits 
)

Generate a canonical marker image.

◆ generateImageMarker() [2/2]

void OpenCVForUnity.ObjdetectModule.Dictionary.generateImageMarker ( int  id,
int  sidePixels,
Mat  _img 
)

Generate a canonical marker image.

◆ get_bytesList()

Mat OpenCVForUnity.ObjdetectModule.Dictionary.get_bytesList ( )

◆ get_markerSize()

int OpenCVForUnity.ObjdetectModule.Dictionary.get_markerSize ( )

◆ get_maxCorrectionBits()

int OpenCVForUnity.ObjdetectModule.Dictionary.get_maxCorrectionBits ( )

◆ getBitsFromByteList()

static Mat OpenCVForUnity.ObjdetectModule.Dictionary.getBitsFromByteList ( Mat  byteList,
int  markerSize 
)
static

Transform list of bytes to matrix of bits.

◆ getByteListFromBits()

static Mat OpenCVForUnity.ObjdetectModule.Dictionary.getByteListFromBits ( Mat  bits)
static

Transform matrix of bits to list of bytes with 4 marker rotations.

◆ getDistanceToId() [1/2]

int OpenCVForUnity.ObjdetectModule.Dictionary.getDistanceToId ( Mat  bits,
int  id,
bool  allRotations 
)

Returns Hamming distance of the input bits to the specific id.

If allRotations flag is set, the four posible marker rotations are considered

◆ getDistanceToId() [2/2]

int OpenCVForUnity.ObjdetectModule.Dictionary.getDistanceToId ( Mat  bits,
int  id 
)

Returns Hamming distance of the input bits to the specific id.

If allRotations flag is set, the four posible marker rotations are considered

◆ getNativeObjAddr()

IntPtr OpenCVForUnity.ObjdetectModule.Dictionary.getNativeObjAddr ( )

◆ identify()

bool OpenCVForUnity.ObjdetectModule.Dictionary.identify ( Mat  onlyBits,
int []  idx,
int []  rotation,
double  maxCorrectionRate 
)

Given a matrix of bits. Returns whether if marker is identified or not.

Returns reference to the marker id in the dictionary (if any) and its rotation.

◆ set_bytesList()

void OpenCVForUnity.ObjdetectModule.Dictionary.set_bytesList ( Mat  bytesList)

◆ set_markerSize()

void OpenCVForUnity.ObjdetectModule.Dictionary.set_markerSize ( int  markerSize)

◆ set_maxCorrectionBits()

void OpenCVForUnity.ObjdetectModule.Dictionary.set_maxCorrectionBits ( int  maxCorrectionBits)

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