View Source Evision.ArUco.Dictionary (Evision v0.2.9)
Summary
Functions
Dictionary
Basic ArUco dictionary constructor
Basic ArUco dictionary constructor
Generate a canonical marker image
Generate a canonical marker image
Transform list of bytes to matrix of bits
Transform matrix of bits to list of bytes with 4 marker rotations
Returns Hamming distance of the input bits to the specific id.
Returns Hamming distance of the input bits to the specific id.
Given a matrix of bits. Returns whether if marker is identified or not.
Read a new dictionary from FileNode.
Write a dictionary to FileStorage, format is the same as in readDictionary().
Write a dictionary to FileStorage, format is the same as in readDictionary().
Types
@type t() :: %Evision.ArUco.Dictionary{ref: reference()}
Type that represents an ArUco.Dictionary
struct.
ref.
reference()
The underlying erlang resource variable.
Functions
Dictionary
Return
- self:
Dictionary
Python prototype (for reference only):
Dictionary() -> <aruco_Dictionary object>
@spec dictionary(Evision.Mat.maybe_mat_in(), integer()) :: t() | {:error, String.t()}
Basic ArUco dictionary constructor
Positional Arguments
bytesList:
Evision.Mat
.bits for all ArUco markers in dictionary see memory layout in the class description
markerSize:
integer()
.ArUco marker size in units
Keyword Arguments
maxcorr:
integer()
.maximum number of bits that can be corrected
Return
- self:
Dictionary
Python prototype (for reference only):
Dictionary(bytesList, _markerSize[, maxcorr]) -> <aruco_Dictionary object>
@spec dictionary(Evision.Mat.maybe_mat_in(), integer(), [{:maxcorr, term()}] | nil) :: t() | {:error, String.t()}
Basic ArUco dictionary constructor
Positional Arguments
bytesList:
Evision.Mat
.bits for all ArUco markers in dictionary see memory layout in the class description
markerSize:
integer()
.ArUco marker size in units
Keyword Arguments
maxcorr:
integer()
.maximum number of bits that can be corrected
Return
- self:
Dictionary
Python prototype (for reference only):
Dictionary(bytesList, _markerSize[, maxcorr]) -> <aruco_Dictionary object>
@spec generateImageMarker(t(), integer(), integer()) :: Evision.Mat.t() | {:error, String.t()}
Generate a canonical marker image
Positional Arguments
- self:
Evision.ArUco.Dictionary.t()
- id:
integer()
- sidePixels:
integer()
Keyword Arguments
- borderBits:
integer()
.
Return
- img:
Evision.Mat.t()
.
Python prototype (for reference only):
generateImageMarker(id, sidePixels[, _img[, borderBits]]) -> _img
@spec generateImageMarker(t(), integer(), integer(), [{:borderBits, term()}] | nil) :: Evision.Mat.t() | {:error, String.t()}
Generate a canonical marker image
Positional Arguments
- self:
Evision.ArUco.Dictionary.t()
- id:
integer()
- sidePixels:
integer()
Keyword Arguments
- borderBits:
integer()
.
Return
- img:
Evision.Mat.t()
.
Python prototype (for reference only):
generateImageMarker(id, sidePixels[, _img[, borderBits]]) -> _img
@spec get_bytesList(t()) :: Evision.Mat.t()
@spec getBitsFromByteList(Evision.Mat.maybe_mat_in(), integer()) :: Evision.Mat.t() | {:error, String.t()}
Transform list of bytes to matrix of bits
Positional Arguments
- byteList:
Evision.Mat
- markerSize:
integer()
Return
- retval:
Evision.Mat.t()
Python prototype (for reference only):
getBitsFromByteList(byteList, markerSize) -> retval
@spec getByteListFromBits(Keyword.t()) :: any() | {:error, String.t()}
@spec getByteListFromBits(Evision.Mat.maybe_mat_in()) :: Evision.Mat.t() | {:error, String.t()}
Transform matrix of bits to list of bytes with 4 marker rotations
Positional Arguments
- bits:
Evision.Mat
Return
- retval:
Evision.Mat.t()
Python prototype (for reference only):
getByteListFromBits(bits) -> retval
@spec getDistanceToId(t(), Evision.Mat.maybe_mat_in(), integer()) :: integer() | {:error, String.t()}
Returns Hamming distance of the input bits to the specific id.
Positional Arguments
- self:
Evision.ArUco.Dictionary.t()
- bits:
Evision.Mat
- id:
integer()
Keyword Arguments
- allRotations:
bool
.
Return
- retval:
integer()
If allRotations
flag is set, the four posible marker rotations are considered
Python prototype (for reference only):
getDistanceToId(bits, id[, allRotations]) -> retval
@spec getDistanceToId( t(), Evision.Mat.maybe_mat_in(), integer(), [{:allRotations, term()}] | nil ) :: integer() | {:error, String.t()}
Returns Hamming distance of the input bits to the specific id.
Positional Arguments
- self:
Evision.ArUco.Dictionary.t()
- bits:
Evision.Mat
- id:
integer()
Keyword Arguments
- allRotations:
bool
.
Return
- retval:
integer()
If allRotations
flag is set, the four posible marker rotations are considered
Python prototype (for reference only):
getDistanceToId(bits, id[, allRotations]) -> retval
@spec identify(t(), Evision.Mat.maybe_mat_in(), number()) :: {integer(), integer()} | false | {:error, String.t()}
Given a matrix of bits. Returns whether if marker is identified or not.
Positional Arguments
- self:
Evision.ArUco.Dictionary.t()
- onlyBits:
Evision.Mat
- maxCorrectionRate:
double
Return
- retval:
bool
- idx:
integer()
- rotation:
integer()
Returns reference to the marker id in the dictionary (if any) and its rotation.
Python prototype (for reference only):
identify(onlyBits, maxCorrectionRate) -> retval, idx, rotation
@spec readDictionary(t(), Evision.FileNode.t()) :: boolean() | {:error, String.t()}
Read a new dictionary from FileNode.
Positional Arguments
- self:
Evision.ArUco.Dictionary.t()
- func:
Evision.FileNode
Return
- retval:
bool
Dictionary example in YAML format:\n nmarkers: 35\n markersize: 6\n maxCorrectionBits: 5\n marker_0: "101011111011111001001001101100000000"\n ...\n marker_34: "011111010000111011111110110101100101"
Python prototype (for reference only):
readDictionary(fn) -> retval
@spec set_bytesList(t(), Evision.Mat.maybe_mat_in()) :: t()
@spec writeDictionary(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}
Write a dictionary to FileStorage, format is the same as in readDictionary().
Positional Arguments
- self:
Evision.ArUco.Dictionary.t()
- fs:
Evision.FileStorage
Keyword Arguments
- name:
String
.
Python prototype (for reference only):
writeDictionary(fs[, name]) -> None
@spec writeDictionary(t(), Evision.FileStorage.t(), [{:name, term()}] | nil) :: t() | {:error, String.t()}
Write a dictionary to FileStorage, format is the same as in readDictionary().
Positional Arguments
- self:
Evision.ArUco.Dictionary.t()
- fs:
Evision.FileStorage
Keyword Arguments
- name:
String
.
Python prototype (for reference only):
writeDictionary(fs[, name]) -> None