ComfyUI Node
cv2.findChessboardCorners
Raw wrapper of cv2.findChessboardCorners(image, patternSize, flags?). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.
cv2.findChessboardCorners
- image
- patternSize
- bool
- nparray
◄flagsCALIB_CB_ADAPTIVE_THRESH | CALIB_CB_NORMALIZE_IMAGE►
Categoryimage/CV/low-level/cv2 F
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | NPARRAY,IMAGE,MASK | Source chessboard view. It must be an 8-bit grayscale or color image. 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. | |
| patternSize | CV_TUPLE | 0,0 | Number of inner corners per a chessboard row and column ( patternSize = cv::Size(points_per_row,points_per_column) = cv::Size(columns,rows) ). One value with 2 components (w, h) - it travels as a whole, so it cannot arrive half-connected. Wire it from 'CV Tuple' or type the components in place. |
| flagsopt | STRING | CALIB_CB_ADAPTIVE_THRESH | CALIB_CB_NORMALIZE_IMAGE | Various operation flags that can be zero or a combination of the following values: - Use adaptive thresholding to convert the image to black and white, rather than a fixed threshold level (computed from the average image brightness). - Normalize the image gamma with equalizeHist before applying fixed or adaptive thresholding. - Use additional criteria (like contour area, perimeter, square-like shape) to filter out false quads extracted at the contour retrieval stage. - Run a fast check on the image that looks for chessboard corners, and shortcut the call if none is found. This can drastically speed up the call in the degenerate condition when no chessboard is observed. - All other flags are ignored. The input image is taken as is. No image processing is done to improve to find the checkerboard. This has the effect of speeding up the execution of the function but could lead to not recognizing the checkerboard if the image is not previously binarized in the appropriate manner. cv2.findChessboardCorners flags: one of none (0) plus any of CALIB_CB_ADAPTIVE_THRESH, CALIB_CB_NORMALIZE_IMAGE, CALIB_CB_FAST_CHECK, CALIB_CB_FILTER_QUADS, pipe-joined (e.g. "none (0) | CALIB_CB_ADAPTIVE_THRESH"). In the UI this renders as a dropdown with one toggle per flag. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| bool | BOOLEAN | — |
| nparray | NPARRAY | — |