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 computer-vision 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 sift feature keypoint data:

FLANN keypoint matches

FLANN is written in c++ and contains bindings for the following languages: c, matlab and python.

Useful links: