Nodes/comfyui_cv/CV Find Fundamental Matrix
ComfyUI Node

CV Find Fundamental Matrix

Estimates the fundamental matrix between two views of a static scene (cv2.findFundamentalMat) from matched point sets. Same failure-tolerant contract as 'OpenCV Find Homography': with fewer than 8 points or a degenerate configuration it returns found=false, an all-zero matrix and 0 inliers instead of stopping the workflow - branch on 'found' with a control-flow node. Note: points from a single plane (poster, wall) are a degenerate configuration for F - use views of a scene with depth and a translated (not only rotated) camera.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Find Fundamental Matrix
  • points_a
  • points_b
  • fundamental
  • inlier_mask
  • inlier_count
  • found
methodFM_RANSAC
reproj_threshold3.0
confidence0.99
min_inliers15
Categoryimage/CV/features

Inputs (6)

NameTypeDefaultDescription
points_aNPARRAYPoints in image 1, Nx1x2 (from 'CV Match Features').
points_bNPARRAYCorresponding points in image 2, Nx1x2.
methodCOMBOFM_RANSACFM_RANSAC is the standard choice for feature matches; FM_8POINT uses all points (only for outlier-free input); FM_7POINT needs exactly 7.
reproj_thresholdFLOAT3.00.1–100Maximum distance in pixels from a point to its epipolar line for it to count as an inlier (RANSAC only).
confidenceFLOAT0.990.5–1Desired probability that the estimate is correct (RANSAC/LMedS only).
min_inliersINT158–10000Minimum inliers for 'found' to be true. Raise it to reject accidental fits.

Outputs (4)

NameTypeDescription
fundamentalNPARRAY3x3 float64 fundamental matrix (all zeros if not found - 'CV Draw Epipolar Lines' skips the degenerate lines it produces).
inlier_maskNPARRAYNx1 uint8: 1 = inlier. Feed into 'CV Draw Matches' / 'CV Draw Epipolar Lines'.
inlier_countINT
foundBOOLEAN