6

I want to compare the SURF descriptors in one image (A), with the descriptors in several other images (B,C,D,..) to find the most similar image to A. The descriptors have 64 dimensions.

Using C# and Emgu, the match is done by comparing A's descriptors to B's, then C's, then D's and so on. This is very slow when the image count exceed 10, because many irrelevant descriptors have to be searched.

To speed up the process, the right way to go (according to articles) seem to be to build one kd-tree for the descriptors in (B,C,D,..) to quickly match find the descriptor in A. The kd-tree is split in dimensions according to the level. First split is decided by 1st dimension, second split by 2nd dimension etc. However, at the number of dimensions are high for the descriptors (64), the benefit of using a KD-tree becomes smaller.

So my question is: What experience or knowledge do you have with using a KD-tree/other method to match SURF descriptors from one image (A) to several images (B,C,D..). What works well and not so well and have you done anything like this?

FLANN would be an option here, as it is used by OpenCV, but I can't find a version for C#. Approximately Nearest Neightboor would also be an option to speed up the kd-tree, but does that work well with matching images?

Best regards Morten

MortenGR
  • 803
  • 1
  • 8
  • 22

2 Answers2

0

You can try FLANN it on C or C++. It is not too complicated.

However, I am testing FLANN on C++, but matching time (using SURF features, FLANN, query on 1,000 images) is very long, from 20 seconds to 400 seconds (depending on number of feature vectors per image).

Justin
  • 84,773
  • 49
  • 224
  • 367
Tom
  • 41
  • 1
0

Check out this example: https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/c/find_obj.cpp?rev=2065

nhahtdh
  • 55,989
  • 15
  • 126
  • 162
Piotr
  • 833
  • 5
  • 12