template struct mrpt::vision::TSURFDescriptorsKDTreeIndex
A kd-tree builder for sets of features with SURF descriptors.
Example of usage:
TSURFDescriptorsKDTreeIndex<double> feats_kdtree(feats); feats_kdtree.get_kdtree().knnSearch( ... );
See also:
CFeatureList, mrpt::vision::find_descriptor_pairings
#include <mrpt/vision/descriptor_kdtrees.h> template < typename distance_t, class metric_t = nanoflann::L2_Simple_Adaptor<float , detail::TSURFDesc2KDTree_Adaptor<distance_t>, distance_t> > struct TSURFDescriptorsKDTreeIndex { // typedefs typedef typename nanoflann::KDTreeSingleIndexAdaptor<metric_t, detail::TSURFDesc2KDTree_Adaptor<distance_t>> kdtree_t; // construction TSURFDescriptorsKDTreeIndex(const CFeatureList& feats); // methods void regenerate_kdtreee(); kdtree_t& get_kdtree(); const kdtree_t& get_kdtree() const; };
Construction
TSURFDescriptorsKDTreeIndex(const CFeatureList& feats)
Constructor from a list of SIFT features.
Automatically build the KD-tree index. The list of features must NOT be empty or an exception will be raised.
Methods
void regenerate_kdtreee()
Re-creates the kd-tree, which must be done whenever the data source (the CFeatureList) changes.
kdtree_t& get_kdtree()
Access to the kd-tree object.