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

Link to this section 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

getBoard

getCharucoParameters

getDefaultName

getDetectorParameters

getRefineParameters

Reads algorithm parameters from a file storage

Stores algorithm parameters in a file storage

Link to this section Types

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

Type that represents an ArUco.CharucoDetector struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

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

Basic CharucoDetector constructor

Positional Arguments
  • board: Evision.ArUco.CharucoBoard.t().

    ChAruco board

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(), [{atom(), term()}, ...] | nil) ::
  t() | {:error, String.t()}

Basic CharucoDetector constructor

Positional Arguments
  • board: Evision.ArUco.CharucoBoard.t().

    ChAruco board

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(t()) :: t() | {:error, String.t()}

Clears the algorithm state

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

Python prototype (for reference only):

clear() -> None
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.t().

    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

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.t().

    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

Python prototype (for reference only):

detectBoard(image[, charucoCorners[, charucoIds[, markerCorners[, markerIds]]]]) -> charucoCorners, charucoIds, markerCorners, markerIds
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.t().

    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].

    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.t().

    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].

    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(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(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(self)

View Source
@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
@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(self)

View Source
@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(self)

View Source
@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(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}

Reads algorithm parameters from a file storage

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

Python prototype (for reference only):

read(fn_) -> None
@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(t(), Evision.ArUco.CharucoBoard.t()) :: t() | {:error, String.t()}

setBoard

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

Python prototype (for reference only):

setBoard(board) -> None
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(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(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(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Stores algorithm parameters in a file storage

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

Python prototype (for reference only):

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

write

Positional Arguments
  • self: Evision.ArUco.CharucoDetector.t()
  • fs: Evision.FileStorage.t()
  • name: String

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None