ComfyUI Node
CV Detect Corners
Descriptor-free corner detectors: cv2.FastFeatureDetector and cv2.GFTTDetector (Shi-Tomasi or Harris scoring). These are cv2 CLASSES - the raw cv2_goodFeaturesToTrack wrapper returns bare points, while these return proper KEYPOINTS with a response, so they chain into 'CV Draw Keypoints', 'CV Compute Descriptors' and the matching nodes, and FAST has no function form at all. Use FAST when you need thousands of corners per millisecond (tracking, SLAM front-ends) and GFTT when you want a bounded, well-spread set (the classic KLT seed). Finding nothing is a valid result (count = 0).
CV Detect Corners
- image
- keypoints
- points
- sizes
- responses
- count
◄detectorGFTT (Shi-Tomasi)►
◄threshold10►
◄non_max_suppressiontrue►
◄max_features500►
◄quality_level0.010►
◄min_distance10►
◄fast_type9/16 (default)►
◄block_size3►
◄harris_k0.04►
Categoryimage/CV/features
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | NPARRAY,IMAGE | Image to search (converted to grayscale internally). 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. | |
| detector | COMBO | GFTT (Shi-Tomasi) | FAST: very fast, unbounded count, driven by 'threshold'. GFTT Shi-Tomasi: bounded, evenly spread, driven by max_features/quality_level/min_distance. GFTT Harris: same but scored with the Harris measure (harris_k), which prefers sharper corners. |
| threshold | INT | 101–255 | FAST only: how much brighter/darker the arc of pixels around a candidate must be. Lower = many more corners. |
| non_max_suppression | BOOLEAN | true | FAST only: keep only the locally strongest corner instead of every pixel that passes the test. |
| max_features | INT | 5001–100000 | GFTT only: keep at most this many of the strongest corners. |
| quality_level | FLOAT | 0.0100.0001–1 | GFTT only: minimum corner score as a FRACTION of the best corner's score. 0.01 keeps everything within 1% of the best; raise it to keep only strong corners. |
| min_distance | FLOAT | 100–1000 | GFTT only: minimum spacing in pixels between kept corners - this is what spreads them over the image. |
| fast_typeopt | COMBO | 9/16 (default) | FAST only: how many of the 16 ring pixels must agree. 9/16 is the standard; shorter arcs fire more often. |
| block_sizeopt | INT | 31–31 | GFTT only: neighbourhood size used to compute the corner score (forced odd). |
| harris_kopt | FLOAT | 0.040.001–0.5 | GFTT Harris only: the free parameter k of the Harris response det(M) - k*trace(M)^2. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| keypoints | CV_KEYPOINTS | cv2.KeyPoint list - draw with 'CV Draw Keypoints', or give them descriptors with 'CV Compute Descriptors' to feed 'CV Match Features'. |
| points | NPARRAY | Nx2 float32 (x, y) centres - the point-set form for 'OpenCV Draw Points', k-means, polar conversion, ... |
| sizes | NPARRAY | (N,) float32 keypoint diameter in pixels. |
| responses | NPARRAY | (N,) float32 detector strength per keypoint - threshold it to keep only the strong ones. |
| count | INT | How many were found; 0 is a valid result, not an error. |