View Source Evision.ArUco.Dictionary (Evision v0.1.38)
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.t()
.bits for all ArUco markers in dictionary see memory layout in the class description
markerSize:
int
.ArUco marker size in units
Keyword Arguments
maxcorr:
int
.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(), [{atom(), term()}, ...] | nil) :: t() | {:error, String.t()}
Basic ArUco dictionary constructor
Positional Arguments
bytesList:
Evision.Mat.t()
.bits for all ArUco markers in dictionary see memory layout in the class description
markerSize:
int
.ArUco marker size in units
Keyword Arguments
maxcorr:
int
.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:
int
- sidePixels:
int
Keyword Arguments
- borderBits:
int
.
Return
- img:
Evision.Mat.t()
.
Python prototype (for reference only):
generateImageMarker(id, sidePixels[, _img[, borderBits]]) -> _img
@spec generateImageMarker(t(), integer(), integer(), [{atom(), term()}, ...] | nil) :: Evision.Mat.t() | {:error, String.t()}
Generate a canonical marker image
Positional Arguments
- self:
Evision.ArUco.Dictionary.t()
- id:
int
- sidePixels:
int
Keyword Arguments
- borderBits:
int
.
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.t()
- markerSize:
int
Return
- retval:
Evision.Mat.t()
Python prototype (for reference only):
getBitsFromByteList(byteList, markerSize) -> retval
@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.t()
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.t()
- id:
int
Keyword Arguments
- allRotations:
bool
.
Return
- retval:
int
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(), [{atom(), 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.t()
- id:
int
Keyword Arguments
- allRotations:
bool
.
Return
- retval:
int
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.t()
- maxCorrectionRate:
double
Return
- retval:
bool
- idx:
int
- rotation:
int
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()
- fn_:
Evision.FileNode.t()
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.t()
Keyword Arguments
- name:
String
.
Python prototype (for reference only):
writeDictionary(fs[, name]) -> None
@spec writeDictionary(t(), Evision.FileStorage.t(), [{atom(), 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.t()
Keyword Arguments
- name:
String
.
Python prototype (for reference only):
writeDictionary(fs[, name]) -> None