CharucoBoard
ChArUco board Specific class for ChArUco boards. A ChArUco board is a planar board where the markers are placed inside the white squares of a chessboard. The benefits of ChArUco boards is that they provide both, ArUco markers versatility and chessboard corner precision, which is important for calibration and pose estimation. This class also allows the easy creation and drawing of ChArUco boards.
Member of Aruco
-
Create a CharucoBoard object
This functions creates a CharucoBoard object given the number of squares in each direction and the size of the markers and chessboard squares.
Declaration
Objective-C
+ (nonnull CharucoBoard *)create:(int)squaresX squaresY:(int)squaresY squareLength:(float)squareLength markerLength:(float)markerLength dictionary:(nonnull Dictionary *)dictionary;
Swift
class func create(squaresX: Int32, squaresY: Int32, squareLength: Float, markerLength: Float, dictionary: Dictionary) -> CharucoBoard
Parameters
squaresX
number of chessboard squares in X direction
squaresY
number of chessboard squares in Y direction
squareLength
chessboard square side length (normally in meters)
markerLength
marker side length (same unit than squareLength)
dictionary
dictionary of markers indicating the type of markers. The first markers in the dictionary are used to fill the white chessboard squares.
Return Value
the output CharucoBoard object
-
Declaration
Objective-C
- (float)getMarkerLength NS_SWIFT_NAME(getMarkerLength());
Swift
func getMarkerLength() -> Float
-
Declaration
Objective-C
- (float)getSquareLength NS_SWIFT_NAME(getSquareLength());
Swift
func getSquareLength() -> Float
-
Draw a ChArUco board
This function return the image of the ChArUco board, ready to be printed.
Declaration
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 ChArUco board
This function return the image of the ChArUco board, ready to be printed.
Declaration
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 ChArUco board
This function return the image of the ChArUco board, ready to be printed.
Declaration
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.