View Source Evision.ArUco.Dictionary (Evision v1.0.0-rc.0)
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 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.
Get ground truth bits float
Get ground truth bits float
Given a matrix of bits. Returns whether if marker is identified or not.
Given a matrix of pixel ratio raging from 0 to 1. 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()
Keyword Arguments
- rotationId:
integer().
Return
- retval:
Evision.Mat.t()
Python prototype (for reference only):
getBitsFromByteList(byteList, markerSize[, rotationId]) -> retval
@spec getBitsFromByteList( Evision.Mat.maybe_mat_in(), integer(), [{:rotationId, term()}] | nil ) :: Evision.Mat.t() | {:error, String.t()}
Transform list of bytes to matrix of bits
Positional Arguments
- byteList:
Evision.Mat - markerSize:
integer()
Keyword Arguments
- rotationId:
integer().
Return
- retval:
Evision.Mat.t()
Python prototype (for reference only):
getBitsFromByteList(byteList, markerSize[, rotationId]) -> 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 possible 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 possible marker rotations are considered
Python prototype (for reference only):
getDistanceToId(bits, id[, allRotations]) -> retval
@spec getMarkerBits(t(), integer()) :: Evision.Mat.t() | {:error, String.t()}
Get ground truth bits float
Positional Arguments
- self:
Evision.ArUco.Dictionary.t() - markerId:
integer()
Keyword Arguments
- rotationId:
integer().
Return
- retval:
Evision.Mat.t()
Python prototype (for reference only):
getMarkerBits(markerId[, rotationId]) -> retval
@spec getMarkerBits(t(), integer(), [{:rotationId, term()}] | nil) :: Evision.Mat.t() | {:error, String.t()}
Get ground truth bits float
Positional Arguments
- self:
Evision.ArUco.Dictionary.t() - markerId:
integer()
Keyword Arguments
- rotationId:
integer().
Return
- retval:
Evision.Mat.t()
Python prototype (for reference only):
getMarkerBits(markerId[, rotationId]) -> 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
identify(self, onlyCellPixelRatio, maxCorrectionRate, validBitIdThreshold)
View Source@spec identify(t(), Evision.Mat.maybe_mat_in(), number(), number()) :: {integer(), integer()} | false | {:error, String.t()}
Given a matrix of pixel ratio raging from 0 to 1. Returns whether if marker is identified or not.
Positional Arguments
- self:
Evision.ArUco.Dictionary.t() - onlyCellPixelRatio:
Evision.Mat - maxCorrectionRate:
double - validBitIdThreshold:
float
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(onlyCellPixelRatio, maxCorrectionRate, validBitIdThreshold) -> 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