40 #ifndef PCL_CRF_SEGMENTATION_H_ 41 #define PCL_CRF_SEGMENTATION_H_ 43 #include <pcl/point_cloud.h> 46 #include <pcl/ml/densecrf.h> 47 #include <pcl/filters/voxel_grid.h> 48 #include <pcl/filters/voxel_grid_label.h> 57 template <
typename Po
intT>
92 setVoxelGridLeafSize (
const float x,
const float y,
const float z);
107 createDataVectorFromVoxelGrid ();
111 createUnaryPotentials (std::vector<float> &unary,
112 std::vector<int> &colors,
113 unsigned int n_labels);
123 setSmoothnessKernelParameters (
const float sx,
const float sy,
const float sz,
const float w);
135 setAppearanceKernelParameters (
float sx,
float sy,
float sz,
136 float sr,
float sg,
float sb,
141 setSurfaceKernelParameters (
float sx,
float sy,
float sz,
142 float snx,
float sny,
float snz,
172 std::vector<Eigen::Vector3i, Eigen::aligned_allocator<Eigen::Vector3i> >
data_;
174 std::vector<Eigen::Vector3i, Eigen::aligned_allocator<Eigen::Vector3i> >
color_;
176 std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> >
normal_;
184 float smoothness_kernel_param_[4];
195 float appearance_kernel_param_[7];
197 float surface_kernel_param_[7];
210 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
214 #ifdef PCL_NO_PRECOMPILE 215 #include <pcl/segmentation/impl/crf_segmentation.hpp>
pcl::PointCloud< PointT >::Ptr input_cloud_
input cloud that will be segmented.
pcl::VoxelGrid< PointT > voxel_grid_
Voxel grid to discretize the scene.
VoxelGrid assembles a local 3D grid over a given PointCloud, and downsamples + filters the data.
std::vector< Eigen::Vector3i, Eigen::aligned_allocator< Eigen::Vector3i > > color_
Eigen::Vector4f voxel_grid_leaf_size_
indices of the filtered cloud.
pcl::PointCloud< PointT >::Ptr filtered_cloud_
voxel grid filtered cloud.
boost::shared_ptr< PointCloud< PointT > > Ptr
std::vector< Eigen::Vector3i, Eigen::aligned_allocator< Eigen::Vector3i > > data_
voxel grid data points packing order [x0y0z0, x1y0z0,x2y0z0,...,x0y1z0,x1y1z0,...,...
unsigned int n_iterations_
Defines all the PCL implemented PointT point type structures.
Eigen::Vector3i dim_
Voxel grid dimensions.
pcl::PointCloud< pcl::PointNormal >::Ptr normal_cloud_
std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f > > normal_
pcl::PointCloud< pcl::PointNormal >::Ptr filtered_normal_
pcl::PointCloud< pcl::PointXYZRGBL >::Ptr anno_cloud_
void setNumberOfIterations(unsigned int n_iterations=10)
pcl::PointCloud< pcl::PointXYZRGBL >::Ptr filtered_anno_