5 #include "solution/filters.h"
6 #include "solution/segmentation.h"
7 #include "solution/feature_estimation.h"
8 #include "solution/registration.h"
10 #include <pcl/io/pcd_io.h>
11 #include <pcl/kdtree/kdtree_flann.h>
86 SurfaceNormalsPtr normals;
102 std::vector<pcl::PointIndices> cluster_indices;
106 PointCloudPtr largest_cluster (
new PointCloud);
109 return (largest_cluster);
115 SurfaceNormalsPtr & normals_out, PointCloudPtr & keypoints_out,
116 LocalDescriptorsPtr & local_descriptors_out, GlobalDescriptorsPtr & global_descriptor_out)
const
123 local_descriptors_out = computeLocalDescriptors (points, normals_out, keypoints_out,
126 global_descriptor_out = computeGlobalDescriptor (points, normals_out);
134 Eigen::Matrix4f tform;
141 tform = refineAlignment (source.
points, target.
points, tform,
152 std::vector<ObjectModel>
models_;
pcl::KdTreeFLANN< GlobalDescriptorT >::Ptr kdtree_
PointCloudPtr applyFiltersAndSegment(const PointCloudPtr &input, const ObjectRecognitionParameters ¶ms) const
std::vector< ObjectModel > models_
const ObjectModel & recognizeObject(const PointCloudPtr &)
GlobalDescriptorsPtr descriptors_
ObjectRecognition(const ObjectRecognitionParameters ¶ms)
PointCloudPtr recognizeAndAlignPoints(const PointCloudPtr &)
ObjectRecognitionParameters params_
PointCloudPtr alignModelPoints(const ObjectModel &source, const ObjectModel &target, const ObjectRecognitionParameters ¶ms) const
void populateDatabase(const std::vector< std::string > &)
void constructObjectModel(const PointCloudPtr &points, ObjectModel &output) const
void estimateFeatures(const PointCloudPtr &points, const ObjectRecognitionParameters ¶ms, SurfaceNormalsPtr &normals_out, PointCloudPtr &keypoints_out, LocalDescriptorsPtr &local_descriptors_out, GlobalDescriptorsPtr &global_descriptor_out) const
shared_ptr< KdTreeFLANN< PointT, Dist > > Ptr
PointCloud represents the base class in PCL for storing collections of 3D points.
void transformPointCloud(const pcl::PointCloud< PointT > &cloud_in, pcl::PointCloud< PointT > &cloud_out, const Eigen::Matrix< Scalar, 4, 4 > &transform, bool copy_all_fields)
Apply a rigid transform defined by a 4x4 matrix.
void copyPointCloud(const pcl::PointCloud< PointInT > &cloud_in, pcl::PointCloud< PointOutT > &cloud_out)
Copy all the fields from a given point cloud into a new point cloud.
GlobalDescriptorsPtr global_descriptor
LocalDescriptorsPtr local_descriptors
float outlier_rejection_radius
int max_ransac_iterations
float downsample_leaf_size
float initial_alignment_min_sample_distance
int outlier_rejection_min_neighbors
float icp_max_correspondence_distance
float icp_transformation_epsilon
float initial_alignment_max_correspondence_distance
float plane_inlier_distance_threshold
float keypoints_nr_scales_per_octave
float local_descriptor_radius
float icp_outlier_rejection_threshold
float keypoints_min_contrast
int initial_alignment_nr_iterations
float surface_normal_radius
float keypoints_nr_octaves
float keypoints_min_scale