Questions tagged [flann]

FLANN – the Fast Library for Approximate Nearest Neighbors – is a collection of nearest-neighbor algorithms, and a meta-algorithm to select the best of them for a given dataset.

FLANN is a library for performing fast approximate nearest-neighbor searches in high dimensional spaces.

FLANN was written by Marius Muja and David G. Lowe. It consists of:

  1. A collection of algorithms, each of which was found by the authors to work best across a range of nearest-neighbor-search use-cases, and
  2. A meta-algorithm that, for a given dataset, selects the best algorithm and the optimal parameters.

A common use of FLANN is in the detection of homography across images in applications – FLANN finds the nearest neighbors among sets of features extracted from the images in question. This visualization illustrates FLANN matches found amongst two sets of feature keypoint data:

FLANN keypoint matches

FLANN is written in and contains bindings for the following languages: , and .

Useful links:

162 questions
3
votes
1 answer

Installing pyflann through conda and importing on python 3.5

I would like to use the package pyflann on python 3.5 (Win-64) I use the app spyder from Anaconda 3 to write and compile my scripts. I have installed the package pyflann using command prompt and conda. It seems that the installation was successful…
3
votes
0 answers

How to access to the values stored in a flann::Matrix

I'm working with flann library with point clouds. I have this adapter method that transform my own points to a flann-usable points flann::Matrix * converterFlann::convertArray(vector *P){ float points[P->size()*3]; int j =…
froure
  • 121
  • 2
  • 10
3
votes
1 answer

FLANN in opencv runs too slow

I have a set of point cloub(number of point cloub≈2million). I would like to find the nearest k neighbor for each point within the point cloub. I did something like this flann::Index flann_index(data_m,…
Carl
  • 105
  • 3
  • 12
3
votes
3 answers

Flann KNN Matcher in OpenCV returns only one point instead of a pair

When I run the Flann KNN matcher, then there are certain times when the KNN matcher only returns one point because of which code after the matcher that relies on there being two points fails: flann = cv2.FlannBasedMatcher(index_params,…
Sandman
  • 5,432
  • 5
  • 20
  • 23
3
votes
1 answer

Opencv Flannbasedmatcher

I got an issue with: cv::FlannBasedMatcher More precisely with the knnMatch method. My program take as input and IplImage* and detect a face then it cut the faces and compare the face founded with an image stored on my computer. If i got more…
Ayrton Werck
  • 334
  • 4
  • 15
3
votes
1 answer

OpenCV saving image, keypoints and descriptors to file

I'm using SURF/FLANN detector and I'm looking to save the image, points, descriptors to a file so I can then compare this image and it's points to a second image and points however I'm getting the following error when I try to write: In file…
Colin747
  • 4,955
  • 18
  • 70
  • 118
3
votes
0 answers

FLANN Autotune Stuck at "Estimating number of checks"

I'm trying to use FLANN on Python with a training set matrix of 6,000,000 x 100. I am building the index with the following commands: flann = pyflann.FLANN() params = flann.build_index(trainX, algorithm="autotuned", target_precision=0.9,…
mchangun
  • 9,814
  • 18
  • 71
  • 101
3
votes
2 answers

How to change MATLAB path to compile mex files of FLANN with cmake command?

I try to compile FLANN on a remote machine which I am not a root user. For this purpose I compiled cmake at my home and set an alias to call. I also downloaded FLANN from web and process the compilation as it is suggested at the manual. mkdir…
erogol
  • 13,156
  • 33
  • 101
  • 155
2
votes
1 answer

How does FLANN select what algorithm and parameters to use?

FLANN (Fast Library for Approximate Nearest Neighbors) is a library for performing fast approximate nearest neighbor searches in high dimensional spaces. It contains a collection of algorithms we found to work best for nearest neighbor search and a…
harkib
  • 43
  • 1
  • 5
2
votes
1 answer

Can't load a saved FLANN index

After adding all descriptors to a FLANN index, I'm saving it using this code: flann = cv2.flann.Index() for index, filename in enumerate(os.listdir('images')): img2 = cv2.imread('images/' + filename, 0) kp2, des2 =…
tampe125
  • 8,231
  • 7
  • 30
  • 45
2
votes
1 answer

Linker errors with PCL 1.8.0 project

I'm getting some confusing linking errors in my project after a fresh compilation and install of PCL 1.8.0. Some classes are fine (I can read and render a PC) but as soon as I instantiate some others, I get a whack of linker errors. eg. #include…
2
votes
0 answers

How to divide FLANN SURF into feature extraction and find similarity?

I am suing SURF algorithm, to find the similarity between a query image and a collection image that stored in a database. For better performance, I used Fast Approximate Nearest Neighbor (FLANN). Now, I want divide this work into two steps: First…
zana
  • 126
  • 2
  • 8
2
votes
1 answer

Utilizing FLANN library for Multi-Label Classification

I want to utilize the FLANN library for Mutli-Label Classification. I know that FLANN library is for computation of nearest neighbors, but I'm not sure how to utilize it for classification purposes. Is there some way to plug it in the Scikit-Learn…
2
votes
0 answers

Using custom distance function with FLANN or Knn in OpenCv?

I'm working on code that computes dense SIFT features from a set of images, based on SIFT flow: http://people.csail.mit.edu/celiu/SIFTflow/ I'd like to try building a FLANN index on these images by comparing the "energy" between each image in SIFT…
tyhenry
  • 174
  • 1
  • 6
2
votes
1 answer

Fast library for approximate nearest neighbors (FLANN) use in Matlab

I'd like to use Fast library for approximate nearest neighbors (FLANN) in Matlab 2010, Windows 7. However, the error message below occurs. Undefined function or method 'nearest_neighbors' for input arguments of type 'struct'. nearest_neighbors file…
NZNEAR LEE
  • 21
  • 1
  • 5
1 2
3
10 11