![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
KDTree with FLANN for nearest neighbor search. More...
#include <ecvKDTreeFlann.h>
Public Member Functions | |
| KDTreeFlann () | |
| Default Constructor. More... | |
| KDTreeFlann (const Eigen::MatrixXd &data) | |
| Parameterized Constructor. More... | |
| KDTreeFlann (const ccHObject &geometry) | |
| Parameterized Constructor. More... | |
| KDTreeFlann (const utility::Feature &feature) | |
| Parameterized Constructor. More... | |
| ~KDTreeFlann () | |
| KDTreeFlann (const KDTreeFlann &)=delete | |
| KDTreeFlann & | operator= (const KDTreeFlann &)=delete |
| bool | SetMatrixData (const Eigen::MatrixXd &data) |
| bool | SetGeometry (const ccHObject &geometry) |
| bool | SetFeature (const utility::Feature &feature) |
| template<typename T > | |
| int | Search (const T &query, const KDTreeSearchParam ¶m, std::vector< int > &indices, std::vector< double > &distance2) const |
| template<typename T > | |
| int | Query (const std::vector< T > &queries, const KDTreeSearchParam ¶m, std::vector< std::vector< int >> &indices, std::vector< std::vector< double >> &distance2) const |
| template<typename T > | |
| int | SearchKNN (const T &query, int knn, std::vector< int > &indices, std::vector< double > &distance2) const |
| template<typename T > | |
| int | SearchRadius (const T &query, double radius, std::vector< int > &indices, std::vector< double > &distance2) const |
| template<typename T > | |
| int | SearchHybrid (const T &query, double radius, int max_nn, std::vector< int > &indices, std::vector< double > &distance2) const |
Protected Types | |
| using | KDTree_t = nanoflann::KDTreeEigenMatrixAdaptor< Eigen::Map< const Eigen::MatrixXd >, -1, nanoflann::metric_L2, false > |
Protected Attributes | |
| std::vector< double > | data_ |
| std::unique_ptr< KDTree_t > | nanoflann_index_ |
| std::unique_ptr< Eigen::Map< const Eigen::MatrixXd > > | data_interface_ |
| size_t | dimension_ = 0 |
| size_t | dataset_size_ = 0 |
KDTree with FLANN for nearest neighbor search.
Definition at line 33 of file ecvKDTreeFlann.h.
|
protected |
Definition at line 205 of file ecvKDTreeFlann.h.
| cloudViewer::geometry::KDTreeFlann::KDTreeFlann | ( | ) |
Default Constructor.
Definition at line 29 of file ecvKDTreeFlann.cpp.
| cloudViewer::geometry::KDTreeFlann::KDTreeFlann | ( | const Eigen::MatrixXd & | data | ) |
Parameterized Constructor.
| data | Provides set of data points for KDTree construction. |
Definition at line 31 of file ecvKDTreeFlann.cpp.
References data, and SetMatrixData().
| cloudViewer::geometry::KDTreeFlann::KDTreeFlann | ( | const ccHObject & | geometry | ) |
Parameterized Constructor.
| geometry | Provides geometry from which KDTree is constructed. |
Definition at line 33 of file ecvKDTreeFlann.cpp.
References SetGeometry().
| cloudViewer::geometry::KDTreeFlann::KDTreeFlann | ( | const utility::Feature & | feature | ) |
Parameterized Constructor.
| feature | Provides a set of features from which the KDTree is constructed. |
Definition at line 35 of file ecvKDTreeFlann.cpp.
References SetFeature().
| cloudViewer::geometry::KDTreeFlann::~KDTreeFlann | ( | ) |
Definition at line 39 of file ecvKDTreeFlann.cpp.
|
delete |
|
delete |
|
inline |
Definition at line 94 of file ecvKDTreeFlann.h.
References LogWarning.
|
inline |
Definition at line 69 of file ecvKDTreeFlann.h.
References cloudViewer::geometry::KDTreeSearchParam::GetSearchType(), cloudViewer::geometry::KDTreeSearchParam::Hybrid, cloudViewer::geometry::KDTreeSearchParam::Knn, and cloudViewer::geometry::KDTreeSearchParam::Radius.
Referenced by cloudViewer::utility::ComputeFPFHFeature(), cloudViewer::utility::ComputeSPFHFeature(), and ccPointCloud::EstimatePerPointCovariances().
|
inline |
Definition at line 170 of file ecvKDTreeFlann.h.
References Utils::distance().
Referenced by cloudViewer::pipelines::registration::GetRegistrationResultAndCorrespondences().
|
inline |
Definition at line 121 of file ecvKDTreeFlann.h.
Referenced by ccPointCloud::ComputeNearestNeighborDistance(), ccPointCloud::ComputePointCloudDistance(), cloudViewer::utility::CorrespondencesFromFeatures(), cloudViewer::pipelines::registration::InitialMatching(), ccPointCloud::OrientNormalsConsistentTangentPlane(), cloudViewer::pipelines::registration::RegistrationRANSACBasedOnFeatureMatching(), and ccPointCloud::RemoveStatisticalOutliers().
|
inline |
Definition at line 144 of file ecvKDTreeFlann.h.
Referenced by cloudViewer::geometry::keypoint::ComputeISSKeypoints(), ccMesh::MergeCloseVertices(), ccPointCloud::RemoveRadiusOutliers(), ccMesh::SamplePointsPoissonDisk(), and cloudViewer::benchmarks::TestKDTreeLine0::search().
| bool cloudViewer::geometry::KDTreeFlann::SetFeature | ( | const utility::Feature & | feature | ) |
Sets the data for the KDTree from the feature data.
| feature | Set of features for KDTree construction. |
Definition at line 76 of file ecvKDTreeFlann.cpp.
References cloudViewer::utility::Feature::data_, and SetMatrixData().
Referenced by KDTreeFlann().
| bool cloudViewer::geometry::KDTreeFlann::SetGeometry | ( | const ccHObject & | geometry | ) |
Sets the data for the KDTree from geometry.
| geometry | Geometry for KDTree Construction. |
Definition at line 46 of file ecvKDTreeFlann.cpp.
References ccHObject::getClassID(), CV_TYPES::HALF_EDGE_MESH, CV_TYPES::HIERARCHY_OBJECT, CV_TYPES::IMAGE, LogWarning, CV_TYPES::MESH, CV_TYPES::POINT_CLOUD, and points.
Referenced by ccPointCloud::ComputePointCloudDistance(), ccPointCloud::EstimatePerPointCovariances(), cloudViewer::pipelines::registration::EvaluateRegistration(), KDTreeFlann(), cloudViewer::pipelines::registration::RegistrationICP(), ccPointCloud::RemoveRadiusOutliers(), ccPointCloud::RemoveStatisticalOutliers(), and cloudViewer::benchmarks::TestKDTreeLine0::setup().
| bool cloudViewer::geometry::KDTreeFlann::SetMatrixData | ( | const Eigen::MatrixXd & | data | ) |
Sets the data for the KDTree from a matrix.
| data | Data points for KDTree Construction. |
Definition at line 41 of file ecvKDTreeFlann.cpp.
References data.
Referenced by KDTreeFlann(), and SetFeature().
|
protected |
Definition at line 211 of file ecvKDTreeFlann.h.
|
protected |
Definition at line 213 of file ecvKDTreeFlann.h.
|
protected |
Definition at line 215 of file ecvKDTreeFlann.h.
|
protected |
Definition at line 214 of file ecvKDTreeFlann.h.
|
protected |
Definition at line 212 of file ecvKDTreeFlann.h.