PCL Statistical Outlier Removal: Removing Noise from Point Clouds
int main (int argc, char** argv) { srand(time(0)); pcl::PointCloudpcl::PointXYZ::Ptr cloud (new pcl::PointCloudpcl::PointXYZ); pcl::PointCloudpcl::PointXYZ::Ptr cloud_filtered (new pcl::PointCloudpcl::PointXYZ);
// Read in the cloud data pcl::io::loadPCDFilepcl::PointXYZ ('input_cloud.pcd', *cloud);
// Create the filtering object pcl::StatisticalOutlierRemovalpcl::PointXYZ sor; sor.setInputCloud (cloud); sor.setMeanK (50); sor.setStddevMulThresh (1.0); sor.filter (*cloud_filtered);
// Write the filtered cloud to disk pcl::io::savePCDFilepcl::PointXYZ ('filtered_cloud.pcd', *cloud_filtered);
return 0; }
原文地址: https://www.cveoy.top/t/topic/nKSz 著作权归作者所有。请勿转载和采集!