EstervQrCode 1.1.1
Library for qr code manipulation
Public Member Functions | List of all members

ChArUco board is a planar chessboard where the markers are placed inside the white squares of a chessboard. More...

#include <aruco_board.hpp>

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

Public Member Functions

CV_WRAP CharucoBoard (const Size &size, float squareLength, float markerLength, const Dictionary &dictionary, InputArray ids=noArray())
 CharucoBoard constructor. More...
 
CV_WRAP void setLegacyPattern (bool legacyPattern)
 set legacy chessboard pattern. More...
 
CV_WRAP bool getLegacyPattern () const
 
CV_WRAP Size getChessboardSize () const
 
CV_WRAP float getSquareLength () const
 
CV_WRAP float getMarkerLength () const
 
CV_WRAP std::vector< Point3fgetChessboardCorners () const
 get CharucoBoard::chessboardCorners More...
 
CV_PROP std::vector< std::vector< int > > getNearestMarkerIdx () const
 get CharucoBoard::nearestMarkerIdx, for each charuco corner, nearest marker index in ids array More...
 
CV_PROP std::vector< std::vector< int > > getNearestMarkerCorners () const
 get CharucoBoard::nearestMarkerCorners, for each charuco corner, nearest marker corner id of each marker More...
 
CV_WRAP bool checkCharucoCornersCollinear (InputArray charucoIds) const
 check whether the ChArUco markers are collinear More...
 
CV_DEPRECATED_EXTERNAL CharucoBoard ()
 
- Public Member Functions inherited from cv::aruco::Board
CV_WRAP Board (InputArrayOfArrays objPoints, const Dictionary &dictionary, InputArray ids)
 Common Board constructor. More...
 
CV_WRAP const DictionarygetDictionary () const
 return the Dictionary of markers employed for this board More...
 
CV_WRAP const std::vector< std::vector< Point3f > > & getObjPoints () const
 return array of object points of all the marker corners in the board. More...
 
CV_WRAP const std::vector< int > & getIds () const
 vector of the identifiers of the markers in the board (should be the same size as objPoints) More...
 
CV_WRAP const Point3fgetRightBottomCorner () const
 get coordinate of the bottom right corner of the board, is set when calling the function create() More...
 
CV_WRAP void matchImagePoints (InputArrayOfArrays detectedCorners, InputArray detectedIds, OutputArray objPoints, OutputArray imgPoints) const
 Given a board configuration and a set of detected markers, returns the corresponding image points and object points, can be used in solvePnP() More...
 
CV_WRAP void generateImage (Size outSize, OutputArray img, int marginSize=0, int borderBits=1) const
 Draw a planar board. More...
 
CV_DEPRECATED_EXTERNAL Board ()
 

Additional Inherited Members

- Protected Member Functions inherited from cv::aruco::Board
 Board (const Ptr< Impl > &impl)
 
- Protected Attributes inherited from cv::aruco::Board
Ptr< Impl > impl
 

Detailed Description

ChArUco board is a planar chessboard 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. The board image can be drawn using generateImage() method.

Constructor & Destructor Documentation

◆ CharucoBoard() [1/2]

CV_WRAP cv::aruco::CharucoBoard::CharucoBoard ( const Size size,
float  squareLength,
float  markerLength,
const Dictionary dictionary,
InputArray  ids = noArray() 
)

CharucoBoard constructor.

Parameters
sizenumber of chessboard squares in x and y directions
squareLengthsquareLength chessboard square side length (normally in meters)
markerLengthmarker side length (same unit than squareLength)
dictionarydictionary of markers indicating the type of markers
idsarray of id used markers The first markers in the dictionary are used to fill the white chessboard squares.

◆ CharucoBoard() [2/2]

CV_DEPRECATED_EXTERNAL cv::aruco::CharucoBoard::CharucoBoard ( )

Member Function Documentation

◆ checkCharucoCornersCollinear()

CV_WRAP bool cv::aruco::CharucoBoard::checkCharucoCornersCollinear ( InputArray  charucoIds) const

check whether the ChArUco markers are collinear

Parameters
charucoIdslist of identifiers for each corner in charucoCorners per frame.
Returns
bool value, 1 (true) if detected corners form a line, 0 (false) if they do not. solvePnP, calibration functions will fail if the corners are collinear (true).

The number of ids in charucoIDs should be <= the number of chessboard corners in the board. This functions checks whether the charuco corners are on a straight line (returns true, if so), or not (false). Axis parallel, as well as diagonal and other straight lines detected. Degenerate cases: for number of charucoIDs <= 2,the function returns true.

◆ getChessboardCorners()

CV_WRAP std::vector<Point3f> cv::aruco::CharucoBoard::getChessboardCorners ( ) const

get CharucoBoard::chessboardCorners

◆ getChessboardSize()

CV_WRAP Size cv::aruco::CharucoBoard::getChessboardSize ( ) const

◆ getLegacyPattern()

CV_WRAP bool cv::aruco::CharucoBoard::getLegacyPattern ( ) const

◆ getMarkerLength()

CV_WRAP float cv::aruco::CharucoBoard::getMarkerLength ( ) const

◆ getNearestMarkerCorners()

CV_PROP std::vector<std::vector<int> > cv::aruco::CharucoBoard::getNearestMarkerCorners ( ) const

get CharucoBoard::nearestMarkerCorners, for each charuco corner, nearest marker corner id of each marker

◆ getNearestMarkerIdx()

CV_PROP std::vector<std::vector<int> > cv::aruco::CharucoBoard::getNearestMarkerIdx ( ) const

get CharucoBoard::nearestMarkerIdx, for each charuco corner, nearest marker index in ids array

◆ getSquareLength()

CV_WRAP float cv::aruco::CharucoBoard::getSquareLength ( ) const

◆ setLegacyPattern()

CV_WRAP void cv::aruco::CharucoBoard::setLegacyPattern ( bool  legacyPattern)

set legacy chessboard pattern.

Legacy setting creates chessboard patterns starting with a white box in the upper left corner if there is an even row count of chessboard boxes, otherwise it starts with a black box. This setting ensures compatibility to patterns created with OpenCV versions prior OpenCV 4.6.0. See https://github.com/opencv/opencv/issues/23152.

Default value: false.


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