Classes | |
class | cv::aruco::Board |
Board of ArUco markers. More... | |
class | cv::aruco::GridBoard |
Planar board with grid arrangement of markers. More... | |
class | cv::aruco::CharucoBoard |
ChArUco board is a planar chessboard where the markers are placed inside the white squares of a chessboard. More... | |
struct | cv::aruco::DetectorParameters |
struct DetectorParameters is used by ArucoDetector More... | |
struct | cv::aruco::RefineParameters |
struct RefineParameters is used by ArucoDetector More... | |
class | cv::aruco::ArucoDetector |
The main functionality of ArucoDetector class is detection of markers in an image with detectMarkers() method. More... | |
class | cv::aruco::Dictionary |
Dictionary is a set of unique ArUco markers of the same size. More... | |
struct | cv::aruco::CharucoParameters |
class | cv::aruco::CharucoDetector |
Functions | |
CV_EXPORTS_W void | cv::aruco::drawDetectedMarkers (InputOutputArray image, InputArrayOfArrays corners, InputArray ids=noArray(), Scalar borderColor=Scalar(0, 255, 0)) |
Draw detected markers in image. More... | |
CV_EXPORTS_W void | cv::aruco::generateImageMarker (const Dictionary &dictionary, int id, int sidePixels, OutputArray img, int borderBits=1) |
Generate a canonical marker image. More... | |
CV_EXPORTS Dictionary | cv::aruco::getPredefinedDictionary (PredefinedDictionaryType name) |
Returns one of the predefined dictionaries defined in PredefinedDictionaryType. More... | |
CV_EXPORTS_W Dictionary | cv::aruco::getPredefinedDictionary (int dict) |
Returns one of the predefined dictionaries referenced by DICT_*. More... | |
CV_EXPORTS_W Dictionary | cv::aruco::extendDictionary (int nMarkers, int markerSize, const Dictionary &baseDictionary=Dictionary(), int randomSeed=0) |
Extend base dictionary by new nMarkers. More... | |
CV_EXPORTS_W void | cv::aruco::drawDetectedCornersCharuco (InputOutputArray image, InputArray charucoCorners, InputArray charucoIds=noArray(), Scalar cornerColor=Scalar(255, 0, 0)) |
Draws a set of Charuco corners. More... | |
CV_EXPORTS_W void | cv::aruco::drawDetectedDiamonds (InputOutputArray image, InputArrayOfArrays diamondCorners, InputArray diamondIds=noArray(), Scalar borderColor=Scalar(0, 0, 255)) |
Draw a set of detected ChArUco Diamond markers. More... | |
ArUco Marker Detection Square fiducial markers (also known as Augmented Reality Markers) are useful for easy, fast and robust camera pose estimation.
The main functionality of ArucoDetector class is detection of markers in an image. If the markers are grouped as a board, then you can try to recover the missing markers with ArucoDetector::refineDetectedMarkers(). ArUco markers can also be used for advanced chessboard corner finding. To do this, group the markers in the CharucoBoard and find the corners of the chessboard with the CharucoDetector::detectBoard().
The implementation is based on the ArUco Library by R. Muñoz-Salinas and S. Garrido-Jurado [Aruco2014].
Markers can also be detected based on the AprilTag 2 [wang2016iros] fiducial detection method.
Predefined markers dictionaries/sets.
Each dictionary indicates the number of bits and the number of markers contained
CV_EXPORTS_W void cv::aruco::drawDetectedCornersCharuco | ( | InputOutputArray | image, |
InputArray | charucoCorners, | ||
InputArray | charucoIds = noArray() , |
||
Scalar | cornerColor = Scalar(255, 0, 0) |
||
) |
Draws a set of Charuco corners.
image | input/output image. It must have 1 or 3 channels. The number of channels is not altered. |
charucoCorners | vector of detected charuco corners |
charucoIds | list of identifiers for each corner in charucoCorners |
cornerColor | color of the square surrounding each corner |
This function draws a set of detected Charuco corners. If identifiers vector is provided, it also draws the id of each corner.
CV_EXPORTS_W void cv::aruco::drawDetectedDiamonds | ( | InputOutputArray | image, |
InputArrayOfArrays | diamondCorners, | ||
InputArray | diamondIds = noArray() , |
||
Scalar | borderColor = Scalar(0, 0, 255) |
||
) |
Draw a set of detected ChArUco Diamond markers.
image | input/output image. It must have 1 or 3 channels. The number of channels is not altered. |
diamondCorners | 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 | 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 | color of marker borders. Rest of colors (text color and first corner color) are calculated based on this one. |
Given an array of detected diamonds, this functions draws them in the image. The marker borders are painted and the markers identifiers if provided. Useful for debugging purposes.
CV_EXPORTS_W void cv::aruco::drawDetectedMarkers | ( | InputOutputArray | image, |
InputArrayOfArrays | corners, | ||
InputArray | ids = noArray() , |
||
Scalar | borderColor = Scalar(0, 255, 0) |
||
) |
Draw detected markers in image.
image | input/output image. It must have 1 or 3 channels. The number of channels is not altered. |
corners | positions of marker corners on input image. (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. |
ids | vector of identifiers for markers in markersCorners . Optional, if not provided, ids are not painted. |
borderColor | color of marker borders. Rest of colors (text color and first corner color) are calculated based on this one to improve visualization. |
Given an array of detected marker corners and its corresponding ids, this functions draws the markers in the image. The marker borders are painted and the markers identifiers if provided. Useful for debugging purposes.
CV_EXPORTS_W Dictionary cv::aruco::extendDictionary | ( | int | nMarkers, |
int | markerSize, | ||
const Dictionary & | baseDictionary = Dictionary() , |
||
int | randomSeed = 0 |
||
) |
Extend base dictionary by new nMarkers.
nMarkers | number of markers in the dictionary |
markerSize | number of bits per dimension of each markers |
baseDictionary | Include the markers in this dictionary at the beginning (optional) |
randomSeed | a user supplied seed for theRNG() |
This function creates a new dictionary composed by nMarkers markers and each markers composed by markerSize x markerSize bits. If baseDictionary is provided, its markers are directly included and the rest are generated based on them. If the size of baseDictionary is higher than nMarkers, only the first nMarkers in baseDictionary are taken and no new marker is added.
CV_EXPORTS_W void cv::aruco::generateImageMarker | ( | const Dictionary & | dictionary, |
int | id, | ||
int | sidePixels, | ||
OutputArray | img, | ||
int | borderBits = 1 |
||
) |
Generate a canonical marker image.
dictionary | dictionary of markers indicating the type of markers |
id | identifier of the marker that will be returned. It has to be a valid id in the specified dictionary. |
sidePixels | size of the image in pixels |
img | output image with the marker |
borderBits | width of the marker border. |
This function returns a marker image in its canonical form (i.e. ready to be printed)
CV_EXPORTS_W Dictionary cv::aruco::getPredefinedDictionary | ( | int | dict | ) |
Returns one of the predefined dictionaries referenced by DICT_*.
CV_EXPORTS Dictionary cv::aruco::getPredefinedDictionary | ( | PredefinedDictionaryType | name | ) |
Returns one of the predefined dictionaries defined in PredefinedDictionaryType.