| OpenCV 4.3.0 Open Source Computer Vision

Public Member Functions | Static Public Member Functions | List of all members
cv::aruco::GridBoard Class Reference
ArUco Marker Detection

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.hpp>`

Inheritance diagram for cv::aruco::GridBoard:

## Public Member Functions
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

## Static Public Member Functions
static Ptr< GridBoard > | create (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< Board > | create (InputArrayOfArrays objPoints, const Ptr< Dictionary > &dictionary, InputArray ids)
| Provide way to create Board by passing necessary data. Specially needed in Python. More...

## Additional Inherited Members
Public Attributes inherited from cv::aruco::Board
Ptr< Dictionary > | dictionary
| the dictionary of markers employed for this board More...
std::vector< int > | ids
std::vector< std::vector< Point3f > > | objPoints

## 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
  drawPlanarBoard)

## 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`
| ) |  |
| static

Python:
| retval | = | cv.aruco.GridBoard_create( | markersX, markersY, markerLength, markerSeparation, dictionary[, firstMarker] | )

Create a GridBoard object.

Parameters

  markersX | number of markers in X direction
  markersY | number of markers in Y direction
  markerLength | marker side length (normally in meters)
  markerSeparation | separation between two markers (same unit as markerLength)
  dictionary | dictionary of markers indicating the type of markers
  firstMarker | id of first marker in dictionary to use on board.

Returns
  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`
| ) |  |

Python:
| img | = | cv.aruco_GridBoard.draw( | outSize[, img[, marginSize[, borderBits]]] | )

Draw a GridBoard.

Parameters

  outSize | size of the output image in pixels.
  img | output image with the board. The size of this image will be outSize and the board will be on the center, keeping the board proportions.
  marginSize | minimum margins (in pixels) of the board in the output image
  borderBits | width of the marker borders.

This function return the image of the GridBoard, ready to be printed.

## ◆ getGridSize()

Size cv::aruco::GridBoard::getGridSize | ( |  | ) | const
| inline

Python:
| retval | = | cv.aruco_GridBoard.getGridSize( |  | )

## ◆ getMarkerLength()

float cv::aruco::GridBoard::getMarkerLength | ( |  | ) | const
| inline

Python:
| retval | = | cv.aruco_GridBoard.getMarkerLength( |  | )

## ◆ getMarkerSeparation()

float cv::aruco::GridBoard::getMarkerSeparation | ( |  | ) | const
| inline

Python:
| retval | = | cv.aruco_GridBoard.getMarkerSeparation( |  | )

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

- opencv2/aruco.hpp