Knn for keypoints and descriptors of SIFT

asked 2019-11-29 10:38:41 -0500

updated 2019-11-30 11:19:34 -0500


I have a lot of images, let's say for example 3 images who I extract Keypoints and descriptors by SIFT :

For Image 1: I extract K1 + D1

For Image 2: I extract K2 + D2

For Image 3: I extract K3 + D3

k: for keypoints and D : for descriptors.

And I have an image X (who has kx and Dx) and I want to find if the keypoints sand the descriptors in the image x are similar to the K&D in the image 1, 2 or 3.

My goal is to calculate registration between image x and (Image 1 or Image 2 or Image3).

I thought about using KNN but I don't know if it's the best solution and if it's goona work with two vectors K and D.

Edit 1 :

What do you think about this method :

My goal as above is to find if the image X is similare to the image 1, 2 or 3 to do resitration with.

-For the image 1, 2 and 3 extract keypoints and descriptors (use the same number of Hessian).

-Extract keypoints and descriptors for images X (use the same number of Hessian)-

-Calculate the number of good matches between Image X and Image 1, Image X and Image 2, Image X and Image 3.

-Take the image that has a lot of good matches to do registaration.

I need your help and thak you.

edit retag flag offensive close merge delete


throwing your data at KNN does not make any sense.

the order of kp/desc is arbitrary, that's why you need proper Matching to compare those in the 1st place.

maybe look at the reg module and the resp. sample

the (undocumented) videostab module is also performing registration via keypoints/descriptors, have a look there, too.

berak gravatar imageberak ( 2019-11-30 02:31:46 -0500 )edit

@berak Thank you for your response, what do you think about edit 1?

Kitnos gravatar imageKitnos ( 2019-11-30 11:20:24 -0500 )edit

the image X is similare to the image 1, 2 or 3

that's the whole point ;)

you need a reliable way to measure similarity (count/ratio of good matches alone fares poorly, imho)

the reg sample warps images using the homography from the matches, and compares those

berak gravatar imageberak ( 2019-11-30 11:39:13 -0500 )edit