From 87a87a7c58b76a78bfeb9a524f524a83648eb72d Mon Sep 17 00:00:00 2001 From: James Perlman Date: Wed, 17 Jan 2024 14:02:36 -0800 Subject: [PATCH] Fix call to pycolmap.verify_matches(...) Function `verify_matches` expects type `pycolmap.TwoViewGeometryOptions` as its last argument. --- hloc/triangulation.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hloc/triangulation.py b/hloc/triangulation.py index 103d5158..5f76d18c 100644 --- a/hloc/triangulation.py +++ b/hloc/triangulation.py @@ -115,8 +115,14 @@ def estimation_and_geometric_verification( logger.info("Performing geometric verification of the matches...") with OutputCapture(verbose): with pycolmap.ostream(): + two_view_geometry_options = pycolmap.TwoViewGeometryOptions() + ransac_options = pycolmap.RANSACOptions() + ransac_options.max_num_trials = 20000 + ransac_options.min_inlier_ratio = 0.1 + two_view_geometry_options.ransac = ransac_options + pycolmap.verify_matches( - database_path, pairs_path, max_num_trials=20000, min_inlier_ratio=0.1 + database_path, pairs_path, two_view_geometry_options )