OpenCV drawChessboardCorners_0
See your camera-calibration corners in green (or red)
- image
- corners
- nparray
drawChessboardCorners_0 is the visualization half of OpenCV's classic camera-calibration routine, and unlike half the nodes in this pack it does something you can actually see. Feed it an image plus the corners that findChessboardCorners detected on a chessboard pattern, and it draws them back onto the image - green circles connected by lines when the pattern was found, red when it wasn't. That's the whole job, and it's the job you want when you're checking whether your calibration images are any good.
How the pieces fit
Camera calibration is a pipeline, and this node is the last step of the "did it work?" loop. In OpenCV the flow is: findChessboardCorners(image, patternSize, flags) → (found, corners), then calibrateCamera on the good ones, and drawChessboardCorners to eyeball the detection. In this pack the detection side exists too, and its two return values map directly onto this node's inputs: the bool from findChessboardCorners feeds patternWasFound, and its corners array feeds corners.
The inputs you actually set:
image- theNPARRAYof the chessboard photo, viaImage2Nparray.patternSize- aSTRINGliteral in the form(9, 6), the interior corner count (columns, rows). It must match exactly what you passed tofindChessboardCorners, or the drawing goes nowhere useful.corners- the corner points from the detection node.patternWasFound- the boolean that picks green vs. red.
Output is a single nparray - the annotated image. Run it through Nparrays2Image to actually look at it.
The _0, and install
_0/_1 are the usual overload twins: OpenCV declares the function once for MatLike and once for UMat, the generator emits both, and they're interchangeable. Grab _0 and move on.
It's in opencv-comfyui. ComfyUI Manager → search OpenCV, or:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
pip install opencv-python-contrib
Restart ComfyUI. requirements.txt is opencv-contrib-python, numpy, torch - no model downloads.
Where people trip
Two things. First, the patternSize string has to be valid Python literal syntax - (9, 6), not 9, 6 - or you'll hit the README's invalid syntax (<unknown>, line 0) error, which comes from the pack parsing literals with ast.literal_eval. Second, the batch-size rule: this whole pack only works on batch_size==1, so keep an ImageFromBatch (length=1) in front if your image came out of a batch.
Honest take: if you're calibrating a camera for pose or AR work inside ComfyUI, this is exactly the node you want - it turns a cryptic corners array into something you can judge at a glance. If you're not doing calibration, you'll never need it, and that's fine too.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | NPARRAY | — | |
| patternSize | STRING | — | |
| corners | NPARRAY | — | |
| patternWasFound | BOOLEAN | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |