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
imageInputArrayinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
charucoCornersPoint2f[]vector of detected charuco corners.
charucoIdsIEnumerable<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
imageInputArrayinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
charucoCornersPoint2f[]vector of detected charuco corners.
charucoIdsIEnumerable<int>list of identifiers for each corner in charucoCorners.
cornerColorScalarcolor 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
imageInputArrayinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
diamondCornersPoint2f[][]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.
diamondIdsIEnumerable<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
imageInputArrayinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
diamondCornersPoint2f[][]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.
diamondIdsIEnumerable<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.
borderColorScalarcolor 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
imageInputArrayinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
cornersPoint2f[][]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.
idsIEnumerable<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
imageInputArrayinput/output image. It must have 1 or 3 channels. The number of channels is not altered.
cornersPoint2f[][]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.
idsIEnumerable<int>vector of identifiers for markers in markersCorners. Optional, if not provided, ids are not painted.
borderColorScalarcolor 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
Returns
ReadDictionary(string)
Reads a new dictionary from FileNode.
public static Dictionary ReadDictionary(string dictionaryFile)
Parameters
dictionaryFilestringThe 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"