Nodes/opencv-comfyui/OpenCV findChessboardCornersSBWithMeta_0
ComfyUI Node

OpenCV findChessboardCornersSBWithMeta_0

Robust checkerboard corners, plus a quality score for each

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV findChessboardCornersSBWithMeta_0
  • image
  • corners
  • meta
  • bool
  • nparray_1
  • nparray_2
patternSize
flags

findChessboardCornersSBWithMeta_0 is the most informative member of this pack's checkerboard family. It wraps cv2.findChessboardCornersSBWithMeta: the same robust saddle-point detector as findChessboardCornersSB, plus a per-corner quality score (the "meta"). That extra output is the differentiator - instead of just getting corners and hoping they're good, you get a number per corner that tells you how confident the detector is.

Why that matters: in camera calibration, not all detections are created equal. A slightly blurry board, a glossy patch, a corner partially hidden behind a finger - those corners are less trustworthy, and if you feed them all to a calibration solver at equal weight, the bad ones drag the whole camera matrix off. With the meta output you can filter, down-weight, or even visually flag low-confidence corners before calibration. It's the difference between a blind pipeline and one that knows which measurements to distrust.

The inputs that matter

  • image (NPARRAY) - the checkerboard photo. Grayscale via cvtColor code 6 (BGR2GRAY) is the predictable route.
  • patternSize (STRING) - interior corners, not squares. A 10×7 board is (9, 6), typed as a literal tuple with the parentheses.
  • flags (INT) - detection options; 0 default, 8 for a fast pre-check when scanning batches.
  • corners (NPARRAY, optional) and meta (NPARRAY, optional) - OpenCV's out-parameters. Leave both unplugged; you get them back as outputs.

Three outputs, and this is the thing to get right: bool (board found), nparray_1 (the corner points), and nparray_2 (the per-corner quality scores, one float per corner). Don't feed nparray_2 to anything that expects an image - it's a 1-D array of numbers, exactly the "not every nparray is an image" case the README warns about.

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

If you're doing serious calibration work in ComfyUI, this is the node to build around: robust detection plus the confidence data that lets you do it properly. If you just need corners and don't care about quality, findChessboardCornersSB_0 is simpler - same detection, one less output to ignore. The _1 twin of this node is identical, so pick whichever and read this page for the behavior.

Categoryimage/OpenCV

Inputs (5)

NameTypeDefaultDescription
imageNPARRAY
patternSizeSTRING
flagsINT
cornersoptNPARRAY
metaoptNPARRAY

Outputs (3)

NameTypeDescription
boolBOOLEAN
nparray_1NPARRAY
nparray_2NPARRAY