Table of Contents

Class CvAruco

Namespace
OpenCvSharp.Aruco
Assembly
OpenCvSharp.dll

aruco module

public static class CvAruco
Inheritance
CvAruco
Inherited Members

Methods

DrawDetectedCornersCharuco(InputArray, Point2f[], IEnumerable<int>?)

Draw a set of detected ChArUco Diamond markers.

public static void DrawDetectedCornersCharuco(InputArray image, Point2f[] charucoCorners, IEnumerable<int>? charucoIds = null)

Parameters

image InputArray

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

charucoCorners Point2f[]

vector of detected charuco corners.

charucoIds IEnumerable<int>

list of identifiers for each corner in charucoCorners.

DrawDetectedCornersCharuco(InputArray, Point2f[], IEnumerable<int>?, Scalar)

Draw a set of detected ChArUco Diamond markers.

public static void DrawDetectedCornersCharuco(InputArray image, Point2f[] charucoCorners, IEnumerable<int>? charucoIds, Scalar cornerColor)

Parameters

image InputArray

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

charucoCorners Point2f[]

vector of detected charuco corners.

charucoIds IEnumerable<int>

list of identifiers for each corner in charucoCorners.

cornerColor Scalar

color of the square surrounding each corner.

DrawDetectedDiamonds(InputArray, Point2f[][], IEnumerable<Vec4i>?)

Draw a set of detected ChArUco Diamond markers.

public static void DrawDetectedDiamonds(InputArray image, Point2f[][] diamondCorners, IEnumerable<Vec4i>? diamondIds = null)

Parameters

image InputArray

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

diamondCorners Point2f[][]

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.

diamondIds IEnumerable<Vec4i>

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.

DrawDetectedDiamonds(InputArray, Point2f[][], IEnumerable<Vec4i>?, Scalar)

Draw a set of detected ChArUco Diamond markers.

public static void DrawDetectedDiamonds(InputArray image, Point2f[][] diamondCorners, IEnumerable<Vec4i>? diamondIds, Scalar borderColor)

Parameters

image InputArray

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

diamondCorners Point2f[][]

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.

diamondIds IEnumerable<Vec4i>

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 Scalar

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

DrawDetectedMarkers(InputArray, Point2f[][], IEnumerable<int>)

Draw detected markers in image

public static void DrawDetectedMarkers(InputArray image, Point2f[][] corners, IEnumerable<int> ids)

Parameters

image InputArray

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

corners Point2f[][]

positions of marker corners on input image. For N detected markers, the dimensions of this array should be Nx4.The order of the corners should be clockwise.

ids IEnumerable<int>

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

DrawDetectedMarkers(InputArray, Point2f[][], IEnumerable<int>?, Scalar)

Draw detected markers in image

public static void DrawDetectedMarkers(InputArray image, Point2f[][] corners, IEnumerable<int>? ids, Scalar borderColor)

Parameters

image InputArray

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

corners Point2f[][]

positions of marker corners on input image. For N detected markers, the dimensions of this array should be Nx4.The order of the corners should be clockwise.

ids IEnumerable<int>

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

borderColor Scalar

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

GetPredefinedDictionary(PredefinedDictionaryType)

Returns one of the predefined dictionaries defined in PREDEFINED_DICTIONARY_NAME

public static Dictionary GetPredefinedDictionary(PredefinedDictionaryType name)

Parameters

name PredefinedDictionaryType

Returns

Dictionary

ReadDictionary(string)

Reads a new dictionary from FileNode.

public static Dictionary ReadDictionary(string dictionaryFile)

Parameters

dictionaryFile string

The path of the dictionary file

Returns

Dictionary

Instance of a Dictionary

Remarks

Dictionary format is YAML see sample below

nmarkers: 35
markersize: 6
maxCorrectionBits: 5
marker_0: "101011111011111001001001101100000000"
...
marker_34: "011111010000111011111110110101100101"