verifyImagePairs
R2026bDescription
The verifyImagePairs function refines the SfM view graph
created by the connectImagePairs function by enforcing epipolar
constraints to remove geometrically inconsistent connections. Use the
verifyImagePairs object function as the second step in the SfM
pipeline, followed by the triangulateInitialViews object function, which
initializes the 3-D reconstruction. Use the isConnected function to
verify whether the view graph is ready for refinement before calling the
verifyImagePairs function.
The verifyImagePairs function uses the essential matrix and homography
as geometric models while refining the connections in the view graph. For more information
about the algorithm see Algorithms.
refines the view graph associated with the sfmObj = verifyImagePairs(sfmObj)sfm object
sfmObj by using epipolar constraints. After verification, the view
graph contains only connections between image pairs whose feature matches are consistent with
valid camera motion. The function then returns a version of the input SfM object with
updated ViewGraph, SimilarityMatrix, and ConnectedImages
property values.
specifies additional options using one or more name-value arguments. For example,
sfmObj = verifyImagePairs(sfmObj,Name=Value)verifyImagePairs(sfmObj,MinNumInliers=50) requires that a connection
have at least 50 inlier matches to be considered valid and retained in the
view graph.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Tips
To assess how many connections the function removes during refinement, compare the
SimilarityMatrixproperties of the input and outputsfmobjects by using theimagescfunction.If refinement removes too many connections, reduce the value of the
MinNumInliersargument, or increase the value of theMaxDistanceargument.If too many false pairs survive verification, increase the value of the
MinNumInliersargument, or decrease the value of theMaxDistanceargument.For more information, see Best Practices for 3-D Reconstruction Using Structure from Motion.
Algorithms
After the SfM pipeline connects image pairs using appearance‑based feature matching, geometric verification enforces consistency with the underlying camera geometry. This step removes incorrect or spurious connections by validating feature correspondences against epipolar constraints. By filtering out geometrically inconsistent image pairs, the algorithm refines the view graph to retain only robust, physically plausible connections, improving the stability and accuracy of subsequent 3‑D reconstruction.
For each connected image pair in the view graph, the verifyImagePairs
function performs these steps:
Estimate geometric models — The function estimates the essential matrix using the five‑point algorithm within a RANSAC framework to model general 3‑D scene geometry. In parallel, it estimates a homography using RANSAC to model planar or near‑planar scenes.
Select the appropriate geometric model — The function evaluates both geometric models and compares their inlier counts. It selects the model with the higher number of inliers, indicating that the image pair is better explained by the selected geometry. A higher inlier count for the essential matrix indicates a general 3‑D scene structure, while a higher inlier count for the homography indicates planar geometry or pure camera rotation.
Identify geometrically consistent matches — Using the selected geometric model, the function identifies inlier feature correspondences that satisfy the estimated epipolar or homography constraints.
Refine the view graph — The function retains the image pair in the view graph if the number of inlier correspondences meets a minimum inlier requirement. If the number of inliers falls below this threshold, the function removes the image pair from the view graph.
Version History
Introduced in R2026b
See Also
sfm | connectImagePairs | isConnected | isVerified | triangulateInitialViews | reconstruct | poses | pointCloud | plot | isInitialized












