Nodes/opencv-comfyui/OpenCV estimateChessboardSharpness_1
ComfyUI Node

OpenCV estimateChessboardSharpness_1

EstimateChessboardSharpness_1 — the duplicate you can ignore

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV estimateChessboardSharpness_1
  • image
  • corners
  • sharpness
  • literal
  • nparray
patternSize
rise_distance
vertical

Same story as every _1 in this pack: estimateChessboardSharpness_1 is a byte-identical twin of estimateChessboardSharpness_0. opencv-comfyui (geroldmeisinger/opencv-comfyui) generates one node per OpenCV overload, numbers them, and when two overloads are near-identical you get two identical nodes. There's no functional difference, no hidden parameter, nothing. Use _0.

What it does

Scores how sharp a chessboard calibration image is - a focus metric from OpenCV's calib3d module. It measures the steepness of the gradient across detected square edges: sharp captures have abrupt dark-to-light transitions, blurry ones have slow ramps. It returns an average sharpness value plus a per-region sharpness map. Real use case: picking the sharpest capture out of a burst for camera calibration, or vetting autofocus results. Niche, but a legitimately interesting corner of OpenCV to have exposed as nodes.

Inputs and outputs

  • image (NPARRAY) - grayscale calibration image (convert with cvtColor code 6 first or you'll hit the -215 assertion).
  • patternSize (STRING) - board corner count as a Python literal, e.g. (7, 6).
  • corners (NPARRAY) - detected corners, typically from the pack's findChessboardCornersSB_0 node.
  • rise_distance (FLOAT) - edge-transition range, 0.8 default.
  • vertical (BOOLEAN) - analyze vertical edges (default True).
  • sharpness (NPARRAY, optional) - out-parameter, leave unconnected.
  • Outputs: literal (STRING) - the mean sharpness as a string; nparray - the sharpness map.

Wiring it up

Same as _0: grayscale image in, patternSize as a literal string, corners from a corner-detection node, and the main result comes back as a string you parse yourself. This is the pack's auto-generated roughness in action - functional, not friendly.

Install and gotchas

Via ComfyUI Manager (search "opencv-comfyui") or git clone https://github.com/geroldmeisinger/opencv-comfyui into ComfyUI/custom_nodes, then restart. Requirements: opencv-contrib-python, numpy, torch; no model files. Watch the pack's shared traps - batch_size-1 images, Python-literal string syntax, grayscale assertions - and remember the author's "Expect dragons!" warning. Full detail on the estimateChessboardSharpness_0 page.

Categoryimage/OpenCV

Inputs (6)

NameTypeDefaultDescription
imageNPARRAY
patternSizeSTRING
cornersNPARRAY
rise_distanceFLOAT
verticalBOOLEAN
sharpnessoptNPARRAY

Outputs (2)

NameTypeDescription
literalSTRING
nparrayNPARRAY