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

Planar board with grid arrangement of markers More common type of board. All markers are placed in the same plane in a grid arrangement. The board can be drawn using drawPlanarBoard() function (. More...

#include <opencv2/aruco/board.hpp>

Inheritance diagram for cv::aruco::GridBoard:

Public Member Functions

 GridBoard ()
void draw (Size outSize, OutputArray img, int marginSize=0, int borderBits=1)
 Draw a GridBoard. More...
Size getGridSize () const
float getMarkerLength () const
float getMarkerSeparation () const
- Public Member Functions inherited from cv::aruco::Board
 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< GridBoardcreate (int markersX, int markersY, float markerLength, float markerSeparation, const Ptr< Dictionary > &dictionary, int firstMarker=0)
 Create a GridBoard 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 necessary data. Specially needed in Python. More...

Protected Attributes

Ptr< GridImpl > gridImpl
- Protected Attributes inherited from cv::aruco::Board
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...


class CharucoBoard

Detailed Description

Planar board with grid arrangement of markers More common type of board. All markers are placed in the same plane in a grid arrangement. The board can be drawn using drawPlanarBoard() function (.

See also

Constructor & Destructor Documentation

◆ GridBoard()

cv::aruco::GridBoard::GridBoard ( )

Member Function Documentation

◆ create()

static Ptr<GridBoard> cv::aruco::GridBoard::create ( int  markersX,
int  markersY,
float  markerLength,
float  markerSeparation,
const Ptr< Dictionary > &  dictionary,
int  firstMarker = 0 
cv.aruco.GridBoard.create(markersX, markersY, markerLength, markerSeparation, dictionary[, firstMarker]) -> retval
cv.aruco.GridBoard_create(markersX, markersY, markerLength, markerSeparation, dictionary[, firstMarker]) -> retval

Create a GridBoard object.

markersXnumber of markers in X direction
markersYnumber of markers in Y direction
markerLengthmarker side length (normally in meters)
markerSeparationseparation between two markers (same unit as markerLength)
dictionarydictionary of markers indicating the type of markers
firstMarkerid of first marker in dictionary to use on board.
the output GridBoard object

This functions creates a GridBoard object given the number of markers in each direction and the marker size and marker separation.

◆ draw()

void cv::aruco::GridBoard::draw ( Size  outSize,
OutputArray  img,
int  marginSize = 0,
int  borderBits = 1 
cv.aruco.GridBoard.draw(outSize[, img[, marginSize[, borderBits]]]) -> img

Draw a GridBoard.

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 GridBoard, ready to be printed.

◆ getGridSize()

Size cv::aruco::GridBoard::getGridSize ( ) const
cv.aruco.GridBoard.getGridSize() -> retval

◆ getMarkerLength()

float cv::aruco::GridBoard::getMarkerLength ( ) const
cv.aruco.GridBoard.getMarkerLength() -> retval

◆ getMarkerSeparation()

float cv::aruco::GridBoard::getMarkerSeparation ( ) const
cv.aruco.GridBoard.getMarkerSeparation() -> retval

Friends And Related Function Documentation

◆ CharucoBoard

friend class CharucoBoard

Member Data Documentation

◆ gridImpl

Ptr<GridImpl> cv::aruco::GridBoard::gridImpl

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