SIFT matches between sift matrices -> operations with matrices - Programmers Heaven

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

#### Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

# SIFT matches between sift matrices -> operations with matrices

Posts: 1Member
Hi, this is my first post so i'll get straightforward to the point.
i'm doing a function that takes as input two sift matrices of image A and B and returns the number of sift matching sifts.
the matrices have the following characteristics:

1)1 row describes 1 sift
2)a sift is desxribed only by integers:
x,y, coordinates, intensity, orientation + 128 integers in the range 0/255
3) the 128 integers are used to actually measure the distance between two SIFT
descriptors
4)SIFT x from image A matches SIFT y from image B if y is the closest (to x)
SIFT in B, and the second closest SIFT z in b has distance such that d(x,y)/
d(x,z)<alpha
-Usually with alpha=0.8.

my algorithm (I use C++, this is just pseudocode to not bore you):

int NumMatches

for each row in A
{ for each row in B
{ compute euclidian_distance(row(A),row(B));

select Minimum1 //the minimum distance
select Minimum2 //the second mimimum distance
}
}
if(Minimum1/Minimum2<alfa)
NumMatches++

return NumMatches

the algorithm must be applied to about 30K images, so i need that it would be as light as possible and my O(N^2) complexity is too much to handle.
Is it possilbe to do better?
Maybe changing the type of distance?
I need to know how i can make it faster!!
thanks!