PointCloudLibrary / pcl

Point Cloud Library (PCL)
https://pointclouds.org/
Other
9.81k stars 4.6k forks source link

SupervoxelClustering: Improvement of Supervoxels point cloud data format processing #2949

Open chaozige opened 5 years ago

chaozige commented 5 years ago

Your Environment

Context

https://github.com/PointCloudLibrary/pcl/blob/89ce7c60718ace9489d153e8b23f450fde121110/segmentation/include/pcl/segmentation/supervoxel_clustering.h#L328-L336

Expected Behavior

Add or change a static helper function

Current Behavior

https://github.com/PointCloudLibrary/pcl/blob/89ce7c60718ace9489d153e8b23f450fde121110/examples/segmentation/example_supervoxels.cpp#L317-L319

In order to facilitate the processing of the above three point cloud data, the association is generated by the following three point clouds with labels.

PointLCloudT::Ptr refined_labeled_voxel_cloud PointLNCloudT::Ptr refined_sv_l_normal_cloud PointLCloudT::Ptr refined_full_labeled_cloud

Possible Solution

A ideas how to implement the addition or change

https://github.com/PointCloudLibrary/pcl/blob/89ce7c60718ace9489d153e8b23f450fde121110/segmentation/include/pcl/segmentation/supervoxel_clustering.h#L328-L336

Add the following function declaration at the end of the above

static pcl::PointCloud::Ptr makeSupervoxelXYZLNormalCloud(std::map<uint32_t, typename Supervoxel::Ptr> &supervoxel_clusters);

https://github.com/PointCloudLibrary/pcl/blob/89ce7c60718ace9489d153e8b23f450fde121110/segmentation/include/pcl/segmentation/impl/supervoxel_clustering.hpp#L609-L623

Add the following function definition at the end of the above

template pcl::PointCloud::Ptr pcl::SupervoxelClustering::makeSupervoxelXYZLNormalCloud(std::map<uint32_t, typename Supervoxel::Ptr > &supervoxel_clusters) {


}

https://github.com/PointCloudLibrary/pcl/blob/89ce7c60718ace9489d153e8b23f450fde121110/examples/segmentation/example_supervoxels.cpp#L20-L29

Add the following types at the end of the above

typedef pcl::PointXYZLNormal PointLNT; typedef pcl::PointCloud PointLNCloudT;

https://github.com/PointCloudLibrary/pcl/blob/89ce7c60718ace9489d153e8b23f450fde121110/examples/segmentation/example_supervoxels.cpp#L317-L320

Add the following to generate a labeled normal point cloud at the end of the above

PointLNCloudT::Ptr refined_sv_l_normal_cloud = pcl::SupervoxelClustering::makeSupervoxelXYZLNormalCloud(refined_supervoxel_clusters);

There may be some other additions or changes, such as the following

https://github.com/PointCloudLibrary/pcl/blob/89ce7c60718ace9489d153e8b23f450fde121110/segmentation/include/pcl/segmentation/supervoxel_clustering.h#L89-L100

Thanks!

stale[bot] commented 4 years ago

Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.