|
gtsam_points
|
KdTree-based nearest neighbor search. More...
#include <kdtree2.hpp>


Public Types | |
| using | Index = UnsafeKdTree< Frame > |
Public Types inherited from gtsam_points::NearestNeighborSearch | |
| using | Ptr = std::shared_ptr< NearestNeighborSearch > |
| using | ConstPtr = std::shared_ptr< const NearestNeighborSearch > |
Public Member Functions | |
| KdTree2 (const std::shared_ptr< const Frame > &frame, int build_num_threads=1) | |
| virtual size_t | knn_search (const double *pt, size_t k, size_t *k_indices, double *k_sq_dists, double max_sq_dist=std::numeric_limits< double >::max()) const override |
| Find k nearest neighbors. | |
| virtual size_t | radius_search (const double *pt, double radius, std::vector< size_t > &indices, std::vector< double > &sq_dists, int max_num_neighbors=std::numeric_limits< int >::max()) const override |
| Radius search. | |
Public Attributes | |
| const std::shared_ptr< const Frame > | frame |
| double | search_eps |
| std::unique_ptr< Index > | index |
KdTree-based nearest neighbor search.
|
inlineoverridevirtual |
Find k nearest neighbors.
| pt | Query point (must be 4D vector [x, y, z, 1]) |
| k | Number of neighbors to search |
| k_indices | Indices of k nearest neighbors |
| k_sq_dists | Squared distances of k nearest neighbors |
Reimplemented from gtsam_points::NearestNeighborSearch.
|
inlineoverridevirtual |
Radius search.
max_num_neighbors is specified. (KdTree tends to first pick closer points though). | pt | Point |
| radius | Search radius |
| indices | Indices of neighbors within the radius |
| sq_dists | Squared distances to the neighbors |
| max_num_neighbors | Maximum number of neighbors |
Reimplemented from gtsam_points::NearestNeighborSearch.