Nodes/comfyui_cv/CV ArUco Board Image
ComfyUI Node

CV ArUco Board Image

Renders a printable ArUco GridBoard or ChArUco board (cv2.aruco.GridBoard / CharucoBoard generateImage) - classes the raw wrappers cannot reach. A GridBoard is a grid of markers with gaps; a ChArUco board interleaves markers into a chessboard, which is the best of both worlds for calibration: the markers say WHICH corner is which (so a partially visible or occluded board still works, unlike a plain chessboard) while the chessboard corners themselves localise to sub-pixel accuracy (better than marker corners). Print this, photograph it from ~15 angles and feed the batch to 'CV Calibrate Camera (ChArUco)'. The marker/square lengths come out as numbers so the pose nodes downstream get the world scale right.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV ArUco Board Image
    • board
    • marker_length
    • square_length
    • marker_count
    board_typeChArUco (chessboard + markers)
    dictionaryDICT_6X6_250
    cols5
    rows7
    pixels_per_cell100
    cell_size0.040
    marker_ratio0.70
    margin20
    legacy_patternfalse
    Categoryimage/CV/features

    Inputs (9)

    NameTypeDefaultDescription
    board_typeCOMBOChArUco (chessboard + markers)ChArUco for calibration and robust pose (markers inside a chessboard). GridBoard when you only want markers, e.g. an AR target on a non-flat-lit surface.
    dictionaryCOMBODICT_6X6_250Marker family to draw from. It must match the dictionary chosen in the detector node. A board needs cols*rows/2 ids for ChArUco (cols*rows for a GridBoard), so pick a dictionary big enough.
    colsINT52–50Number of cells across (chessboard squares for ChArUco, markers for a GridBoard).
    rowsINT72–50Number of cells down. Use an ODD x EVEN board (like 5x7) so it has no 180-degree rotational symmetry.
    pixels_per_cellINT10020–1000Rendering resolution: pixels per cell. The image size is derived from the board's own geometry, so the aspect ratio is always exact (a mismatched size is what makes cv2's generateImage throw).
    cell_sizeFLOAT0.0400.0001–1000000Physical size of one cell in your world unit (e.g. 0.04 = 40 mm). It sets the scale of every pose measured against this board; measure the PRINTED board and put the real value here.
    marker_ratioFLOAT0.700.05–0.95Marker edge as a fraction of the cell. For ChArUco the rest is the white margin inside the black square (0.7 is the usual); for a GridBoard it is the separation between markers.
    marginoptINT200–500White quiet-zone border in pixels. Markers touching the paper edge are often missed, so keep some.
    legacy_patternoptBOOLEANfalseChArUco only: match boards generated by OpenCV BEFORE 4.6, whose top-left cell is WHITE. Turn it on only for an old printed board - otherwise the corner ids shift.

    Outputs (4)

    NameTypeDescription
    boardIMAGEThe rendered board as an IMAGE - preview it, or save it with the core 'Save Image' node and print it at a known size.
    marker_lengthFLOATPhysical marker edge (cell_size * marker_ratio) - feed 'CV ArUco Board Pose'.
    square_lengthFLOATPhysical cell pitch - feed the ChArUco calibration node so the intrinsics come out in your unit.
    marker_countINTHow many markers the board carries (ChArUco boards use half the cells).