OpenCV  4.10.0
Open Source Computer Vision
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members

Board of ArUco markers. More...

#include <opencv2/objdetect/aruco_board.hpp>

Collaboration diagram for cv::aruco::Board:

Public Member Functions

 Board ()
 
 Board (InputArrayOfArrays objPoints, const Dictionary &dictionary, InputArray ids)
 Common Board constructor.
 
void generateImage (Size outSize, OutputArray img, int marginSize=0, int borderBits=1) const
 Draw a planar board.
 
const DictionarygetDictionary () const
 return the Dictionary of markers employed for this board
 
const std::vector< int > & getIds () const
 vector of the identifiers of the markers in the board (should be the same size as objPoints)
 
const std::vector< std::vector< Point3f > > & getObjPoints () const
 return array of object points of all the marker corners in the board.
 
const Point3fgetRightBottomCorner () const
 get coordinate of the bottom right corner of the board, is set when calling the function create()
 
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()
 

Protected Member Functions

 Board (const Ptr< Impl > &impl)
 

Protected Attributes

Ptr< Impl > impl
 

Detailed Description

Board of ArUco markers.

A board is a set of markers in the 3D space with a common coordinate system. The common form of a board of marker is a planar (2D) board, however any 3D layout can be used. A Board object is composed by:

Constructor & Destructor Documentation

◆ Board() [1/3]

cv::aruco::Board::Board ( InputArrayOfArrays  objPoints,
const Dictionary dictionary,
InputArray  ids 
)
Python:
cv.aruco.Board(objPoints, dictionary, ids) -> <aruco_Board object>

Common Board constructor.

Parameters
objPointsarray of object points of all the marker corners in the board
dictionarythe dictionary of markers employed for this board
idsvector of the identifiers of the markers in the board

◆ Board() [2/3]

cv::aruco::Board::Board ( )
Python:
cv.aruco.Board(objPoints, dictionary, ids) -> <aruco_Board object>

◆ Board() [3/3]

cv::aruco::Board::Board ( const Ptr< Impl > &  impl)
protected
Python:
cv.aruco.Board(objPoints, dictionary, ids) -> <aruco_Board object>

Member Function Documentation

◆ generateImage()

void cv::aruco::Board::generateImage ( Size  outSize,
OutputArray  img,
int  marginSize = 0,
int  borderBits = 1 
) const
Python:
cv.aruco.Board.generateImage(outSize[, img[, marginSize[, borderBits]]]) -> img

Draw a planar 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 board, ready to be printed.

◆ getDictionary()

const Dictionary & cv::aruco::Board::getDictionary ( ) const
Python:
cv.aruco.Board.getDictionary() -> retval

return the Dictionary of markers employed for this board

◆ getIds()

const std::vector< int > & cv::aruco::Board::getIds ( ) const
Python:
cv.aruco.Board.getIds() -> retval

vector of the identifiers of the markers in the board (should be the same size as objPoints)

Returns
vector of the identifiers of the markers

◆ getObjPoints()

const std::vector< std::vector< Point3f > > & cv::aruco::Board::getObjPoints ( ) const
Python:
cv.aruco.Board.getObjPoints() -> retval

return array of object points of all the marker corners in the board.

Each marker include its 4 corners in this order:

  • objPoints[i][0] - left-top point of i-th marker
  • objPoints[i][1] - right-top point of i-th marker
  • objPoints[i][2] - right-bottom point of i-th marker
  • objPoints[i][3] - left-bottom point of i-th marker

Markers are placed in a certain order - row by row, left to right in every row. For M markers, the size is Mx4.

◆ getRightBottomCorner()

const Point3f & cv::aruco::Board::getRightBottomCorner ( ) const
Python:
cv.aruco.Board.getRightBottomCorner() -> retval

get coordinate of the bottom right corner of the board, is set when calling the function create()

◆ matchImagePoints()

void cv::aruco::Board::matchImagePoints ( InputArrayOfArrays  detectedCorners,
InputArray  detectedIds,
OutputArray  objPoints,
OutputArray  imgPoints 
) const
Python:
cv.aruco.Board.matchImagePoints(detectedCorners, detectedIds[, objPoints[, imgPoints]]) -> objPoints, imgPoints

Given a board configuration and a set of detected markers, returns the corresponding image points and object points, can be used in solvePnP()

Parameters
detectedCornersList of detected marker corners of the board. For cv::Board and cv::GridBoard the method expects std::vector<std::vector<Point2f>> or std::vector<Mat> with Aruco marker corners. For cv::CharucoBoard the method expects std::vector<Point2f> or Mat with ChAruco corners (chess board corners matched with Aruco markers).
detectedIdsList of identifiers for each marker or charuco corner. For any Board class the method expects std::vector<int> or Mat.
objPointsVector of marker points in the board coordinate space. For any Board class the method expects std::vector<cv::Point3f> objectPoints or cv::Mat
imgPointsVector of marker points in the image coordinate space. For any Board class the method expects std::vector<cv::Point2f> objectPoints or cv::Mat
See also
solvePnP

Member Data Documentation

◆ impl

Ptr<Impl> cv::aruco::Board::impl
protected

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