|
Point Cloud Library (PCL)
1.11.1-dev
|
43 #include <pcl/features/feature.h>
58 template<
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT = pcl::VFHSignature308>
62 using Ptr = shared_ptr<OURCVFHEstimation<PointInT, PointNT, PointOutT> >;
63 using ConstPtr = shared_ptr<const OURCVFHEstimation<PointInT, PointNT, PointOutT> >;
77 vpx_ (0), vpy_ (0), vpz_ (0), leaf_size_ (0.005f), normalize_bins_ (false), curv_threshold_ (0.03f), cluster_tolerance_ (leaf_size_ * 3),
78 eps_angle_threshold_ (0.125f), min_points_ (50), radius_normals_ (leaf_size_ * 3)
83 refine_clusters_ = 1.f;
84 min_axis_value_ = 0.925f;
96 inline Eigen::Matrix4f
97 createTransFromAxes (Eigen::Vector3f & evx, Eigen::Vector3f & evy, Eigen::Vector3f & evz, Eigen::Affine3f & transformPC,
98 Eigen::Matrix4f & center_mat)
100 Eigen::Matrix4f trans;
101 trans.setIdentity (4, 4);
102 trans (0, 0) = evx (0, 0);
103 trans (1, 0) = evx (1, 0);
104 trans (2, 0) = evx (2, 0);
105 trans (0, 1) = evy (0, 0);
106 trans (1, 1) = evy (1, 0);
107 trans (2, 1) = evy (2, 0);
108 trans (0, 2) = evz (0, 0);
109 trans (1, 2) = evz (1, 0);
110 trans (2, 2) = evz (2, 0);
112 Eigen::Matrix4f homMatrix = Eigen::Matrix4f ();
113 homMatrix.setIdentity (4, 4);
114 homMatrix = transformPC.matrix ();
116 Eigen::Matrix4f trans_copy = trans.inverse ();
117 trans = trans_copy * center_mat * homMatrix;
138 sgurf (Eigen::Vector3f & centroid, Eigen::Vector3f & normal_centroid,
PointInTPtr & processed, std::vector<Eigen::Matrix4f, Eigen::aligned_allocator<Eigen::Matrix4f> > & transformations,
171 radius_normals_ = radius_normals;
191 getCentroidClusters (std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> > & centroids)
214 cluster_tolerance_ = d;
223 eps_angle_threshold_ = d;
250 normalize_bins_ = normalize;
277 refine_clusters_ = rc;
284 getTransforms (std::vector<Eigen::Matrix4f, Eigen::aligned_allocator<Eigen::Matrix4f> > & trans)
296 valid = valid_transforms_;
327 float vpx_, vpy_, vpz_;
335 bool normalize_bins_;
338 float curv_threshold_;
341 float cluster_tolerance_;
344 float eps_angle_threshold_;
349 std::size_t min_points_;
352 float radius_normals_;
355 float refine_clusters_;
357 std::vector<Eigen::Matrix4f, Eigen::aligned_allocator<Eigen::Matrix4f> > transforms_;
358 std::vector<bool> valid_transforms_;
361 float min_axis_value_;
389 std::vector<pcl::PointIndices> &clusters,
double eps_angle,
unsigned int min_pts_per_cluster = 1,
390 unsigned int max_pts_per_cluster = (std::numeric_limits<int>::max) ());
404 #ifdef PCL_NO_PRECOMPILE
405 #include <pcl/features/impl/our_cvfh.hpp>
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...
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.
void getTransforms(std::vector< Eigen::Matrix4f, Eigen::aligned_allocator< Eigen::Matrix4f > > &trans)
Returns the transformations aligning the point cloud to the corresponding SGURF.
typename pcl::search::Search< PointNormal >::Ptr KdTreePtr
void filterNormalsWithHighCurvature(const pcl::PointCloud< PointNT > &cloud, pcl::Indices &indices_to_use, pcl::Indices &indices_out, pcl::Indices &indices_in, float threshold)
Removes normals with high curvature caused by real edges or noisy data.
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.
IndicesAllocator<> Indices
Type used for indices in PCL.
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.
shared_ptr< OURCVFHEstimation< PointInT, PointNT, PointOutT > > Ptr
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< const OURCVFHEstimation< PointInT, PointNT, PointOutT > > ConstPtr
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
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.
void setCurvatureThreshold(float d)
Sets curvature threshold for removing normals.
Feature represents the base feature class.