38 #ifndef PCL_FILTERS_IMPL_PROJECT_INLIERS_H_
39 #define PCL_FILTERS_IMPL_PROJECT_INLIERS_H_
41 #include <pcl/filters/project_inliers.h>
44 template <
typename Po
intT>
void
47 if (indices_->empty ())
49 PCL_WARN (
"[pcl::%s::applyFilter] No indices given or empty indices!\n", getClassName ().c_str ());
57 Eigen::VectorXf model_coefficients (model_->values.size ());
58 for (
size_t i = 0; i < model_->values.size (); ++i)
59 model_coefficients[i] = model_->values[i];
62 if (!initSACModel (model_type_))
64 PCL_ERROR (
"[pcl::%s::segment] Error initializing the SAC model!\n", getClassName ().c_str ());
70 sacmodel_->projectPoints (*indices_, model_coefficients, output,
true);
72 sacmodel_->projectPoints (*indices_, model_coefficients, output,
false);
76 template <
typename Po
intT>
bool
91 sacmodel_.reset (
new SampleConsensusModelLine<PointT> (input_));
97 sacmodel_.reset (
new SampleConsensusModelCircle2D<PointT> (input_));
103 sacmodel_.reset (
new SampleConsensusModelSphere<PointT> (input_));
109 sacmodel_.reset (
new SampleConsensusModelParallelLine<PointT> (input_));
115 sacmodel_.reset (
new SampleConsensusModelPerpendicularPlane<PointT> (input_));
121 sacmodel_.reset (
new SampleConsensusModelCylinder<PointT, pcl::Normal> (input_));
127 sacmodel_.reset (
new SampleConsensusModelNormalPlane<PointT, pcl::Normal> (input_));
133 sacmodel_.reset (
new SampleConsensusModelCone<PointT, pcl::Normal> (input_));
139 sacmodel_.reset (
new SampleConsensusModelNormalSphere<PointT, pcl::Normal> (input_));
145 sacmodel_.reset (
new SampleConsensusModelNormalParallelPlane<PointT, pcl::Normal> (input_));
151 sacmodel_.reset (
new SampleConsensusModelParallelPlane<PointT> (input_));
156 PCL_ERROR (
"[pcl::%s::initSACModel] No valid model given!\n", getClassName ().c_str ());
163 #define PCL_INSTANTIATE_ProjectInliers(T) template class PCL_EXPORTS pcl::ProjectInliers<T>;
165 #endif // PCL_FILTERS_IMPL_PROJECT_INLIERS_H_
void applyFilter(PointCloud &output)
Project point indices into a separate PointCloud.
uint32_t width
The point cloud width (if organized as an image-structure).
SampleConsensusModelPlane defines a model for 3D plane segmentation.
uint32_t height
The point cloud height (if organized as an image-structure).
std::vector< PointT, Eigen::aligned_allocator< PointT > > points
The point data.
ProjectInliers uses a model and a set of inlier indices from a PointCloud to project them into a sepa...