GridBoard

Objective-C

@interface GridBoard : Board

Swift

class GridBoard : Board

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

Member of Aruco

Methods

  • Create a GridBoard object

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

    Declaration

    Objective-C

    + (nonnull GridBoard *)create:(int)markersX
                         markersY:(int)markersY
                     markerLength:(float)markerLength
                 markerSeparation:(float)markerSeparation
                       dictionary:(nonnull Dictionary *)dictionary
                      firstMarker:(int)firstMarker;

    Swift

    class func create(markersX: Int32, markersY: Int32, markerLength: Float, markerSeparation: Float, dictionary: Dictionary, firstMarker: Int32) -> GridBoard

    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.

    Return Value

    the output GridBoard object

  • Create a GridBoard object

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

    Declaration

    Objective-C

    + (nonnull GridBoard *)create:(int)markersX
                         markersY:(int)markersY
                     markerLength:(float)markerLength
                 markerSeparation:(float)markerSeparation
                       dictionary:(nonnull Dictionary *)dictionary;

    Swift

    class func create(markersX: Int32, markersY: Int32, markerLength: Float, markerSeparation: Float, dictionary: Dictionary) -> GridBoard

    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

    Return Value

    the output GridBoard object

  • Declaration

    Objective-C

    - (Size2i*)getGridSize NS_SWIFT_NAME(getGridSize());

    Swift

    func getGridSize() -> Size2i
  • Declaration

    Objective-C

    - (float)getMarkerLength NS_SWIFT_NAME(getMarkerLength());

    Swift

    func getMarkerLength() -> Float
  • Declaration

    Objective-C

    - (float)getMarkerSeparation NS_SWIFT_NAME(getMarkerSeparation());

    Swift

    func getMarkerSeparation() -> Float
  • Draw a GridBoard

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

    Declaration

    Objective-C

    - (void)draw:(nonnull Size2i *)outSize
               img:(nonnull Mat *)img
        marginSize:(int)marginSize
        borderBits:(int)borderBits;

    Swift

    func draw(outSize: Size2i, img: Mat, marginSize: Int32, borderBits: Int32)

    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.

  • Draw a GridBoard

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

    Declaration

    Objective-C

    - (void)draw:(nonnull Size2i *)outSize
               img:(nonnull Mat *)img
        marginSize:(int)marginSize;

    Swift

    func draw(outSize: Size2i, img: Mat, marginSize: Int32)

    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

  • Draw a GridBoard

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

    Declaration

    Objective-C

    - (void)draw:(nonnull Size2i *)outSize img:(nonnull Mat *)img;

    Swift

    func draw(outSize: Size2i, img: Mat)

    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.