ComfyUI Node
CV Find Homography (RANSAC)
Estimates the homography between two matched point sets (cv2.findHomography). Robust by design: with too few points or a degenerate configuration it does NOT fail the workflow - it returns found=false, an identity homography (safe to feed into perspectiveTransform/warpPerspective) and 0 inliers. 'found' is true only when the estimate has at least min_inliers RANSAC inliers - branch on it with a control-flow node (e.g. Basic data handling's 'if/else') to bypass drawing or compositing when nothing was found.
CV Find Homography (RANSAC)
- points_a
- points_b
- homography
- inlier_mask
- inlier_count
- found
◄methodRANSAC►
◄reproj_threshold3.0►
◄min_inliers10►
Categoryimage/CV/features
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| points_a | NPARRAY | Source points, Nx1x2 (from 'CV Match Features'). | |
| points_b | NPARRAY | Destination points, Nx1x2. | |
| method | COMBO | RANSAC | Robust estimator. RANSAC is the standard choice for feature matches (which always contain outliers). |
| reproj_threshold | FLOAT | 3.00.1–100 | Maximum reprojection error in pixels for a match to count as an inlier. |
| min_inliers | INT | 104–10000 | Minimum RANSAC inliers for 'found' to be true. Raise it to reject false positives. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| homography | NPARRAY | 3x3 float64 matrix mapping points_a to points_b (identity if not found). |
| inlier_mask | NPARRAY | Nx1 uint8: 1 = inlier. Feed into 'CV Draw Matches'. |
| inlier_count | INT | — |
| found | BOOLEAN | — |