The KdTreeIndex class is the simplest an minimal method to use kdtrees. You only must define an adapter, that tells the class how to access the i-th dimension of your element. Here are two examples showing how easy it is:
This class defines a set of markers whose locations are attached to a common reference system, i.e., they do not move wrt each other. A MarkerMap contains several markers so that they are more robustly detected