|
OpenCV for Unity 3.0.5
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/5.0/index.html ) for the details of the argument of the method.
|
Dictionary is a set of unique ArUco markers of the same size. More...
Public Member Functions | |
| Dictionary () | |
| Dictionary (Mat bytesList, int _markerSize) | |
| Basic ArUco dictionary constructor. | |
| Dictionary (Mat bytesList, int _markerSize, int maxcorr) | |
| Basic ArUco dictionary constructor. | |
| void | generateImageMarker (int id, int sidePixels, Mat _img) |
| Generate a canonical marker image. | |
| void | generateImageMarker (int id, int sidePixels, Mat _img, int borderBits) |
| Generate a canonical marker image. | |
| Mat | get_bytesList () |
| int | get_markerSize () |
| int | get_maxCorrectionBits () |
| int | getDistanceToId (Mat bits, int id) |
| Returns Hamming distance of the input bits to the specific id. | |
| int | getDistanceToId (Mat bits, int id, bool allRotations) |
| Returns Hamming distance of the input bits to the specific id. | |
| int | getDistanceToId (Mat onlyCellPixelRatio, int id, bool allRotations, float validBitIdThreshold) |
| Returns number of cells that differ from the specific id. | |
| Mat | getMarkerBits (int markerId) |
| Get ground truth bits float. | |
| Mat | getMarkerBits (int markerId, int rotationId) |
| Get ground truth bits float. | |
| IntPtr | getNativeObjAddr () |
| bool | identify (Mat onlyBits, int[] idx, int[] rotation, double maxCorrectionRate) |
| Given a matrix of bits. Returns whether if marker is identified or not. | |
| bool | identify (Mat onlyCellPixelRatio, int[] idx, int[] rotation, double maxCorrectionRate, float validBitIdThreshold) |
| Given a matrix of pixel ratio ranging from 0 to 1. Returns whether the marker is identified or not. | |
| void | set_bytesList (Mat bytesList) |
| void | set_markerSize (int markerSize) |
| void | set_maxCorrectionBits (int maxCorrectionBits) |
Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
| void | Dispose () |
| Releases resources used by this object. | |
| void | ThrowIfDisposed () |
| Throws ObjectDisposedException if this object has been disposed. | |
Static Public Member Functions | |
| static Dictionary | __fromPtr__ (IntPtr addr) |
| static Mat | getBitsFromByteList (Mat byteList, int markerSize) |
| Transform list of bytes to matrix of bits. | |
| static Mat | getBitsFromByteList (Mat byteList, int markerSize, int rotationId) |
| Transform list of bytes to matrix of bits. | |
| static Mat | getByteListFromBits (Mat bits) |
| Transform matrix of bits to list of bytes with 4 marker rotations. | |
Static Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
| static IntPtr | ThrowIfNullIntPtr (IntPtr ptr) |
| Returns the native pointer, or throws CoreModule.CvException if it is zero. | |
Protected Member Functions | |
| override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject | |
| DisposableOpenCVObject () | |
| Initializes a new instance with a zero native pointer and dispose enabled. | |
| DisposableOpenCVObject (bool isEnabledDispose) | |
| Initializes a new instance with a zero native pointer. | |
| DisposableOpenCVObject (IntPtr ptr) | |
| Initializes a new instance with the specified native pointer and dispose enabled. | |
| DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose) | |
| Initializes a new instance with the specified native pointer. | |
| override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.DisposableObject | |
| DisposableObject () | |
| Initializes a new instance with dispose enabled. | |
| DisposableObject (bool isEnabledDispose) | |
| Initializes a new instance. | |
Additional Inherited Members | |
Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject | |
Properties inherited from OpenCVForUnity.DisposableObject | |
| bool | IsDisposed [get, protected set] |
| bool | IsEnabledDispose [get, set] |
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:
nbytes = ceil(markerSize*markerSize/8.) bytes4*nbytes//bytes without rotation/bytes with rotation 1/bytes with rotation 2/bytes with rotation 3// So bytesList.ptr(i)[k*nbytes + j] is the j-th byte of i-th marker, in its k-th rotation. dictionary_size x nbytes x 4, but it should be indexed like C++ version. Python example for j-th byte of i-th marker, in its k-th rotation: aruco_dict.bytesList[id].ravel()[k*nbytes + j] | OpenCVForUnity.ObjdetectModule.Dictionary.Dictionary | ( | ) |
| OpenCVForUnity.ObjdetectModule.Dictionary.Dictionary | ( | Mat | bytesList, |
| int | _markerSize, | ||
| int | maxcorr ) |
Basic ArUco dictionary constructor.
| bytesList | bits for all ArUco markers in dictionary see memory layout in the class description |
| _markerSize | ArUco marker size in units |
| maxcorr | maximum number of bits that can be corrected |
| OpenCVForUnity.ObjdetectModule.Dictionary.Dictionary | ( | Mat | bytesList, |
| int | _markerSize ) |
Basic ArUco dictionary constructor.
| bytesList | bits for all ArUco markers in dictionary see memory layout in the class description |
| _markerSize | ArUco marker size in units |
| maxcorr | maximum number of bits that can be corrected |
|
static |
|
protectedvirtual |
Reimplemented from OpenCVForUnity.DisposableObject.
| void OpenCVForUnity.ObjdetectModule.Dictionary.generateImageMarker | ( | int | id, |
| int | sidePixels, | ||
| Mat | _img ) |
Generate a canonical marker image.
| void OpenCVForUnity.ObjdetectModule.Dictionary.generateImageMarker | ( | int | id, |
| int | sidePixels, | ||
| Mat | _img, | ||
| int | borderBits ) |
Generate a canonical marker image.
| Mat OpenCVForUnity.ObjdetectModule.Dictionary.get_bytesList | ( | ) |
| int OpenCVForUnity.ObjdetectModule.Dictionary.get_markerSize | ( | ) |
| int OpenCVForUnity.ObjdetectModule.Dictionary.get_maxCorrectionBits | ( | ) |
|
static |
Transform list of bytes to matrix of bits.
|
static |
Transform list of bytes to matrix of bits.
Transform matrix of bits to list of bytes with 4 marker rotations.
| 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 possible marker rotations are considered
| 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 possible marker rotations are considered
| int OpenCVForUnity.ObjdetectModule.Dictionary.getDistanceToId | ( | Mat | onlyCellPixelRatio, |
| int | id, | ||
| bool | allRotations, | ||
| float | validBitIdThreshold ) |
Returns number of cells that differ from the specific id.
For each cell, the distance is increased when the difference between the detected cell pixel ratio and the dictionary bit value is greater than validBitIdThreshold. If allRotations is set, the four possible marker rotations are considered.
| onlyCellPixelRatio | markerSize x markerSize matrix (CV_32FC1) holding, for each cell, the ratio of white pixels ranging from 0 to 1 |
| id | marker id in the dictionary to compute the distance to |
| allRotations | if set, the four possible marker rotations are considered and the smallest distance is returned |
| validBitIdThreshold | maximum allowed difference between a cell pixel ratio and the dictionary bit value; cells exceeding it are counted as differing |
| Mat OpenCVForUnity.ObjdetectModule.Dictionary.getMarkerBits | ( | int | markerId | ) |
Get ground truth bits float.
| Mat OpenCVForUnity.ObjdetectModule.Dictionary.getMarkerBits | ( | int | markerId, |
| int | rotationId ) |
Get ground truth bits float.
| IntPtr OpenCVForUnity.ObjdetectModule.Dictionary.getNativeObjAddr | ( | ) |
| 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.
| bool OpenCVForUnity.ObjdetectModule.Dictionary.identify | ( | Mat | onlyCellPixelRatio, |
| int[] | idx, | ||
| int[] | rotation, | ||
| double | maxCorrectionRate, | ||
| float | validBitIdThreshold ) |
Given a matrix of pixel ratio ranging from 0 to 1. Returns whether the marker is identified or not.
Returns reference to the marker id in the dictionary (if any) and its rotation.
| void OpenCVForUnity.ObjdetectModule.Dictionary.set_bytesList | ( | Mat | bytesList | ) |
| void OpenCVForUnity.ObjdetectModule.Dictionary.set_markerSize | ( | int | markerSize | ) |
| void OpenCVForUnity.ObjdetectModule.Dictionary.set_maxCorrectionBits | ( | int | maxCorrectionBits | ) |