public class Dictionary extends Object
nbytes = ceil(markerSize*markerSize/8.)
- each row contains all 4 rotations of the marker, so its length is 4*nbytes
bytesList.ptr(i)[k*nbytes + j] is then the j-th byte of i-th marker, in its k-th rotation.| Modifier and Type | Field and Description |
|---|---|
protected long |
nativeObj |
| Modifier | Constructor and Description |
|---|---|
|
Dictionary() |
protected |
Dictionary(long addr) |
|
Dictionary(Mat bytesList,
int _markerSize) |
|
Dictionary(Mat bytesList,
int _markerSize,
int maxcorr) |
| Modifier and Type | Method and Description |
|---|---|
static Dictionary |
__fromPtr__(long addr) |
protected void |
finalize() |
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() |
static Mat |
getBitsFromByteList(Mat byteList,
int markerSize)
Transform list of bytes to matrix of bits
|
static Mat |
getByteListFromBits(Mat bits)
Transform matrix of bits to list of bytes in the 4 rotations
|
int |
getDistanceToId(Mat bits,
int id)
Returns the distance of the input bits to the specific id.
|
int |
getDistanceToId(Mat bits,
int id,
boolean allRotations)
Returns the distance of the input bits to the specific id.
|
long |
getNativeObjAddr() |
boolean |
identify(Mat onlyBits,
int[] idx,
int[] rotation,
double maxCorrectionRate)
Given a matrix of bits.
|
void |
set_bytesList(Mat bytesList) |
void |
set_markerSize(int markerSize) |
void |
set_maxCorrectionBits(int maxCorrectionBits) |
protected Dictionary(long addr)
public Dictionary()
public Dictionary(Mat bytesList, int _markerSize, int maxcorr)
public Dictionary(Mat bytesList, int _markerSize)
public long getNativeObjAddr()
public static Dictionary __fromPtr__(long addr)
public boolean identify(Mat onlyBits, int[] idx, int[] rotation, double maxCorrectionRate)
onlyBits - automatically generatedidx - automatically generatedrotation - automatically generatedmaxCorrectionRate - automatically generatedpublic int getDistanceToId(Mat bits, int id, boolean allRotations)
bits - automatically generatedid - automatically generatedallRotations - automatically generatedpublic int getDistanceToId(Mat bits, int id)
bits - automatically generatedid - automatically generatedpublic void generateImageMarker(int id,
int sidePixels,
Mat _img,
int borderBits)
id - automatically generatedsidePixels - automatically generated_img - automatically generatedborderBits - automatically generatedpublic void generateImageMarker(int id,
int sidePixels,
Mat _img)
id - automatically generatedsidePixels - automatically generated_img - automatically generatedpublic static Mat getByteListFromBits(Mat bits)
bits - automatically generatedpublic static Mat getBitsFromByteList(Mat byteList, int markerSize)
byteList - automatically generatedmarkerSize - automatically generatedpublic Mat get_bytesList()
public void set_bytesList(Mat bytesList)
public int get_markerSize()
public void set_markerSize(int markerSize)
public int get_maxCorrectionBits()
public void set_maxCorrectionBits(int maxCorrectionBits)
Copyright © 2023. All rights reserved.