Open3D (C++ API)
0.18.0+5c982c7
|
A Class for nearest neighbor search. More...
#include <NearestNeighborSearch.h>
Public Member Functions | |
NearestNeighborSearch (const Tensor &dataset_points, const Dtype &index_dtype=core::Int32) | |
~NearestNeighborSearch () | |
NearestNeighborSearch (const NearestNeighborSearch &)=delete | |
NearestNeighborSearch & | operator= (const NearestNeighborSearch &)=delete |
bool | KnnIndex () |
bool | MultiRadiusIndex () |
bool | FixedRadiusIndex (utility::optional< double > radius={}) |
bool | HybridIndex (utility::optional< double > radius={}) |
std::pair< Tensor, Tensor > | KnnSearch (const Tensor &query_points, int knn) |
std::tuple< Tensor, Tensor, Tensor > | FixedRadiusSearch (const Tensor &query_points, double radius, bool sort=true) |
std::tuple< Tensor, Tensor, Tensor > | MultiRadiusSearch (const Tensor &query_points, const Tensor &radii) |
std::tuple< Tensor, Tensor, Tensor > | HybridSearch (const Tensor &query_points, const double radius, const int max_knn) const |
Protected Attributes | |
std::unique_ptr< NanoFlannIndex > | nanoflann_index_ |
std::unique_ptr< nns::FixedRadiusIndex > | fixed_radius_index_ |
std::unique_ptr< nns::KnnIndex > | knn_index_ |
const Tensor | dataset_points_ |
const Dtype | index_dtype_ |
A Class for nearest neighbor search.
|
inline |
Constructor.
dataset_points | Dataset points for constructing search index. Must be 2D, with shape {n, d}. |
open3d::core::nns::NearestNeighborSearch::~NearestNeighborSearch | ( | ) |
|
delete |
bool open3d::core::nns::NearestNeighborSearch::FixedRadiusIndex | ( | utility::optional< double > | radius = {} | ) |
Set index for fixed-radius search.
radius | optional radius parameter. required for gpu fixed radius index. |
std::tuple< Tensor, Tensor, Tensor > open3d::core::nns::NearestNeighborSearch::FixedRadiusSearch | ( | const Tensor & | query_points, |
double | radius, | ||
bool | sort = true |
||
) |
Perform fixed radius search. All query points share the same radius.
query_points | Data points for querying. Must be 2D, with shape {n, d}. |
radius | Radius. |
sort | Sort the results by distance. Default is True. |
bool open3d::core::nns::NearestNeighborSearch::HybridIndex | ( | utility::optional< double > | radius = {} | ) |
Set index for hybrid search.
std::tuple< Tensor, Tensor, Tensor > open3d::core::nns::NearestNeighborSearch::HybridSearch | ( | const Tensor & | query_points, |
const double | radius, | ||
const int | max_knn | ||
) | const |
Perform hybrid search.
query_points | Data points for querying. Must be 2D, with shape {n, d}. |
radius | Radius. |
max_knn | Maximum number of neighbor to search per query. |
bool open3d::core::nns::NearestNeighborSearch::KnnIndex | ( | ) |
Set index for knn search.
std::pair< Tensor, Tensor > open3d::core::nns::NearestNeighborSearch::KnnSearch | ( | const Tensor & | query_points, |
int | knn | ||
) |
Perform knn search.
query_points | Query points. Must be 2D, with shape {n, d}. |
knn | Number of neighbors to search per query point. |
bool open3d::core::nns::NearestNeighborSearch::MultiRadiusIndex | ( | ) |
Set index for multi-radius search.
std::tuple< Tensor, Tensor, Tensor > open3d::core::nns::NearestNeighborSearch::MultiRadiusSearch | ( | const Tensor & | query_points, |
const Tensor & | radii | ||
) |
Perform multi-radius search. Each query point has an independent radius.
query_points | Query points. Must be 2D, with shape {n, d}. |
radii | Radii of query points. Each query point has one radius. Must be 1D, with shape {n,}. |
|
delete |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |