Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@andijakl
Created November 23, 2020 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andijakl/3a35d7cfecdf67a69423f0a91334ee37 to your computer and use it in GitHub Desktop.
Save andijakl/3a35d7cfecdf67a69423f0a91334ee37 to your computer and use it in GitHub Desktop.
Visualize matched keypoints
# Draw the keypoint matches between both pictures
# Still based on: https://docs.opencv.org/master/dc/dc3/tutorial_py_matcher.html
draw_params = dict(matchColor=(0, 255, 0),
singlePointColor=(255, 0, 0),
matchesMask=matchesMask[300:500],
flags=cv.DrawMatchesFlags_DEFAULT)
keypoint_matches = cv.drawMatchesKnn(
img1, kp1, img2, kp2, matches[300:500], None, **draw_params)
cv.imshow("Keypoint matches", keypoint_matches)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment