42 #include <pcl/pcl_base.h>
43 #include <pcl/correspondence.h>
44 #include <pcl/console/print.h>
53 template <
typename Po
intModelT,
typename Po
intSceneT>
118 inline std::vector<double>
129 cluster (std::vector<Correspondences> &clustered_corrs);
168 PCL_ERROR (
"[initCompute] Scene not set.\n");
174 PCL_ERROR (
"[initCompute] Input not set.\n");
178 if (!model_scene_corrs_)
180 PCL_ERROR (
"[initCompute] Model-Scene Correspondences not set.\n");
199 #include <pcl/recognition/impl/cg/correspondence_grouping.hpp>
shared_ptr< const Correspondences > CorrespondencesConstPtr
virtual void setSceneCloud(const SceneCloudConstPtr &scene)
Provide a pointer to the scene dataset.
shared_ptr< PointCloud< PointT > > Ptr
typename SceneCloud::Ptr SceneCloudPtr
typename SceneCloud::ConstPtr SceneCloudConstPtr
~CorrespondenceGrouping()
destructor.
virtual void clusterCorrespondences(std::vector< Correspondences > &clustered_corrs)=0
The actual clustering method, should be implemented by each subclass.
std::vector< double > getCharacteristicScales() const
Getter for the vector of characteristic scales associated to each cluster.
CorrespondenceGrouping()
Empty constructor.
virtual void setModelSceneCorrespondences(const CorrespondencesConstPtr &corrs)
Provide a pointer to the precomputed correspondences between points in the input dataset and points i...
CorrespondencesConstPtr model_scene_corrs_
The correspondences between points in the input and the scene datasets.
void cluster(std::vector< Correspondences > &clustered_corrs)
Clusters the input correspondences belonging to different model instances.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
bool deinitCompute()
This method should get called after finishing the actual computation.
Abstract base class for Correspondence Grouping algorithms.
std::vector< double > corr_group_scale_
characteristic scale associated to each correspondence subset; if the cg algorithm can not handle sca...
SceneCloudConstPtr scene_
The scene cloud.
shared_ptr< const PointCloud< PointT > > ConstPtr
bool initCompute()
This method should get called before starting the actual computation.
PointCloudConstPtr input_
The input point cloud dataset.
CorrespondencesConstPtr getModelSceneCorrespondences() const
Getter for the precomputed correspondences between points in the input dataset and points in the scen...
SceneCloudConstPtr getSceneCloud() const
Getter for the scene dataset.