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.
- image
- found
- corners
- ids
- object_points
- marker_corners
- marker_ids
- count
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | NPARRAY,IMAGE | Photo 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. | |
| dictionary | COMBO | DICT_6X6_250 | Dictionary the board's markers were drawn from - must match 'CV ArUco Board Image' or nothing is found. |
| cols | INT | 52–50 | Chessboard squares across (the same number given to the board image node, NOT the inner-corner count). |
| rows | INT | 72–50 | Chessboard squares down. |
| cell_size | FLOAT | 0.0400.0001–1000000 | Physical square size of the PRINTED board; it sets the unit of object_points and therefore of any pose. |
| marker_ratio | FLOAT | 0.700.05–0.95 | Marker edge as a fraction of the square - the same value used to generate the board. |
| legacy_patternopt | BOOLEAN | false | Set for boards generated by OpenCV before 4.6 (white top-left cell). Wrong setting = shifted corner ids. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| found | BOOLEAN | True when at least one ChArUco corner was identified - branch on it with 'Basic data handling: IfElse'. |
| corners | NPARRAY | (N, 2) float32 sub-pixel image positions of the identified chessboard corners - feed 'CV Draw Points', or 'CV Solve PnP Pose' with object_points. |
| ids | NPARRAY | (N,) int32 which corner of the board each one is (row-major). This identification is what a plain chessboard cannot give you. |
| object_points | NPARRAY | (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_corners | NPARRAY | (M, 4, 2) float32 corners of the ArUco markers that were detected on the way - feed 'CV ArUco Draw Markers'. |
| marker_ids | NPARRAY | (M,) int32 ids of those markers. |
| count | INT | Number of identified chessboard corners; 0 is valid, not an error. |