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

Summary

Types

t()

Type that represents an ArUco.Board struct.

Functions

Common Board constructor

Draw a planar board

return the Dictionary of markers employed for this board

vector of the identifiers of the markers in the board (should be the same size as objPoints)

return array of object points of all the marker corners in the board.

get coordinate of the bottom right corner of the board, is set when calling the function create()

Given a board configuration and a set of detected markers, returns the corresponding image points and object points, can be used in solvePnP()

Given a board configuration and a set of detected markers, returns the corresponding image points and object points, can be used in solvePnP()

Types

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

Type that represents an ArUco.Board struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

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

board(objPoints, dictionary, ids)

View Source

Common Board constructor

Positional Arguments
  • objPoints: [Evision.Mat].

    array of object points of all the marker corners in the board

  • dictionary: Dictionary.

    the dictionary of markers employed for this board

  • ids: Evision.Mat.

    vector of the identifiers of the markers in the board

Return
  • self: Board

Python prototype (for reference only):

Board(objPoints, dictionary, ids) -> <aruco_Board object>
Link to this function

generateImage(named_args)

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

generateImage(self, outSize)

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

Draw a planar board

Positional Arguments
  • self: Evision.ArUco.Board.t()

  • outSize: Size.

    size of the output image in pixels.

Keyword Arguments
  • marginSize: integer().

    minimum margins (in pixels) of the board in the output image

  • borderBits: integer().

    width of the marker borders.

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

    output image with the board. The size of this image will be outSize and the board will be on the center, keeping the board proportions.

This function return the image of the board, ready to be printed.

Python prototype (for reference only):

generateImage(outSize[, img[, marginSize[, borderBits]]]) -> img
Link to this function

generateImage(self, outSize, opts)

View Source
@spec generateImage(
  t(),
  {number(), number()},
  [borderBits: term(), marginSize: term()] | nil
) ::
  Evision.Mat.t() | {:error, String.t()}

Draw a planar board

Positional Arguments
  • self: Evision.ArUco.Board.t()

  • outSize: Size.

    size of the output image in pixels.

Keyword Arguments
  • marginSize: integer().

    minimum margins (in pixels) of the board in the output image

  • borderBits: integer().

    width of the marker borders.

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

    output image with the board. The size of this image will be outSize and the board will be on the center, keeping the board proportions.

This function return the image of the board, ready to be printed.

Python prototype (for reference only):

generateImage(outSize[, img[, marginSize[, borderBits]]]) -> img
Link to this function

getDictionary(named_args)

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

return the Dictionary of markers employed for this board

Positional Arguments
  • self: Evision.ArUco.Board.t()
Return
  • retval: Dictionary

Python prototype (for reference only):

getDictionary() -> retval
@spec getIds(Keyword.t()) :: any() | {:error, String.t()}
@spec getIds(t()) :: [integer()] | {:error, String.t()}

vector of the identifiers of the markers in the board (should be the same size as objPoints)

Positional Arguments
  • self: Evision.ArUco.Board.t()
Return
  • retval: [integer()]

@return vector of the identifiers of the markers

Python prototype (for reference only):

getIds() -> retval
Link to this function

getObjPoints(named_args)

View Source
@spec getObjPoints(Keyword.t()) :: any() | {:error, String.t()}
@spec getObjPoints(t()) :: [[{number(), number(), number()}]] | {:error, String.t()}

return array of object points of all the marker corners in the board.

Positional Arguments
  • self: Evision.ArUco.Board.t()
Return
  • retval: [[Point3f]]

Each marker include its 4 corners in this order:

  • objPoints[i][0] - left-top point of i-th marker
  • objPoints[i][1] - right-top point of i-th marker
  • objPoints[i][2] - right-bottom point of i-th marker
  • objPoints[i][3] - left-bottom point of i-th marker

Markers are placed in a certain order - row by row, left to right in every row. For M markers, the size is Mx4.

Python prototype (for reference only):

getObjPoints() -> retval
Link to this function

getRightBottomCorner(named_args)

View Source
@spec getRightBottomCorner(Keyword.t()) :: any() | {:error, String.t()}
@spec getRightBottomCorner(t()) ::
  {number(), number(), number()} | {:error, String.t()}

get coordinate of the bottom right corner of the board, is set when calling the function create()

Positional Arguments
  • self: Evision.ArUco.Board.t()
Return
  • retval: Point3f

Python prototype (for reference only):

getRightBottomCorner() -> retval
Link to this function

matchImagePoints(named_args)

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

matchImagePoints(self, detectedCorners, detectedIds)

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

Given a board configuration and a set of detected markers, returns the corresponding image points and object points, can be used in solvePnP()

Positional Arguments
  • self: Evision.ArUco.Board.t()

  • detectedCorners: [Evision.Mat].

    List of detected marker corners of the board. For cv::Board and cv::GridBoard the method expects std::vector<std::vector<Point2f>> or std::vector<Mat> with Aruco marker corners. For cv::CharucoBoard the method expects std::vector<Point2f> or Mat with ChAruco corners (chess board corners matched with Aruco markers).

  • detectedIds: Evision.Mat.

    List of identifiers for each marker or charuco corner. For any Board class the method expects std::vector<int> or Mat.

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

    Vector of marker points in the board coordinate space. For any Board class the method expects std::vector<cv::Point3f> objectPoints or cv::Mat

  • imgPoints: Evision.Mat.t().

    Vector of marker points in the image coordinate space. For any Board class the method expects std::vector<cv::Point2f> objectPoints or cv::Mat

@sa solvePnP

Python prototype (for reference only):

matchImagePoints(detectedCorners, detectedIds[, objPoints[, imgPoints]]) -> objPoints, imgPoints
Link to this function

matchImagePoints(self, detectedCorners, detectedIds, opts)

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

Given a board configuration and a set of detected markers, returns the corresponding image points and object points, can be used in solvePnP()

Positional Arguments
  • self: Evision.ArUco.Board.t()

  • detectedCorners: [Evision.Mat].

    List of detected marker corners of the board. For cv::Board and cv::GridBoard the method expects std::vector<std::vector<Point2f>> or std::vector<Mat> with Aruco marker corners. For cv::CharucoBoard the method expects std::vector<Point2f> or Mat with ChAruco corners (chess board corners matched with Aruco markers).

  • detectedIds: Evision.Mat.

    List of identifiers for each marker or charuco corner. For any Board class the method expects std::vector<int> or Mat.

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

    Vector of marker points in the board coordinate space. For any Board class the method expects std::vector<cv::Point3f> objectPoints or cv::Mat

  • imgPoints: Evision.Mat.t().

    Vector of marker points in the image coordinate space. For any Board class the method expects std::vector<cv::Point2f> objectPoints or cv::Mat

@sa solvePnP

Python prototype (for reference only):

matchImagePoints(detectedCorners, detectedIds[, objPoints[, imgPoints]]) -> objPoints, imgPoints