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

Summary

Types

t()

Type that represents an ArUco.CharucoDetector struct.

Functions

Basic CharucoDetector constructor

Basic CharucoDetector constructor

Clears the algorithm state

detect aruco markers and interpolate position of ChArUco board corners

detect aruco markers and interpolate position of ChArUco board corners

Detect ChArUco Diamond markers

Detect ChArUco Diamond markers

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

getCharucoParameters

getDetectorParameters

getRefineParameters

Reads algorithm parameters from a file storage

Stores algorithm parameters in a file storage

Types

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

Type that represents an ArUco.CharucoDetector struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

Link to this function

charucoDetector(named_args)

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

Basic CharucoDetector constructor

Positional Arguments
Keyword Arguments
  • charucoParams: CharucoParameters.

    charuco detection parameters

  • detectorParams: DetectorParameters.

    marker detection parameters

  • refineParams: RefineParameters.

    marker refine detection parameters

Return
  • self: CharucoDetector

Python prototype (for reference only):

CharucoDetector(board[, charucoParams[, detectorParams[, refineParams]]]) -> <aruco_CharucoDetector object>
Link to this function

charucoDetector(board, opts)

View Source
@spec charucoDetector(
  Evision.ArUco.CharucoBoard.t(),
  [charucoParams: term(), detectorParams: term(), refineParams: term()] | nil
) :: t() | {:error, String.t()}

Basic CharucoDetector constructor

Positional Arguments
Keyword Arguments
  • charucoParams: CharucoParameters.

    charuco detection parameters

  • detectorParams: DetectorParameters.

    marker detection parameters

  • refineParams: RefineParameters.

    marker refine detection parameters

Return
  • self: CharucoDetector

Python prototype (for reference only):

CharucoDetector(board[, charucoParams[, detectorParams[, refineParams]]]) -> <aruco_CharucoDetector object>
@spec clear(Keyword.t()) :: any() | {:error, String.t()}
@spec clear(t()) :: t() | {:error, String.t()}

Clears the algorithm state

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

Python prototype (for reference only):

clear() -> None
@spec detectBoard(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

detectBoard(self, image)

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

detect aruco markers and interpolate position of ChArUco board corners

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

  • image: Evision.Mat.

    input image necesary for corner refinement. Note that markers are not detected and should be sent in corners and ids parameters.

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

    interpolated chessboard corners.

  • charucoIds: Evision.Mat.t().

    interpolated chessboard corners identifiers.

  • markerCorners: [Evision.Mat].

    vector of already detected markers corners. For each marker, its four corners are provided, (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. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.

  • markerIds: Evision.Mat.t().

    list of identifiers for each marker in corners. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.

This function receives the detected markers and returns the 2D position of the chessboard corners from a ChArUco board using the detected Aruco markers. If markerCorners and markerCorners are empty, the detectMarkers() will run and detect aruco markers and ids. If camera parameters are provided, the process is based in an approximated pose estimation, else it is based on local homography. Only visible corners are returned. For each corner, its corresponding identifier is also returned in charucoIds. @sa findChessboardCorners Note: After OpenCV 4.6.0, there was an incompatible change in the ChArUco pattern generation algorithm for even row counts. Use cv::aruco::CharucoBoard::setLegacyPattern() to ensure compatibility with patterns created using OpenCV versions prior to 4.6.0. For more information, see the issue: https://github.com/opencv/opencv/issues/23152

Python prototype (for reference only):

detectBoard(image[, charucoCorners[, charucoIds[, markerCorners[, markerIds]]]]) -> charucoCorners, charucoIds, markerCorners, markerIds
Link to this function

detectBoard(self, image, opts)

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

detect aruco markers and interpolate position of ChArUco board corners

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

  • image: Evision.Mat.

    input image necesary for corner refinement. Note that markers are not detected and should be sent in corners and ids parameters.

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

    interpolated chessboard corners.

  • charucoIds: Evision.Mat.t().

    interpolated chessboard corners identifiers.

  • markerCorners: [Evision.Mat].

    vector of already detected markers corners. For each marker, its four corners are provided, (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. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.

  • markerIds: Evision.Mat.t().

    list of identifiers for each marker in corners. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.

This function receives the detected markers and returns the 2D position of the chessboard corners from a ChArUco board using the detected Aruco markers. If markerCorners and markerCorners are empty, the detectMarkers() will run and detect aruco markers and ids. If camera parameters are provided, the process is based in an approximated pose estimation, else it is based on local homography. Only visible corners are returned. For each corner, its corresponding identifier is also returned in charucoIds. @sa findChessboardCorners Note: After OpenCV 4.6.0, there was an incompatible change in the ChArUco pattern generation algorithm for even row counts. Use cv::aruco::CharucoBoard::setLegacyPattern() to ensure compatibility with patterns created using OpenCV versions prior to 4.6.0. For more information, see the issue: https://github.com/opencv/opencv/issues/23152

Python prototype (for reference only):

detectBoard(image[, charucoCorners[, charucoIds[, markerCorners[, markerIds]]]]) -> charucoCorners, charucoIds, markerCorners, markerIds
Link to this function

detectDiamonds(named_args)

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

detectDiamonds(self, image)

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

Detect ChArUco Diamond markers

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

  • image: Evision.Mat.

    input image necessary for corner subpixel.

Return
  • diamondCorners: [Evision.Mat].

    output list of detected diamond corners (4 corners per diamond). The order is the same than in marker corners: top left, top right, bottom right and bottom left. Similar format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).

  • diamondIds: Evision.Mat.t().

    ids of the diamonds in diamondCorners. The id of each diamond is in fact of type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the diamond.

  • markerCorners: [Evision.Mat].

    list of detected marker corners from detectMarkers function. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.

  • markerIds: Evision.Mat.t().

    list of marker ids in markerCorners. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.

This function detects Diamond markers from the previous detected ArUco markers. The diamonds are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters are provided, the diamond search is based on reprojection. If not, diamond search is based on homography. Homography is faster than reprojection, but less accurate.

Python prototype (for reference only):

detectDiamonds(image[, diamondCorners[, diamondIds[, markerCorners[, markerIds]]]]) -> diamondCorners, diamondIds, markerCorners, markerIds
Link to this function

detectDiamonds(self, image, opts)

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

Detect ChArUco Diamond markers

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

  • image: Evision.Mat.

    input image necessary for corner subpixel.

Return
  • diamondCorners: [Evision.Mat].

    output list of detected diamond corners (4 corners per diamond). The order is the same than in marker corners: top left, top right, bottom right and bottom left. Similar format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).

  • diamondIds: Evision.Mat.t().

    ids of the diamonds in diamondCorners. The id of each diamond is in fact of type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the diamond.

  • markerCorners: [Evision.Mat].

    list of detected marker corners from detectMarkers function. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.

  • markerIds: Evision.Mat.t().

    list of marker ids in markerCorners. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.

This function detects Diamond markers from the previous detected ArUco markers. The diamonds are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters are provided, the diamond search is based on reprojection. If not, diamond search is based on homography. Homography is faster than reprojection, but less accurate.

Python prototype (for reference only):

detectDiamonds(image[, diamondCorners[, diamondIds[, markerCorners[, markerIds]]]]) -> diamondCorners, diamondIds, markerCorners, markerIds
@spec empty(Keyword.t()) :: any() | {:error, String.t()}
@spec empty(t()) :: boolean() | {:error, String.t()}

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

Positional Arguments
  • self: Evision.ArUco.CharucoDetector.t()
Return
  • retval: bool

Python prototype (for reference only):

empty() -> retval
@spec getBoard(Keyword.t()) :: any() | {:error, String.t()}
@spec getBoard(t()) :: Evision.ArUco.CharucoBoard.t() | {:error, String.t()}

getBoard

Positional Arguments
  • self: Evision.ArUco.CharucoDetector.t()
Return
  • retval: Evision.ArUco.CharucoBoard.t()

Python prototype (for reference only):

getBoard() -> retval
Link to this function

getCharucoParameters(named_args)

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

getCharucoParameters

Positional Arguments
  • self: Evision.ArUco.CharucoDetector.t()
Return
  • retval: CharucoParameters

Python prototype (for reference only):

getCharucoParameters() -> retval
Link to this function

getDefaultName(named_args)

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

getDefaultName

Positional Arguments
  • self: Evision.ArUco.CharucoDetector.t()
Return

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.

Python prototype (for reference only):

getDefaultName() -> retval
Link to this function

getDetectorParameters(named_args)

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

getDetectorParameters

Positional Arguments
  • self: Evision.ArUco.CharucoDetector.t()
Return
  • retval: DetectorParameters

Python prototype (for reference only):

getDetectorParameters() -> retval
Link to this function

getRefineParameters(named_args)

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

getRefineParameters

Positional Arguments
  • self: Evision.ArUco.CharucoDetector.t()
Return
  • retval: RefineParameters

Python prototype (for reference only):

getRefineParameters() -> retval
@spec read(Keyword.t()) :: any() | {:error, String.t()}
@spec read(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}

Reads algorithm parameters from a file storage

Positional Arguments

Python prototype (for reference only):

read(fn) -> None
@spec save(Keyword.t()) :: any() | {:error, String.t()}
@spec save(t(), binary()) :: t() | {:error, String.t()}

save

Positional Arguments
  • self: Evision.ArUco.CharucoDetector.t()
  • filename: String

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).

Python prototype (for reference only):

save(filename) -> None
@spec setBoard(Keyword.t()) :: any() | {:error, String.t()}
@spec setBoard(t(), Evision.ArUco.CharucoBoard.t()) :: t() | {:error, String.t()}

setBoard

Positional Arguments

Python prototype (for reference only):

setBoard(board) -> None
Link to this function

setCharucoParameters(named_args)

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

setCharucoParameters(self, charucoParameters)

View Source
@spec setCharucoParameters(t(), Evision.ArUco.CharucoParameters.t()) ::
  t() | {:error, String.t()}

setCharucoParameters

Positional Arguments
  • self: Evision.ArUco.CharucoDetector.t()
  • charucoParameters: CharucoParameters

Python prototype (for reference only):

setCharucoParameters(charucoParameters) -> None
Link to this function

setDetectorParameters(named_args)

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

setDetectorParameters(self, detectorParameters)

View Source
@spec setDetectorParameters(t(), Evision.ArUco.DetectorParameters.t()) ::
  t() | {:error, String.t()}

setDetectorParameters

Positional Arguments
  • self: Evision.ArUco.CharucoDetector.t()
  • detectorParameters: DetectorParameters

Python prototype (for reference only):

setDetectorParameters(detectorParameters) -> None
Link to this function

setRefineParameters(named_args)

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

setRefineParameters(self, refineParameters)

View Source
@spec setRefineParameters(t(), Evision.ArUco.RefineParameters.t()) ::
  t() | {:error, String.t()}

setRefineParameters

Positional Arguments
  • self: Evision.ArUco.CharucoDetector.t()
  • refineParameters: RefineParameters

Python prototype (for reference only):

setRefineParameters(refineParameters) -> None
@spec write(Keyword.t()) :: any() | {:error, String.t()}
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Stores algorithm parameters in a file storage

Positional Arguments

Python prototype (for reference only):

write(fs) -> None
@spec write(t(), Evision.FileStorage.t(), binary()) :: t() | {:error, String.t()}

write

Positional Arguments

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None