Nodes/comfyui_cv/CV ChArUco Detect
ComfyUI Node

CV ChArUco Detect

Finds the chessboard corners of a ChArUco board and says WHICH corner each one is (cv2.aruco.CharucoDetector) - the class API generator.py cannot see. Compared with cv2.findChessboardCorners this survives partial views, occlusion and clipping at the image edge, because the embedded markers identify the corners instead of relying on the whole grid being visible. The 'object_points' output pairs each detected corner with its 3-D position on the board, which is exactly what cv2.solvePnP wants - wire object_points + corners + a camera matrix into 'CV Solve PnP Pose' for the board pose, or use 'CV Calibrate Camera (ChArUco)' over a batch. The board parameters MUST match the printed board. Zero corners is a valid result (found=false), never an error.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV ChArUco Detect
  • image
  • found
  • corners
  • ids
  • object_points
  • marker_corners
  • marker_ids
  • count
dictionaryDICT_6X6_250
cols5
rows7
cell_size0.040
marker_ratio0.70
legacy_patternfalse
Categoryimage/CV/features

Inputs (7)

NameTypeDefaultDescription
imageNPARRAY,IMAGEPhoto of the ChArUco board (BGR or gray). Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size.
dictionaryCOMBODICT_6X6_250Dictionary the board's markers were drawn from - must match 'CV ArUco Board Image' or nothing is found.
colsINT52–50Chessboard squares across (the same number given to the board image node, NOT the inner-corner count).
rowsINT72–50Chessboard squares down.
cell_sizeFLOAT0.0400.0001–1000000Physical square size of the PRINTED board; it sets the unit of object_points and therefore of any pose.
marker_ratioFLOAT0.700.05–0.95Marker edge as a fraction of the square - the same value used to generate the board.
legacy_patternoptBOOLEANfalseSet for boards generated by OpenCV before 4.6 (white top-left cell). Wrong setting = shifted corner ids.

Outputs (7)

NameTypeDescription
foundBOOLEANTrue when at least one ChArUco corner was identified - branch on it with 'Basic data handling: IfElse'.
cornersNPARRAY(N, 2) float32 sub-pixel image positions of the identified chessboard corners - feed 'CV Draw Points', or 'CV Solve PnP Pose' with object_points.
idsNPARRAY(N,) int32 which corner of the board each one is (row-major). This identification is what a plain chessboard cannot give you.
object_pointsNPARRAY(N, 3) float32 position of each detected corner ON THE BOARD, in cell_size units (z = 0). Row-aligned with 'corners' - the 3-D half of the correspondence.
marker_cornersNPARRAY(M, 4, 2) float32 corners of the ArUco markers that were detected on the way - feed 'CV ArUco Draw Markers'.
marker_idsNPARRAY(M,) int32 ids of those markers.
countINTNumber of identified chessboard corners; 0 is valid, not an error.