42 #ifndef PCL_PPF_REGISTRATION_H_ 43 #define PCL_PPF_REGISTRATION_H_ 45 #include <pcl/registration/boost.h> 46 #include <pcl/registration/registration.h> 47 #include <pcl/features/ppf.h> 59 struct HashKeyStruct :
public std::pair <int, std::pair <int, std::pair <int, int> > >
64 this->second.first = b;
65 this->second.second.first = c;
66 this->second.second.second = d;
71 typedef boost::shared_ptr<PPFHashMapSearch>
Ptr;
78 PPFHashMapSearch (
float angle_discretization_step = 12.0f / 180.0f * static_cast<float> (M_PI),
79 float distance_discretization_step = 0.01f)
82 , internals_initialized_ (false)
83 , angle_discretization_step_ (angle_discretization_step)
84 , distance_discretization_step_ (distance_discretization_step)
104 nearestNeighborSearch (
float &f1,
float &f2,
float &f3,
float &f4,
105 std::vector<std::pair<size_t, size_t> > &indices);
126 bool internals_initialized_;
128 float angle_discretization_step_, distance_discretization_step_;
143 template <
typename Po
intSource,
typename Po
intTarget>
184 scene_reference_point_sampling_rate_ (5),
185 clustering_position_diff_threshold_ (0.01f),
186 clustering_rotation_diff_threshold_ (20.0f / 180.0f * static_cast<float> (M_PI))
247 computeTransformation (
PointCloudSource &output,
const Eigen::Matrix4f& guess);
254 unsigned int scene_reference_point_sampling_rate_;
258 float clustering_position_diff_threshold_, clustering_rotation_diff_threshold_;
266 poseWithVotesCompareFunction (
const PoseWithVotes &a,
267 const PoseWithVotes &b);
272 clusterVotesCompareFunction (
const std::pair<size_t, unsigned int> &a,
273 const std::pair<size_t, unsigned int> &b);
284 posesWithinErrorBounds (Eigen::Affine3f &pose1,
285 Eigen::Affine3f &pose2);
289 #include <pcl/registration/impl/ppf_registration.hpp> 291 #endif // PCL_PPF_REGISTRATION_H_ PointCloudTarget::ConstPtr PointCloudTargetConstPtr
PoseWithVotes(Eigen::Affine3f &a_pose, unsigned int &a_votes)
Ptr makeShared()
Convenience method for returning a copy of the class instance as a boost::shared_ptr.
This file defines compatibility wrappers for low level I/O functions.
float getModelDiameter()
Returns the maximum distance found between any feature pair in the given input feature cloud.
PPFHashMapSearch::Ptr getSearchMethod()
Getter function for the search method of the class.
void setRotationClusteringThreshold(float clustering_rotation_diff_threshold)
Method for setting the rotation clustering parameter.
void setSceneReferencePointSamplingRate(unsigned int scene_reference_point_sampling_rate)
Method for setting the scene reference point sampling rate.
std::vector< std::vector< float > > alpha_m_
boost::shared_ptr< KdTreeFLANN< PointT, Dist > > Ptr
PointCloudTarget::Ptr PointCloudTargetPtr
boost::unordered_multimap< HashKeyStruct, std::pair< size_t, size_t > > FeatureHashMapType
void setPositionClusteringThreshold(float clustering_position_diff_threshold)
Method for setting the position difference clustering parameter.
pcl::PointCloud< PointTarget > PointCloudTarget
boost::shared_ptr< PointCloud< PointSource > > Ptr
boost::shared_ptr< PPFHashMapSearch > Ptr
void setSearchMethod(PPFHashMapSearch::Ptr search_method)
Function that sets the search method for the algorithm.
float getAngleDiscretizationStep()
Returns the angle discretization step parameter (the step value between each bin of the hash map for ...
void setInputTarget(const PointCloudTargetConstPtr &cloud)
Provide a pointer to the input target (e.g., the point cloud that we want to align the input source t...
float getRotationClusteringThreshold()
Returns the parameter defining the rotation clustering threshold.
PPFHashMapSearch(float angle_discretization_step=12.0f/180.0f *static_cast< float >(M_PI), float distance_discretization_step=0.01f)
Constructor for the PPFHashMapSearch class which sets the two step parameters for the enclosed data s...
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
PointCloudSource::ConstPtr PointCloudSourceConstPtr
Registration represents the base registration class for general purpose, ICP-like methods.
boost::shared_ptr< FeatureHashMapType > FeatureHashMapTypePtr
unsigned int getSceneReferencePointSamplingRate()
Returns the parameter for the scene reference point sampling rate of the algorithm.
float getPositionClusteringThreshold()
Returns the parameter defining the position difference clustering parameter - distance threshold belo...
Structure for storing a pose (represented as an Eigen::Affine3f) and an integer for counting votes.
std::vector< PoseWithVotes, Eigen::aligned_allocator< PoseWithVotes > > PoseWithVotesList
float getDistanceDiscretizationStep()
Returns the distance discretization step parameter (the step value between each bin of the hash map f...
Class that registers two point clouds based on their sets of PPFSignatures.
PPFRegistration()
Empty constructor that initializes all the parameters of the algorithm with default values.
PointCloudSource::Ptr PointCloudSourcePtr
HashKeyStruct(int a, int b, int c, int d)
Data structure to hold the information for the key in the feature hash map of the PPFHashMapSearch cl...
pcl::PointCloud< PointSource > PointCloudSource