Point Cloud Library (PCL)
1.10.0
|
43 #include <pcl/features/feature.h>
44 #include <pcl/search/pcl_search.h>
60 template<
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT = pcl::VFHSignature308>
79 vpx_ (0), vpy_ (0), vpz_ (0), leaf_size_ (0.005f), normalize_bins_ (false), curv_threshold_ (0.03f), cluster_tolerance_ (leaf_size_ * 3),
80 eps_angle_threshold_ (0.125f), min_points_ (50), radius_normals_ (leaf_size_ * 3)
85 refine_clusters_ = 1.f;
86 min_axis_value_ = 0.925f;
98 inline Eigen::Matrix4f
99 createTransFromAxes (Eigen::Vector3f & evx, Eigen::Vector3f & evy, Eigen::Vector3f & evz, Eigen::Affine3f & transformPC,
100 Eigen::Matrix4f & center_mat)
102 Eigen::Matrix4f trans;
103 trans.setIdentity (4, 4);
104 trans (0, 0) = evx (0, 0);
105 trans (1, 0) = evx (1, 0);
106 trans (2, 0) = evx (2, 0);
107 trans (0, 1) = evy (0, 0);
108 trans (1, 1) = evy (1, 0);
109 trans (2, 1) = evy (2, 0);
110 trans (0, 2) = evz (0, 0);
111 trans (1, 2) = evz (1, 0);
112 trans (2, 2) = evz (2, 0);
114 Eigen::Matrix4f homMatrix = Eigen::Matrix4f ();
115 homMatrix.setIdentity (4, 4);
116 homMatrix = transformPC.matrix ();
118 Eigen::Matrix4f trans_copy = trans.inverse ();
119 trans = trans_copy * center_mat * homMatrix;
140 sgurf (Eigen::Vector3f & centroid, Eigen::Vector3f & normal_centroid,
PointInTPtr & processed, std::vector<Eigen::Matrix4f, Eigen::aligned_allocator<Eigen::Matrix4f> > & transformations,
152 std::vector<int> &indices_in,
float threshold);
173 radius_normals_ = radius_normals;
193 getCentroidClusters (std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> > & centroids)
216 cluster_tolerance_ = d;
225 eps_angle_threshold_ = d;
252 normalize_bins_ = normalize;
279 refine_clusters_ = rc;
286 getTransforms (std::vector<Eigen::Matrix4f, Eigen::aligned_allocator<Eigen::Matrix4f> > & trans)
298 valid = valid_transforms_;
329 float vpx_, vpy_, vpz_;
337 bool normalize_bins_;
340 float curv_threshold_;
343 float cluster_tolerance_;
346 float eps_angle_threshold_;
351 std::size_t min_points_;
354 float radius_normals_;
357 float refine_clusters_;
359 std::vector<Eigen::Matrix4f, Eigen::aligned_allocator<Eigen::Matrix4f> > transforms_;
360 std::vector<bool> valid_transforms_;
363 float min_axis_value_;
391 std::vector<pcl::PointIndices> &clusters,
double eps_angle,
unsigned int min_pts_per_cluster = 1,
392 unsigned int max_pts_per_cluster = (std::numeric_limits<int>::max) ());
406 #ifdef PCL_NO_PRECOMPILE
407 #include <pcl/features/impl/our_cvfh.hpp>
This file defines compatibility wrappers for low level I/O functions.
shared_ptr< Feature< PointInT, PointOutT > > Ptr
std::vector< pcl::PointIndices > clusters_
Indices to the points representing the stable clusters.
void getValidTransformsVec(std::vector< bool > &valid)
Returns a boolean vector indicating of the transformation obtained by getTransforms() represents a va...
typename KdTree::Ptr KdTreePtr
void computeRFAndShapeDistribution(PointInTPtr &processed, PointCloudOut &output, std::vector< pcl::PointIndices > &cluster_indices)
Computes SGURF and the shape distribution based on the selected SGURF.
void setAxisRatio(float f)
Sets the min axis ratio between the SGURF axes to decide if disambiguition is feasible.
Eigen::Matrix4f createTransFromAxes(Eigen::Vector3f &evx, Eigen::Vector3f &evy, Eigen::Vector3f &evz, Eigen::Affine3f &transformPC, Eigen::Matrix4f ¢er_mat)
Creates an affine transformation from the RF axes.
void getClusterAxes(std::vector< short > &cluster_axes)
Gets the number of non-disambiguable axes that correspond to each centroid.
void setMinAxisValue(float f)
Sets the min disambiguition axis value to generate several SGURFs for the cluster when disambiguition...
void getClusterIndices(std::vector< pcl::PointIndices > &indices)
Gets the indices of the original point cloud used to compute the signatures.
shared_ptr< const Feature< PointInT, PointOutT > > ConstPtr
void getTransforms(std::vector< Eigen::Matrix4f, Eigen::aligned_allocator< Eigen::Matrix4f > > &trans)
Returns the transformations aligning the point cloud to the corresponding SGURF.
void setNormalizeBins(bool normalize)
Sets whether the signatures should be normalized or not.
std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f > > dominant_normals_
Normal centroids that were used to compute different OUR-CVFH descriptors.
OURCVFHEstimation estimates the Oriented, Unique and Repetable Clustered Viewpoint Feature Histogram ...
bool sgurf(Eigen::Vector3f ¢roid, Eigen::Vector3f &normal_centroid, PointInTPtr &processed, std::vector< Eigen::Matrix4f, Eigen::aligned_allocator< Eigen::Matrix4f > > &transformations, PointInTPtr &grid, pcl::PointIndices &indices)
Computes SGURF.
OURCVFHEstimation()
Empty constructor.
double search_radius_
The nearest neighbors search radius for each point.
void setEPSAngleThreshold(float d)
Sets max.
shared_ptr< pcl::search::Search< PointT > > Ptr
void setMinPoints(std::size_t min)
Set minimum amount of points for a cluster to be considered.
void getCentroidClusters(std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f > > ¢roids)
Get the centroids used to compute different CVFH descriptors.
int k_
The number of K nearest neighbors to use for each point.
typename pcl::PointCloud< PointInT >::Ptr PointInTPtr
void compute(PointCloudOut &output)
Overloaded computed method from pcl::Feature.
std::vector< short > cluster_axes_
Mapping from clusters to OUR-CVFH descriptors.
std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f > > centroids_dominant_orientations_
Centroids that were used to compute different OUR-CVFH descriptors.
void setRefineClusters(float rc)
Sets the refinement factor for the clusters.
shared_ptr< PointCloud< PointT > > Ptr
void getViewPoint(float &vpx, float &vpy, float &vpz)
Get the viewpoint.
void setClusterTolerance(float d)
Sets max.
void setRadiusNormals(float radius_normals)
Set the radius used to compute normals.
void setViewPoint(float vpx, float vpy, float vpz)
Set the viewpoint.
typename Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut
void filterNormalsWithHighCurvature(const pcl::PointCloud< PointNT > &cloud, std::vector< int > &indices_to_use, std::vector< int > &indices_out, std::vector< int > &indices_in, float threshold)
Removes normals with high curvature caused by real edges or noisy data.
std::string feature_name_
The feature name.
void getCentroidNormalClusters(std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f > > ¢roids)
Get the normal centroids used to compute different CVFH descriptors.
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.
void setCurvatureThreshold(float d)
Sets curvature threshold for removing normals.
Feature represents the base feature class.