Class cv::aruco::CharucoBoard#
ChArUco board is a planar chessboard where the markers are placed inside the white squares of a chessboard. View details
#include <opencv2/objdetect/aruco_board.hpp>Collaboration diagram for cv::aruco::CharucoBoard:
Public Member Functions#
Public Member Functions inherited from cv::aruco::Board
Return |
Name |
Description |
|---|---|---|
|
Common Board constructor. |
|
|
|
Draw a planar board. |
|
return the Dictionary of markers employed for this board |
|
|
vector of the identifiers of the markers in the board (should be the same size as objPoints) |
|
|
return array of object points of all the marker corners in the board. |
|
|
get coordinate of the bottom right corner of the board, is set when calling the function create() |
|
|
Given a board configuration and a set of detected markers, returns the corresponding image points and object points, can be used in solvePnP() |
Additional Inherited Members#
Protected Member Functions inherited from cv::aruco::Board
Return |
Name |
Description |
|---|---|---|
Protected Attributes inherited from cv::aruco::Board
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()#
cv::aruco::CharucoBoard::CharucoBoard()
Python:
cv.aruco.CharucoBoard(size, squareLength, markerLength, dictionary[, ids]) -> <aruco_CharucoBoard object>
CharucoBoard()#
cv::aruco::CharucoBoard::CharucoBoard(
const Size & size,
float squareLength,
float markerLength,
const Dictionary & dictionary,
InputArray ids = noArray() )
Python:
cv.aruco.CharucoBoard(size, squareLength, markerLength, dictionary[, ids]) -> <aruco_CharucoBoard object>
CharucoBoard constructor.
Parameters
size— number of chessboard squares in x and y directionssquareLength— squareLength chessboard square side length (normally in meters)markerLength— marker side length (same unit than squareLength)dictionary— dictionary of markers indicating the type of markersids— array of id used markers The first markers in the dictionary are used to fill the white chessboard squares.
Here is the call graph for this function:
Member Function Documentation#
checkCharucoCornersCollinear()#
bool cv::aruco::CharucoBoard::checkCharucoCornersCollinear(InputArray charucoIds)
Python:
cv.aruco.CharucoBoard.checkCharucoCornersCollinear(charucoIds) -> retval
check whether the ChArUco markers are collinear
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.
Parameters
charucoIds— list 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).
getChessboardCorners()#
std::vector< Point3f > cv::aruco::CharucoBoard::getChessboardCorners()
Python:
cv.aruco.CharucoBoard.getChessboardCorners() -> retval
get CharucoBoard::chessboardCorners
getChessboardSize()#
Size cv::aruco::CharucoBoard::getChessboardSize()
Python:
cv.aruco.CharucoBoard.getChessboardSize() -> retval
getLegacyPattern()#
bool cv::aruco::CharucoBoard::getLegacyPattern()
Python:
cv.aruco.CharucoBoard.getLegacyPattern() -> retval
getMarkerLength()#
float cv::aruco::CharucoBoard::getMarkerLength()
Python:
cv.aruco.CharucoBoard.getMarkerLength() -> retval
getNearestMarkerCorners()#
std::vector< std::vector< int > > cv::aruco::CharucoBoard::getNearestMarkerCorners()
get CharucoBoard::nearestMarkerCorners, for each charuco corner, nearest marker corner id of each marker
getNearestMarkerIdx()#
std::vector< std::vector< int > > cv::aruco::CharucoBoard::getNearestMarkerIdx()
get CharucoBoard::nearestMarkerIdx, for each charuco corner, nearest marker index in ids array
getSquareLength()#
float cv::aruco::CharucoBoard::getSquareLength()
Python:
cv.aruco.CharucoBoard.getSquareLength() -> retval
setLegacyPattern()#
void cv::aruco::CharucoBoard::setLegacyPattern(bool legacyPattern)
Python:
cv.aruco.CharucoBoard.setLegacyPattern(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 opencv/opencv#23152.
Default value: false.
Source file#
The documentation for this class was generated from the following file:
opencv2/objdetect/aruco_board.hpp