Visualize matched keypoints
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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