template struct mrpt::vision::TSIFTDescriptorsKDTreeIndex¶
A kd-tree builder for sets of features with SIFT descriptors.
Example of usage:
TSIFTDescriptorsKDTreeIndex<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<uint8_t , detail::TSIFTDesc2KDTree_Adaptor<distance_t>, distance_t> > struct TSIFTDescriptorsKDTreeIndex { // typedefs typedef typename nanoflann::KDTreeSingleIndexAdaptor<metric_t, detail::TSIFTDesc2KDTree_Adaptor<distance_t>> kdtree_t; // construction TSIFTDescriptorsKDTreeIndex(const CFeatureList& feats); // methods void regenerate_kdtreee(); kdtree_t& get_kdtree(); const kdtree_t& get_kdtree() const; };
Construction¶
TSIFTDescriptorsKDTreeIndex(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.