Package org.opencv.aruco
Class Dictionary
java.lang.Object
org.opencv.aruco.Dictionary
Dictionary/Set of markers. It contains the inner codification
bytesList contains the marker codewords where
- bytesList.rows is the dictionary size
- each marker is encoded using
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.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Dictionary__fromPtr__(long addr) static Dictionarycreate(int nMarkers, int markerSize) SEE: generateCustomDictionarystatic Dictionarycreate(int nMarkers, int markerSize, int randomSeed) SEE: generateCustomDictionarystatic Dictionarycreate_from(int nMarkers, int markerSize, Dictionary baseDictionary) SEE: generateCustomDictionarystatic Dictionarycreate_from(int nMarkers, int markerSize, Dictionary baseDictionary, int randomSeed) SEE: generateCustomDictionaryvoiddrawMarker(int id, int sidePixels, Mat _img) Draw a canonical marker imagevoiddrawMarker(int id, int sidePixels, Mat _img, int borderBits) Draw a canonical marker imageprotected voidfinalize()static Dictionaryget(int dict) SEE: getPredefinedDictionaryintintstatic MatgetBitsFromByteList(Mat byteList, int markerSize) Transform list of bytes to matrix of bitsstatic MatgetByteListFromBits(Mat bits) Transform matrix of bits to list of bytes in the 4 rotationsintgetDistanceToId(Mat bits, int id) Returns the distance of the input bits to the specific id.intgetDistanceToId(Mat bits, int id, boolean allRotations) Returns the distance of the input bits to the specific id.longbooleanGiven a matrix of bits.voidset_bytesList(Mat bytesList) voidset_markerSize(int markerSize) voidset_maxCorrectionBits(int maxCorrectionBits)
-
Field Details
-
nativeObj
protected final long nativeObj
-
-
Constructor Details
-
Dictionary
protected Dictionary(long addr)
-
-
Method Details
-
getNativeObjAddr
public long getNativeObjAddr() -
__fromPtr__
-
create
SEE: generateCustomDictionary- Parameters:
nMarkers- automatically generatedmarkerSize- automatically generatedrandomSeed- automatically generated- Returns:
- automatically generated
-
create
SEE: generateCustomDictionary- Parameters:
nMarkers- automatically generatedmarkerSize- automatically generated- Returns:
- automatically generated
-
create_from
public static Dictionary create_from(int nMarkers, int markerSize, Dictionary baseDictionary, int randomSeed) SEE: generateCustomDictionary- Parameters:
nMarkers- automatically generatedmarkerSize- automatically generatedbaseDictionary- automatically generatedrandomSeed- automatically generated- Returns:
- automatically generated
-
create_from
SEE: generateCustomDictionary- Parameters:
nMarkers- automatically generatedmarkerSize- automatically generatedbaseDictionary- automatically generated- Returns:
- automatically generated
-
get
SEE: getPredefinedDictionary- Parameters:
dict- automatically generated- Returns:
- automatically generated
-
identify
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- Parameters:
onlyBits- automatically generatedidx- automatically generatedrotation- automatically generatedmaxCorrectionRate- automatically generated- Returns:
- automatically generated
-
getDistanceToId
Returns the distance of the input bits to the specific id. If allRotations is true, the four posible bits rotation are considered- Parameters:
bits- automatically generatedid- automatically generatedallRotations- automatically generated- Returns:
- automatically generated
-
getDistanceToId
Returns the distance of the input bits to the specific id. If allRotations is true, the four posible bits rotation are considered- Parameters:
bits- automatically generatedid- automatically generated- Returns:
- automatically generated
-
drawMarker
Draw a canonical marker image- Parameters:
id- automatically generatedsidePixels- automatically generated_img- automatically generatedborderBits- automatically generated
-
drawMarker
Draw a canonical marker image- Parameters:
id- automatically generatedsidePixels- automatically generated_img- automatically generated
-
getByteListFromBits
Transform matrix of bits to list of bytes in the 4 rotations- Parameters:
bits- automatically generated- Returns:
- automatically generated
-
getBitsFromByteList
Transform list of bytes to matrix of bits- Parameters:
byteList- automatically generatedmarkerSize- automatically generated- Returns:
- automatically generated
-
get_bytesList
-
set_bytesList
-
get_markerSize
public int get_markerSize() -
set_markerSize
public void set_markerSize(int markerSize) -
get_maxCorrectionBits
public int get_maxCorrectionBits() -
set_maxCorrectionBits
public void set_maxCorrectionBits(int maxCorrectionBits) -
finalize
-