OpenCV findChessboardCornersSB_0
The checkerboard detector that's actually good
- image
- corners
- bool
- nparray
If you need to detect a checkerboard in ComfyUI, this is the node you actually want - not its famous older sibling. findChessboardCornersSB_0 wraps cv2.findChessboardCornersSB, OpenCV's saddle-point ("SB") corner detector, which replaced the old threshold-and-quad approach with a much smarter method: it finds the saddle points of the board's intensity landscape and checks their grid structure. The payoff is real robustness - it handles occlusions, reflections, glossy boards, non-square and asymmetric patterns, and boards where the corners aren't perfectly black-and-white. The classic findChessboardCorners chokes on exactly those cases.
For camera calibration and pose estimation this is the difference between "shoot 20 clean photos at a perfect angle" and "shoot 5 photos of whatever board you have lying around." The corners it returns are also more precisely located to begin with, which means less work for the subpixel refinement step (find4QuadCornerSubpix) downstream.
The inputs that matter
image(NPARRAY) - the checkerboard image. SB works on 8-bit grayscale or color; converting to grayscale yourself withcvtColorcode6(BGR2GRAY) is the predictable path.patternSize(STRING) - interior corners, not squares: a 10×7 board is(9, 6). Python-literal tuple string, so keep the parentheses or you'll hit the pack's documentedinvalid syntaxerror.flags(INT) - detection options. The SB method reads them differently than the classic detector; 0 gets you the default behavior, and 8 (fast check) is handy when you're scanning a batch of frames.corners(NPARRAY, optional) - OpenCV's out-parameter; leave unplugged.
Outputs: bool (found the board or not) and nparray (the detected corners).
Installing it
One of ~600 nodes in geroldmeisinger/opencv-comfyui. ComfyUI Manager → search opencv-comfyui, or:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
then restart. Needs opencv-contrib-python, numpy, torch. If startup fails with Cannot import name 'guidedFilter' from 'cv2.ximgproc', conflicting OpenCV installs - consolidate to one.
Pack rules: nparrays in/out (Image2Nparray / Nparrays2Image), batch size 1.
The honest take
There's a real chance this is the only chessboard node you need. It's slower than the classic detector on clean boards, but it fails far less often on real ones, and in a calibration pipeline "detects more of my photos" wins every time. If the classic findChessboardCorners_0 keeps returning False on boards that look perfectly findable, switching to this one is the fix. The only people who should stay on the classic detector are those with a reason to match old behavior exactly.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | NPARRAY | — | |
| patternSize | STRING | — | |
| flags | INT | — | |
| cornersopt | NPARRAY | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| bool | BOOLEAN | — |
| nparray | NPARRAY | — |