Ask Your Question

What's the difference between `KDTreeIndex` and `KDTreeSingleIndex`?

asked 2015-12-18 08:07:54 -0500

Qiang Guo gravatar image

In their comments, both says:

 * Randomized kd-tree index
 * Contains the k-d trees and other information for indexing a set of points
 * for nearest-neighbor matching.

Anyone can tell me the exact difference of the two Index classes?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-01-10 16:28:55 -0500

Eduardo gravatar image

updated 2016-01-10 16:50:13 -0500

Quote from Difference of KDTreeIndexParams vs. KDTreeSingleIndexParams:

Yes, that's exactly it. KDTreeIndex performs approximate NN search, while KDTreeSingleIndex performs exact NN search. The KDTreeSingleIndex is efficient for low dimensional data, for high dimensional data an approximate search algorithm such as the KDTreeIndex will be much faster.

Also from the FLANN manual (flann_manual-1.8.4.pdf):


When passing an object of this type the index constructed will consist of a set of randomized kd-trees which will be searched in parallel.


When passing an object of this type the index will contain a single kd-tree optimized for searching lower dimen- sionality data (for example 3D point clouds)

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-12-18 08:07:54 -0500

Seen: 572 times

Last updated: Jan 10 '16