OpenCV  3.4.20
Open Source Computer Vision
Classes | Enumerations | Functions
cv::aruco Namespace Reference

Classes

class  Board
 Board of markers. More...
 
class  CharucoBoard
 ChArUco board Specific class for ChArUco boards. A ChArUco board is a planar board where the markers are placed inside the white squares of a chessboard. The benefits of ChArUco boards is that they provide both, ArUco markers versatility and chessboard corner precision, which is important for calibration and pose estimation. This class also allows the easy creation and drawing of ChArUco boards. More...
 
struct  DetectorParameters
 Parameters for the detectMarker process: More...
 
class  Dictionary
 Dictionary/Set of markers. It contains the inner codification. More...
 
struct  EstimateParameters
 Pose estimation parameters. More...
 
class  GridBoard
 Planar board with grid arrangement of markers More common type of board. All markers are placed in the same plane in a grid arrangement. The board can be drawn using drawPlanarBoard() function (. More...
 

Enumerations

enum  CornerRefineMethod {
  CORNER_REFINE_NONE,
  CORNER_REFINE_SUBPIX,
  CORNER_REFINE_CONTOUR,
  CORNER_REFINE_APRILTAG
}
 
enum  PatternPos {
  CCW_center,
  CW_top_left_corner
}
 rvec/tvec define the right handed coordinate system of the marker. PatternPos defines center this system and axes direction. Axis X (red color) - first coordinate, axis Y (green color) - second coordinate, axis Z (blue color) - third coordinate. More...
 
enum  PREDEFINED_DICTIONARY_NAME {
  DICT_4X4_50 = 0,
  DICT_4X4_100,
  DICT_4X4_250,
  DICT_4X4_1000,
  DICT_5X5_50,
  DICT_5X5_100,
  DICT_5X5_250,
  DICT_5X5_1000,
  DICT_6X6_50,
  DICT_6X6_100,
  DICT_6X6_250,
  DICT_6X6_1000,
  DICT_7X7_50,
  DICT_7X7_100,
  DICT_7X7_250,
  DICT_7X7_1000,
  DICT_ARUCO_ORIGINAL,
  DICT_APRILTAG_16h5,
  DICT_APRILTAG_25h9,
  DICT_APRILTAG_36h10,
  DICT_APRILTAG_36h11
}
 Predefined markers dictionaries/sets Each dictionary indicates the number of bits and the number of markers contained. More...
 

Functions

void _drawPlanarBoardImpl (Board *board, Size outSize, OutputArray img, int marginSize=0, int borderBits=1)
 Implementation of drawPlanarBoard that accepts a raw Board pointer. More...
 
double calibrateCameraAruco (InputArrayOfArrays corners, InputArray ids, InputArray counter, const Ptr< Board > &board, Size imageSize, InputOutputArray cameraMatrix, InputOutputArray distCoeffs, OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs, OutputArray stdDeviationsIntrinsics, OutputArray stdDeviationsExtrinsics, OutputArray perViewErrors, int flags=0, TermCriteria criteria=TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, DBL_EPSILON))
 Calibrate a camera using aruco markers. More...
 
double calibrateCameraAruco (InputArrayOfArrays corners, InputArray ids, InputArray counter, const Ptr< Board > &board, Size imageSize, InputOutputArray cameraMatrix, InputOutputArray distCoeffs, OutputArrayOfArrays rvecs=noArray(), OutputArrayOfArrays tvecs=noArray(), int flags=0, TermCriteria criteria=TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, DBL_EPSILON))
 It's the same function as calibrateCameraAruco but without calibration error estimation. More...
 
double calibrateCameraCharuco (InputArrayOfArrays charucoCorners, InputArrayOfArrays charucoIds, const Ptr< CharucoBoard > &board, Size imageSize, InputOutputArray cameraMatrix, InputOutputArray distCoeffs, OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs, OutputArray stdDeviationsIntrinsics, OutputArray stdDeviationsExtrinsics, OutputArray perViewErrors, int flags=0, TermCriteria criteria=TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, DBL_EPSILON))
 Calibrate a camera using Charuco corners. More...
 
double calibrateCameraCharuco (InputArrayOfArrays charucoCorners, InputArrayOfArrays charucoIds, const Ptr< CharucoBoard > &board, Size imageSize, InputOutputArray cameraMatrix, InputOutputArray distCoeffs, OutputArrayOfArrays rvecs=noArray(), OutputArrayOfArrays tvecs=noArray(), int flags=0, TermCriteria criteria=TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, DBL_EPSILON))
 It's the same function as calibrateCameraCharuco but without calibration error estimation. More...
 
void detectCharucoDiamond (InputArray image, InputArrayOfArrays markerCorners, InputArray markerIds, float squareMarkerLengthRate, OutputArrayOfArrays diamondCorners, OutputArray diamondIds, InputArray cameraMatrix=noArray(), InputArray distCoeffs=noArray(), Ptr< Dictionary > dictionary=getPredefinedDictionary(PREDEFINED_DICTIONARY_NAME(0)))
 Detect ChArUco Diamond markers. More...
 
void detectMarkers (InputArray image, const Ptr< Dictionary > &dictionary, OutputArrayOfArrays corners, OutputArray ids, const Ptr< DetectorParameters > &parameters=DetectorParameters::create(), OutputArrayOfArrays rejectedImgPoints=noArray())
 Basic marker detection. More...
 
void drawCharucoDiamond (const Ptr< Dictionary > &dictionary, Vec4i ids, int squareLength, int markerLength, OutputArray img, int marginSize=0, int borderBits=1)
 Draw a ChArUco Diamond marker. More...
 
void drawDetectedCornersCharuco (InputOutputArray image, InputArray charucoCorners, InputArray charucoIds=noArray(), Scalar cornerColor=Scalar(255, 0, 0))
 Draws a set of Charuco corners. More...
 
void drawDetectedDiamonds (InputOutputArray image, InputArrayOfArrays diamondCorners, InputArray diamondIds=noArray(), Scalar borderColor=Scalar(0, 0, 255))
 Draw a set of detected ChArUco Diamond markers. More...
 
void drawDetectedMarkers (InputOutputArray image, InputArrayOfArrays corners, InputArray ids=noArray(), Scalar borderColor=Scalar(0, 255, 0))
 Draw detected markers in image. More...
 
void drawMarker (const Ptr< Dictionary > &dictionary, int id, int sidePixels, OutputArray img, int borderBits=1)
 Draw a canonical marker image. More...
 
void drawPlanarBoard (const Ptr< Board > &board, Size outSize, OutputArray img, int marginSize=0, int borderBits=1)
 Draw a planar board. More...
 
int estimatePoseBoard (InputArrayOfArrays corners, InputArray ids, const Ptr< Board > &board, InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess=false)
 Pose estimation for a board of markers. More...
 
bool estimatePoseCharucoBoard (InputArray charucoCorners, InputArray charucoIds, const Ptr< CharucoBoard > &board, InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess=false)
 Pose estimation for a ChArUco board given some of their corners. More...
 
void estimatePoseSingleMarkers (InputArrayOfArrays corners, float markerLength, InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvecs, OutputArray tvecs, OutputArray _objPoints=noArray(), Ptr< EstimateParameters > estimateParameters=EstimateParameters::create())
 Pose estimation for single markers. More...
 
Ptr< DictionarygenerateCustomDictionary (int nMarkers, int markerSize, int randomSeed=0)
 
Ptr< DictionarygenerateCustomDictionary (int nMarkers, int markerSize, const Ptr< Dictionary > &baseDictionary, int randomSeed=0)
 Generates a new customizable marker dictionary. More...
 
void getBoardObjectAndImagePoints (const Ptr< Board > &board, InputArrayOfArrays detectedCorners, InputArray detectedIds, OutputArray objPoints, OutputArray imgPoints)
 Given a board configuration and a set of detected markers, returns the corresponding image points and object points to call solvePnP. More...
 
Ptr< DictionarygetPredefinedDictionary (PREDEFINED_DICTIONARY_NAME name)
 Returns one of the predefined dictionaries defined in PREDEFINED_DICTIONARY_NAME. More...
 
Ptr< DictionarygetPredefinedDictionary (int dict)
 Returns one of the predefined dictionaries referenced by DICT_*. More...
 
int interpolateCornersCharuco (InputArrayOfArrays markerCorners, InputArray markerIds, InputArray image, const Ptr< CharucoBoard > &board, OutputArray charucoCorners, OutputArray charucoIds, InputArray cameraMatrix=noArray(), InputArray distCoeffs=noArray(), int minMarkers=2)
 Interpolate position of ChArUco board corners. More...
 
void refineDetectedMarkers (InputArray image, const Ptr< Board > &board, InputOutputArrayOfArrays detectedCorners, InputOutputArray detectedIds, InputOutputArrayOfArrays rejectedCorners, InputArray cameraMatrix=noArray(), InputArray distCoeffs=noArray(), float minRepDistance=10.f, float errorCorrectionRate=3.f, bool checkAllOrders=true, OutputArray recoveredIdxs=noArray(), const Ptr< DetectorParameters > &parameters=DetectorParameters::create())
 Refind not detected markers based on the already detected and the board layout. More...
 
bool testCharucoCornersCollinear (const Ptr< CharucoBoard > &_board, InputArray _charucoIds)
 test whether the ChArUco markers are collinear More...