Package org.opencv.aruco
Class CharucoBoard
- java.lang.Object
-
- org.opencv.aruco.Board
-
- org.opencv.aruco.CharucoBoard
-
public class CharucoBoard extends Board
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.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CharucoBoard(long addr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CharucoBoard
__fromPtr__(long addr)
static CharucoBoard
create(int squaresX, int squaresY, float squareLength, float markerLength, Dictionary dictionary)
Create a CharucoBoard objectvoid
draw(Size outSize, Mat img)
Draw a ChArUco boardvoid
draw(Size outSize, Mat img, int marginSize)
Draw a ChArUco boardvoid
draw(Size outSize, Mat img, int marginSize, int borderBits)
Draw a ChArUco boardprotected void
finalize()
MatOfPoint3f
get_chessboardCorners()
Size
getChessboardSize()
float
getMarkerLength()
float
getSquareLength()
-
Methods inherited from class org.opencv.aruco.Board
create, get_dictionary, get_ids, get_objPoints, getNativeObjAddr, set_ids, setIds
-
-
-
-
Method Detail
-
__fromPtr__
public static CharucoBoard __fromPtr__(long addr)
-
draw
public void draw(Size outSize, Mat img, int marginSize, int borderBits)
Draw a ChArUco board- 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 imageborderBits
- width of the marker borders. This function return the image of the ChArUco board, ready to be printed.
-
draw
public void draw(Size outSize, Mat img, int marginSize)
Draw a ChArUco board- 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 This function return the image of the ChArUco board, ready to be printed.
-
draw
public void draw(Size outSize, Mat img)
Draw a ChArUco board- 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. This function return the image of the ChArUco board, ready to be printed.
-
create
public static CharucoBoard create(int squaresX, int squaresY, float squareLength, float markerLength, Dictionary dictionary)
Create a CharucoBoard object- Parameters:
squaresX
- number of chessboard squares in X directionsquaresY
- number of chessboard squares in Y directionsquareLength
- 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.- Returns:
- the output 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.
-
getChessboardSize
public Size getChessboardSize()
-
getSquareLength
public float getSquareLength()
-
getMarkerLength
public float getMarkerLength()
-
get_chessboardCorners
public MatOfPoint3f get_chessboardCorners()
-
-