Class CharucoBoard


  • public class CharucoBoard
    extends Board
    ChArUco board is a planar chessboard 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. The board image can be drawn using generateImage() method.
    • Constructor Detail

      • CharucoBoard

        protected CharucoBoard​(long addr)
      • CharucoBoard

        public CharucoBoard​(Size size,
                            float squareLength,
                            float markerLength,
                            Dictionary dictionary,
                            Mat ids)
        CharucoBoard constructor
        Parameters:
        size - number of chessboard squares in x and y directions
        squareLength - 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
        ids - array of id used markers The first markers in the dictionary are used to fill the white chessboard squares.
      • CharucoBoard

        public CharucoBoard​(Size size,
                            float squareLength,
                            float markerLength,
                            Dictionary dictionary)
        CharucoBoard constructor
        Parameters:
        size - number of chessboard squares in x and y directions
        squareLength - 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.
    • Method Detail

      • __fromPtr__

        public static CharucoBoard __fromPtr__​(long addr)
      • getChessboardSize

        public Size getChessboardSize()
      • getSquareLength

        public float getSquareLength()
      • getMarkerLength

        public float getMarkerLength()
      • getChessboardCorners

        public MatOfPoint3f getChessboardCorners()
        get CharucoBoard::chessboardCorners
        Returns:
        automatically generated
      • checkCharucoCornersCollinear

        public boolean checkCharucoCornersCollinear​(Mat charucoIds)
        check whether the ChArUco markers are collinear
        Parameters:
        charucoIds - list of identifiers for each corner in charucoCorners per frame.
        Returns:
        bool value, 1 (true) if detected corners form a line, 0 (false) if they do not. solvePnP, calibration functions will fail if the corners are collinear (true). The number of ids in charucoIDs should be <= the number of chessboard corners in the board. This functions checks whether the charuco corners are on a straight line (returns true, if so), or not (false). Axis parallel, as well as diagonal and other straight lines detected. Degenerate cases: for number of charucoIDs <= 2,the function returns true.
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class Board
        Throws:
        java.lang.Throwable