View Source Evision.ArUco.Dictionary (Evision v0.2.9)

Summary

Types

t()

Type that represents an ArUco.Dictionary struct.

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

@spec dictionary() :: t() | {:error, String.t()}

Dictionary

Return
  • self: Dictionary

Python prototype (for reference only):

Dictionary() -> <aruco_Dictionary object>
@spec dictionary(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

dictionary(bytesList, markerSize)

View Source
@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>
Link to this function

dictionary(bytesList, markerSize, opts)

View Source
@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>
Link to this function

generateImageMarker(named_args)

View Source
@spec generateImageMarker(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

generateImageMarker(self, id, sidePixels)

View Source
@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
Link to this function

generateImageMarker(self, id, sidePixels, opts)

View Source
@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 get_markerSize(t()) :: integer()
Link to this function

get_maxCorrectionBits(self)

View Source
@spec get_maxCorrectionBits(t()) :: integer()
Link to this function

getBitsFromByteList(named_args)

View Source
@spec getBitsFromByteList(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

getBitsFromByteList(byteList, markerSize)

View Source
@spec getBitsFromByteList(Evision.Mat.maybe_mat_in(), integer()) ::
  Evision.Mat.t() | {:error, String.t()}

Transform list of bytes to matrix of bits

Positional Arguments
Return
  • retval: Evision.Mat.t()

Python prototype (for reference only):

getBitsFromByteList(byteList, markerSize) -> retval
Link to this function

getByteListFromBits(named_args)

View Source
@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
Return
  • retval: Evision.Mat.t()

Python prototype (for reference only):

getByteListFromBits(bits) -> retval
Link to this function

getDistanceToId(named_args)

View Source
@spec getDistanceToId(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

getDistanceToId(self, bits, id)

View Source
@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
Link to this function

getDistanceToId(self, bits, id, opts)

View Source
@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(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

identify(self, onlyBits, maxCorrectionRate)

View Source
@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
Link to this function

readDictionary(named_args)

View Source
@spec readDictionary(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

readDictionary(self, func)

View Source
@spec readDictionary(t(), Evision.FileNode.t()) :: boolean() | {:error, String.t()}

Read a new dictionary from FileNode.

Positional Arguments
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
Link to this function

set_bytesList(self, prop)

View Source
@spec set_bytesList(t(), Evision.Mat.maybe_mat_in()) :: t()
Link to this function

set_markerSize(self, prop)

View Source
@spec set_markerSize(t(), integer()) :: t()
Link to this function

set_maxCorrectionBits(self, prop)

View Source
@spec set_maxCorrectionBits(t(), integer()) :: t()
Link to this function

writeDictionary(named_args)

View Source
@spec writeDictionary(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

writeDictionary(self, fs)

View Source
@spec writeDictionary(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Write a dictionary to FileStorage, format is the same as in readDictionary().

Positional Arguments
Keyword Arguments

Python prototype (for reference only):

writeDictionary(fs[, name]) -> None
Link to this function

writeDictionary(self, fs, opts)

View Source
@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
Keyword Arguments

Python prototype (for reference only):

writeDictionary(fs[, name]) -> None