View Source Evision.ArUco (Evision v1.0.0-rc.0)

Summary

Types

t()

Type that represents an ArUco struct.

Functions

Draws a set of Charuco corners

Draw a set of detected ChArUco Diamond markers

Draw a set of detected ChArUco Diamond markers

Draw detected markers in image

Draw detected markers in image

Extend base dictionary by new nMarkers

Extend base dictionary by new nMarkers

Generate a canonical marker image

Generate a canonical marker image

Returns one of the predefined dictionaries referenced by DICT_*.

Types

@type t() :: %Evision.ArUco{ref: reference()}

Type that represents an ArUco struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

Link to this function

drawDetectedCornersCharuco(named_args)

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

drawDetectedCornersCharuco(image, charucoCorners)

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

Draws a set of Charuco corners

Positional Arguments
  • charucoCorners: Evision.Mat.

    vector of detected charuco corners

Keyword Arguments
  • charucoIds: Evision.Mat.

    list of identifiers for each corner in charucoCorners

  • cornerColor: Evision.scalar().

    color of the square surrounding each corner

Return
  • image: Evision.Mat.t().

    input/output image. It must have 1 or 3 channels. The number of channels is not altered.

This function draws a set of detected Charuco corners. If identifiers vector is provided, it also draws the id of each corner.

Python prototype (for reference only):

drawDetectedCornersCharuco(image, charucoCorners[, charucoIds[, cornerColor]]) -> image
Link to this function

drawDetectedCornersCharuco(image, charucoCorners, opts)

View Source
@spec drawDetectedCornersCharuco(
  Evision.Mat.maybe_mat_in(),
  Evision.Mat.maybe_mat_in(),
  [charucoIds: term(), cornerColor: term()] | nil
) :: Evision.Mat.t() | {:error, String.t()}

Draws a set of Charuco corners

Positional Arguments
  • charucoCorners: Evision.Mat.

    vector of detected charuco corners

Keyword Arguments
  • charucoIds: Evision.Mat.

    list of identifiers for each corner in charucoCorners

  • cornerColor: Evision.scalar().

    color of the square surrounding each corner

Return
  • image: Evision.Mat.t().

    input/output image. It must have 1 or 3 channels. The number of channels is not altered.

This function draws a set of detected Charuco corners. If identifiers vector is provided, it also draws the id of each corner.

Python prototype (for reference only):

drawDetectedCornersCharuco(image, charucoCorners[, charucoIds[, cornerColor]]) -> image
Link to this function

drawDetectedDiamonds(named_args)

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

drawDetectedDiamonds(image, diamondCorners)

View Source
@spec drawDetectedDiamonds(Evision.Mat.maybe_mat_in(), [Evision.Mat.maybe_mat_in()]) ::
  Evision.Mat.t() | {:error, String.t()}

Draw a set of detected ChArUco Diamond markers

Positional Arguments
  • diamondCorners: [Evision.Mat].

    positions of diamond corners in the same format returned by detectCharucoDiamond(). (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise.

Keyword Arguments
  • diamondIds: Evision.Mat.

    vector of identifiers for diamonds in diamondCorners, in the same format returned by detectCharucoDiamond() (e.g. std::vector<Vec4i>). Optional, if not provided, ids are not painted.

  • borderColor: Evision.scalar().

    color of marker borders. Rest of colors (text color and first corner color) are calculated based on this one.

Return
  • image: Evision.Mat.t().

    input/output image. It must have 1 or 3 channels. The number of channels is not altered.

Given an array of detected diamonds, this functions draws them in the image. The marker borders are painted and the markers identifiers if provided. Useful for debugging purposes.

Python prototype (for reference only):

drawDetectedDiamonds(image, diamondCorners[, diamondIds[, borderColor]]) -> image
Link to this function

drawDetectedDiamonds(image, diamondCorners, opts)

View Source
@spec drawDetectedDiamonds(
  Evision.Mat.maybe_mat_in(),
  [Evision.Mat.maybe_mat_in()],
  [borderColor: term(), diamondIds: term()] | nil
) :: Evision.Mat.t() | {:error, String.t()}

Draw a set of detected ChArUco Diamond markers

Positional Arguments
  • diamondCorners: [Evision.Mat].

    positions of diamond corners in the same format returned by detectCharucoDiamond(). (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise.

Keyword Arguments
  • diamondIds: Evision.Mat.

    vector of identifiers for diamonds in diamondCorners, in the same format returned by detectCharucoDiamond() (e.g. std::vector<Vec4i>). Optional, if not provided, ids are not painted.

  • borderColor: Evision.scalar().

    color of marker borders. Rest of colors (text color and first corner color) are calculated based on this one.

Return
  • image: Evision.Mat.t().

    input/output image. It must have 1 or 3 channels. The number of channels is not altered.

Given an array of detected diamonds, this functions draws them in the image. The marker borders are painted and the markers identifiers if provided. Useful for debugging purposes.

Python prototype (for reference only):

drawDetectedDiamonds(image, diamondCorners[, diamondIds[, borderColor]]) -> image
Link to this function

drawDetectedMarkers(named_args)

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

drawDetectedMarkers(image, corners)

View Source
@spec drawDetectedMarkers(Evision.Mat.maybe_mat_in(), [Evision.Mat.maybe_mat_in()]) ::
  Evision.Mat.t() | {:error, String.t()}

Draw detected markers in image

Positional Arguments
  • corners: [Evision.Mat].

    positions of marker corners on input image. (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise.

Keyword Arguments
  • ids: Evision.Mat.

    vector of identifiers for markers in markersCorners . Optional, if not provided, ids are not painted.

  • borderColor: Evision.scalar().

    color of marker borders. Rest of colors (text color and first corner color) are calculated based on this one to improve visualization.

Return
  • image: Evision.Mat.t().

    input/output image. It must have 1 or 3 channels. The number of channels is not altered.

Given an array of detected marker corners and its corresponding ids, this functions draws the markers in the image. The marker borders are painted and the markers identifiers if provided. Useful for debugging purposes.

Python prototype (for reference only):

drawDetectedMarkers(image, corners[, ids[, borderColor]]) -> image
Link to this function

drawDetectedMarkers(image, corners, opts)

View Source
@spec drawDetectedMarkers(
  Evision.Mat.maybe_mat_in(),
  [Evision.Mat.maybe_mat_in()],
  [borderColor: term(), ids: term()] | nil
) :: Evision.Mat.t() | {:error, String.t()}

Draw detected markers in image

Positional Arguments
  • corners: [Evision.Mat].

    positions of marker corners on input image. (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise.

Keyword Arguments
  • ids: Evision.Mat.

    vector of identifiers for markers in markersCorners . Optional, if not provided, ids are not painted.

  • borderColor: Evision.scalar().

    color of marker borders. Rest of colors (text color and first corner color) are calculated based on this one to improve visualization.

Return
  • image: Evision.Mat.t().

    input/output image. It must have 1 or 3 channels. The number of channels is not altered.

Given an array of detected marker corners and its corresponding ids, this functions draws the markers in the image. The marker borders are painted and the markers identifiers if provided. Useful for debugging purposes.

Python prototype (for reference only):

drawDetectedMarkers(image, corners[, ids[, borderColor]]) -> image
Link to this function

extendDictionary(named_args)

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

extendDictionary(nMarkers, markerSize)

View Source
@spec extendDictionary(integer(), integer()) ::
  Evision.ArUco.Dictionary.t() | {:error, String.t()}

Extend base dictionary by new nMarkers

Positional Arguments
  • nMarkers: integer().

    number of markers in the dictionary

  • markerSize: integer().

    number of bits per dimension of each markers

Keyword Arguments
  • baseDictionary: Dictionary.

    Include the markers in this dictionary at the beginning (optional)

  • randomSeed: integer().

    a user supplied seed for theRNG()

Return
  • retval: Dictionary

This function creates a new dictionary composed by nMarkers markers and each markers composed by markerSize x markerSize bits. If baseDictionary is provided, its markers are directly included and the rest are generated based on them. If the size of baseDictionary is higher than nMarkers, only the first nMarkers in baseDictionary are taken and no new marker is added.

Python prototype (for reference only):

extendDictionary(nMarkers, markerSize[, baseDictionary[, randomSeed]]) -> retval
Link to this function

extendDictionary(nMarkers, markerSize, opts)

View Source
@spec extendDictionary(
  integer(),
  integer(),
  [baseDictionary: term(), randomSeed: term()] | nil
) ::
  Evision.ArUco.Dictionary.t() | {:error, String.t()}

Extend base dictionary by new nMarkers

Positional Arguments
  • nMarkers: integer().

    number of markers in the dictionary

  • markerSize: integer().

    number of bits per dimension of each markers

Keyword Arguments
  • baseDictionary: Dictionary.

    Include the markers in this dictionary at the beginning (optional)

  • randomSeed: integer().

    a user supplied seed for theRNG()

Return
  • retval: Dictionary

This function creates a new dictionary composed by nMarkers markers and each markers composed by markerSize x markerSize bits. If baseDictionary is provided, its markers are directly included and the rest are generated based on them. If the size of baseDictionary is higher than nMarkers, only the first nMarkers in baseDictionary are taken and no new marker is added.

Python prototype (for reference only):

extendDictionary(nMarkers, markerSize[, baseDictionary[, randomSeed]]) -> retval
Link to this function

generateImageMarker(named_args)

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

generateImageMarker(dictionary, id, sidePixels)

View Source
@spec generateImageMarker(Evision.ArUco.Dictionary.t(), integer(), integer()) ::
  Evision.Mat.t() | {:error, String.t()}

Generate a canonical marker image

Positional Arguments
  • dictionary: Dictionary.

    dictionary of markers indicating the type of markers

  • id: integer().

    identifier of the marker that will be returned. It has to be a valid id in the specified dictionary.

  • sidePixels: integer().

    size of the image in pixels

Keyword Arguments
  • borderBits: integer().

    width of the marker border.

Return
  • img: Evision.Mat.t().

    output image with the marker

This function returns a marker image in its canonical form (i.e. ready to be printed)

Python prototype (for reference only):

generateImageMarker(dictionary, id, sidePixels[, img[, borderBits]]) -> img
Link to this function

generateImageMarker(dictionary, id, sidePixels, opts)

View Source
@spec generateImageMarker(
  Evision.ArUco.Dictionary.t(),
  integer(),
  integer(),
  [{:borderBits, term()}] | nil
) :: Evision.Mat.t() | {:error, String.t()}

Generate a canonical marker image

Positional Arguments
  • dictionary: Dictionary.

    dictionary of markers indicating the type of markers

  • id: integer().

    identifier of the marker that will be returned. It has to be a valid id in the specified dictionary.

  • sidePixels: integer().

    size of the image in pixels

Keyword Arguments
  • borderBits: integer().

    width of the marker border.

Return
  • img: Evision.Mat.t().

    output image with the marker

This function returns a marker image in its canonical form (i.e. ready to be printed)

Python prototype (for reference only):

generateImageMarker(dictionary, id, sidePixels[, img[, borderBits]]) -> img
Link to this function

getPredefinedDictionary(named_args)

View Source
@spec getPredefinedDictionary(Keyword.t()) :: any() | {:error, String.t()}
@spec getPredefinedDictionary(integer()) ::
  Evision.ArUco.Dictionary.t() | {:error, String.t()}

Returns one of the predefined dictionaries referenced by DICT_*.

Positional Arguments
  • dict: integer()
Return
  • retval: Dictionary

Python prototype (for reference only):

getPredefinedDictionary(dict) -> retval