You might want to take a look to this link
It's an opencv sample showing how to use a FlannBasedMatcher.
There is a lot of topics talking about this, you should search better before asking.
Edit
I assume you have a FLANN Index to match with des1
, so there is a function that returns if there is a match or not.
MIN_MATCH_COUNT = 10
def flann_match(des1):
matches = flann.knnMatch(des1, k=2)
# Check the distance to keep only the good matches.
matches = [m[0] for m in matches if len(m) == 2 and m[0].distance < m[1].distance * 0.75]
if len(matches < MIN_MATCH_COUNT)
return False
return True
This implementation is quite simple, you'll need to use cv2.findHomography()
(documentation) to get better and more accurate results, depends of what is your goal here.
Hope it helps.