primetang / pyflann

python bindings for FLANN - Fast Library for Approximate Nearest Neighbors.
Other
122 stars 55 forks source link

Handling different dimensions of points for build_index() #5

Open rudolphyo opened 7 years ago

rudolphyo commented 7 years ago

Hello!

Is there a way to feed pyflann.FLANN() with points of different dimensions? For example it could be SURF descriptors of images.

What is the most appropriate way to handle this? Would it be right to get the maximum length of dataset points and fill with zeros points of smaller dimension? I assume that it is ok, because it doesn`t change the euclidean norm and distance as well.

Thank you!

rudolphyo commented 7 years ago

I checked that on my simple example with matching image with small db on 10 images - distance from nn_index stays the same with zero filling and without.