From 164465e7349220f76d55545960dbce865dbd145a Mon Sep 17 00:00:00 2001 From: Mike Busuttil <31480000+MikeBusuttil@users.noreply.github.com> Date: Sun, 17 Sep 2023 12:18:43 -0400 Subject: [PATCH] link matches to the images they were found --- VisualOdometry/visual_odometry.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/VisualOdometry/visual_odometry.py b/VisualOdometry/visual_odometry.py index ffd4a2c..b0b51fb 100644 --- a/VisualOdometry/visual_odometry.py +++ b/VisualOdometry/visual_odometry.py @@ -123,12 +123,12 @@ def get_matches(self, i): except ValueError: pass - draw_params = dict(matchColor = -1, # draw matches in green color - singlePointColor = None, - matchesMask = None, # draw only inliers - flags = 2) + draw_params = dict( + matchesMask = None, # draw only inliers + flags = 2 + ) - img3 = cv2.drawMatches(self.images[i], kp1, self.images[i-1],kp2, good ,None,**draw_params) + img3 = cv2.drawMatches(self.images[i-1], kp1, self.images[i],kp2, good ,None,**draw_params) cv2.imshow("image", img3) cv2.waitKey(200)