OpenCV  4.6.0-dev
Open Source Computer Vision
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
cv::aruco::Board Class Reference

Board of markers. More...

#include <opencv2/aruco/board.hpp>

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

Public Member Functions

 Board ()
 
void changeId (int index, int newId)
 change id for ids[index] More...
 
Ptr< DictionarygetDictionary () const
 return dictionary More...
 
const std::vector< int > & getIds () const
 return ids More...
 
const std::vector< std::vector< Point3f > > & getObjPoints () const
 get objPoints More...
 
const Point3fgetRightBottomBorder () const
 get rightBottomBorder More...
 
void setDictionary (const Ptr< Dictionary > &dictionary)
 set dictionary More...
 
void setIds (InputArray ids)
 Set ids vector. More...
 
void setObjPoints (const std::vector< std::vector< Point3f > > &objPoints)
 set objPoints More...
 

Static Public Member Functions

static Ptr< Boardcreate (InputArrayOfArrays objPoints, const Ptr< Dictionary > &dictionary, InputArray ids)
 Provide way to create Board by passing necessary data. Specially needed in Python. More...
 

Protected Attributes

Ptr< Dictionarydictionary
 the dictionary of markers employed for this board More...
 
std::vector< int > ids
 vector of the identifiers of the markers in the board (same size than objPoints) The identifiers refers to the board dictionary More...
 
std::vector< std::vector< Point3f > > objPoints
 array of object points of all the marker corners in the board each marker include its 4 corners in this order: More...
 
Point3f rightBottomBorder
 coordinate of the bottom right corner of the board, is set when calling the function create() More...
 

Detailed Description

Board of 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()

cv::aruco::Board::Board ( )

Member Function Documentation

◆ changeId()

void cv::aruco::Board::changeId ( int  index,
int  newId 
)
Python:
cv.aruco.Board.changeId(index, newId) -> None

change id for ids[index]

Parameters
index- element index in ids
newId- new value for ids[index], should be less than Dictionary size

◆ create()

static Ptr<Board> cv::aruco::Board::create ( InputArrayOfArrays  objPoints,
const Ptr< Dictionary > &  dictionary,
InputArray  ids 
)
static
Python:
cv.aruco.Board.create(objPoints, dictionary, ids) -> retval
cv.aruco.Board_create(objPoints, dictionary, ids) -> retval

Provide way to create Board by passing necessary data. Specially needed in Python.

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

◆ getDictionary()

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

return dictionary

◆ getIds()

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

return ids

◆ getObjPoints()

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

get objPoints

◆ getRightBottomBorder()

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

get rightBottomBorder

◆ setDictionary()

void cv::aruco::Board::setDictionary ( const Ptr< Dictionary > &  dictionary)
Python:
cv.aruco.Board.setDictionary(dictionary) -> None

set dictionary

◆ setIds()

void cv::aruco::Board::setIds ( InputArray  ids)
Python:
cv.aruco.Board.setIds(ids) -> None

Set ids vector.

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

Recommended way to set ids vector, which will fail if the size of ids does not match size of objPoints.

◆ setObjPoints()

void cv::aruco::Board::setObjPoints ( const std::vector< std::vector< Point3f > > &  objPoints)
Python:
cv.aruco.Board.setObjPoints(objPoints) -> None

set objPoints

Member Data Documentation

◆ dictionary

Ptr<Dictionary> cv::aruco::Board::dictionary
protected

the dictionary of markers employed for this board

◆ ids

std::vector<int> cv::aruco::Board::ids
protected

vector of the identifiers of the markers in the board (same size than objPoints) The identifiers refers to the board dictionary

◆ objPoints

std::vector<std::vector<Point3f> > cv::aruco::Board::objPoints
protected

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.

◆ rightBottomBorder

Point3f cv::aruco::Board::rightBottomBorder
protected

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


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