ComfyUI Node
cv2.findFundamentalMat (1/2)
Raw wrapper of cv2.findFundamentalMat(points1, points2, method, ransacReprojThreshold, confidence, maxIters, mask?). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.
cv2.findFundamentalMat (1/2)
- points1
- points2
- mask
- F
- mask
◄methodFM_RANSAC►
◄ransacReprojThreshold0.0000►
◄confidence0.0000►
◄maxIters0►
Categoryimage/CV/low-level/cv2 F
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| points1 | NPARRAY | Array of N points from the first image. The point coordinates should be floating-point (single or double precision). A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here. | |
| points2 | NPARRAY | Array of the second image points of the same size and format as points1 . A data array (points / matrix), NOT an image - only an NPARRAY link is accepted here. | |
| method | COMBO | FM_RANSAC | Method for computing a fundamental matrix. - for a 7-point algorithm. $N = 7$ - for an 8-point algorithm. $N \ge 8$ - for the RANSAC algorithm. $N \ge 8$ - for the LMedS algorithm. $N \ge 8$ |
| ransacReprojThreshold | FLOAT | 0.0000-1e+38–1e+38 | Parameter used only for RANSAC. It is the maximum distance from a point to an epipolar line in pixels, beyond which the point is considered an outlier and is not used for computing the final fundamental matrix. It can be set to something like 1-3, depending on the accuracy of the point localization, image resolution, and the image noise. |
| confidence | FLOAT | 0.0000-1e+38–1e+38 | Parameter used for the RANSAC and LMedS methods only. It specifies a desirable level of confidence (probability) that the estimated matrix is correct. |
| maxIters | INT | 0-2147483648–2147483647 | The maximum number of robust method iterations. The epipolar geometry is described by the following equation: $$[p_2; 1]^T F [p_1; 1] = 0$$ where $F$ is a fundamental matrix, $p_1$ and $p_2$ are corresponding points in the first and the second images, respectively. The function calculates the fundamental matrix using one of four methods listed above and returns the found fundamental matrix. Normally just one matrix is found. But in case of the 7-point algorithm, the function may return up to 3 solutions ( $9 \times 3$ matrix that stores all 3 matrices sequentially). The calculated fundamental matrix may be passed further to #computeCorrespondEpilines that finds the epipolar lines corresponding to the specified points. It can also be passed to #stereoRectifyUncalibrated to compute the rectification transformation. : |
| maskopt | NPARRAY,IMAGE,MASK | - - - 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. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| F | NPARRAY | — |
| mask | NPARRAY | — |