Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/DeepFeatureMatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def match(self, img_A, img_B, display_results=0, *args):
dst = points_A.t().numpy()

if points_A.size(1) >= 4:
H_init, _ = cv.findHomography(src, dst, method=cv.RANSAC, ransacReprojThreshold=16*np.sqrt(2)+1, maxIters=5000, confidence=0.9999)
H_init, _ = cv.findHomography(src, dst, method=cv.USAC_MAGSAC, ransacReprojThreshold=16*np.sqrt(2)+1, maxIters=5000, confidence=0.9999)

# opencv might return None for H, check for None
H_init = np.eye(3, dtype=np.double) if H_init is None else H_init
Expand Down Expand Up @@ -136,7 +136,7 @@ def match(self, img_A, img_B, display_results=0, *args):
dst = points_A.t().numpy()

if points_A.size(1) >= 4:
H, _ = cv.findHomography(src, dst, method=cv.RANSAC, ransacReprojThreshold=3.0, maxIters=5000, confidence=0.9999)
H, _ = cv.findHomography(src, dst, method=cv.USAC_MAGSAC, ransacReprojThreshold=3.0, maxIters=5000, confidence=0.9999)

# opencv might return None for H, check for None
H = np.eye(3, dtype=np.double) if H is None else H
Expand Down