How to check matching location\position(SIFT)?

asked 2020-08-24 06:45:26 -0600

Shay gravatar image

Hey, I am working on fingerprint recognition.

I am using SIFT to find minutiae points but I want not only to find the minutiae points I want to check if they are in the same place or region in both photos.

my code is:

sift = cv.SIFT_create()
keypoints_1, descriptors_1 = sift.detectAndCompute(img1,None)
keypoints_2, descriptors_2 = sift.detectAndCompute(img2,None)
bf = cv.BFMatcher(cv.NORM_L1, crossCheck=True)
matches = bf.match(descriptors_1,descriptors_2)
matches = sorted(matches, key = lambda x:x.distance)
img3 = cv.drawMatches(img1, keypoints_1, img2, keypoints_2, matches[:3], img2, flags=2)
plt.imshow(img3),plt.show()
print(len(matches))

with this code I can detect two simillar minutiae points but they can be in different positions and thats is my problem.

edit retag flag offensive close merge delete

Comments

but they can be in different positions and thats is my problem.

sorry, but you have to explain that.

also, example images ?

berak gravatar imageberak ( 2020-08-24 07:02:46 -0600 )edit

I mean they can be the same minutiae feature but one on x=50 y=60 and on the second photo it can be on x=1 y=1 so I dont care that they are the same feature I want them to be on the same location as well.

Shay gravatar imageShay ( 2020-08-24 07:50:38 -0600 )edit

DMatch has a distance member

berak gravatar imageberak ( 2020-08-28 03:25:53 -0600 )edit