OpenCV  3.4.4
Open Source Computer Vision
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cv::aruco::CharucoBoard Class Reference

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

#include "charuco.hpp"

Inheritance diagram for cv::aruco::CharucoBoard:
cv::aruco::Board

Public Member Functions

void draw (Size outSize, OutputArray img, int marginSize=0, int borderBits=1)
 Draw a ChArUco board. More...
 
Size getChessboardSize () const
 
float getMarkerLength () const
 
float getSquareLength () const
 

Static Public Member Functions

static Ptr< CharucoBoardcreate (int squaresX, int squaresY, float squareLength, float markerLength, const Ptr< Dictionary > &dictionary)
 Create a CharucoBoard object. More...
 
- Static Public Member Functions inherited from cv::aruco::Board
static Ptr< Boardcreate (InputArrayOfArrays objPoints, const Ptr< Dictionary > &dictionary, InputArray ids)
 Provide way to create Board by passing nessesary data. Specially needed in Python. More...
 

Public Attributes

std::vector< Point3fchessboardCorners
 
std::vector< std::vector< int > > nearestMarkerCorners
 
std::vector< std::vector< int > > nearestMarkerIdx
 
- Public Attributes inherited from cv::aruco::Board
Ptr< Dictionarydictionary
 the dictionary of markers employed for this board More...
 
std::vector< int > ids
 
std::vector< std::vector< Point3f > > objPoints
 

Detailed Description

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.

Member Function Documentation

§ create()

static Ptr<CharucoBoard> cv::aruco::CharucoBoard::create ( int  squaresX,
int  squaresY,
float  squareLength,
float  markerLength,
const Ptr< Dictionary > &  dictionary 
)
static
Python:
retval=cv.aruco.CharucoBoard_create(squaresX, squaresY, squareLength, markerLength, dictionary)

Create a CharucoBoard object.

Parameters
squaresXnumber of chessboard squares in X direction
squaresYnumber of chessboard squares in Y direction
squareLengthchessboard square side length (normally in meters)
markerLengthmarker side length (same unit than squareLength)
dictionarydictionary of markers indicating the type of markers. The first markers in the dictionary are used to fill the white chessboard squares.
Returns
the output CharucoBoard object

This functions creates a CharucoBoard object given the number of squares in each direction and the size of the markers and chessboard squares.

§ draw()

void cv::aruco::CharucoBoard::draw ( Size  outSize,
OutputArray  img,
int  marginSize = 0,
int  borderBits = 1 
)
Python:
img=cv.aruco_CharucoBoard.draw(outSize[, img[, marginSize[, borderBits]]])

Draw a ChArUco board.

Parameters
outSizesize of the output image in pixels.
imgoutput image with the board. The size of this image will be outSize and the board will be on the center, keeping the board proportions.
marginSizeminimum margins (in pixels) of the board in the output image
borderBitswidth of the marker borders.

This function return the image of the ChArUco board, ready to be printed.

§ getChessboardSize()

Size cv::aruco::CharucoBoard::getChessboardSize ( ) const
inline
Python:
retval=cv.aruco_CharucoBoard.getChessboardSize()

§ getMarkerLength()

float cv::aruco::CharucoBoard::getMarkerLength ( ) const
inline
Python:
retval=cv.aruco_CharucoBoard.getMarkerLength()

§ getSquareLength()

float cv::aruco::CharucoBoard::getSquareLength ( ) const
inline
Python:
retval=cv.aruco_CharucoBoard.getSquareLength()

Member Data Documentation

§ chessboardCorners

std::vector< Point3f > cv::aruco::CharucoBoard::chessboardCorners

§ nearestMarkerCorners

std::vector< std::vector< int > > cv::aruco::CharucoBoard::nearestMarkerCorners

§ nearestMarkerIdx

std::vector< std::vector< int > > cv::aruco::CharucoBoard::nearestMarkerIdx

The documentation for this class was generated from the following file: