保留一下这道程序
// Color_based_region_growth_segmentation.cpp : 定义控制台应用程序的入口点。
//
// Color - based region growth segmentation.cpp : 定义控制台应用程序的入口点。
//
#include <iostream>
#include <vector>
#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <pcl/search/search.h>
#include <pcl/search/kdtree.h>
#include <pcl/visualization/cloud_viewer.h>
#include <pcl/filters/passthrough.h>
#include <pcl/segmentation/region_growing_rgb.h>
#include <pcl/console/print.h>
#include <pcl/console/parse.h>
#include <pcl/console/time.h>
#include <pcl/features/normal_3d.h>
using namespace pcl::console;
int main(int argc, char** argv)
{
if (argc<2)
{
std::cout << ".exe xx.pcd -b_n 0 -kn 50 -st_n 30 -ct_n 0.05 -bc 0 -fc 10 -nc 0 -dt 10 -ct 6 -rt 5 -mt 600" << endl;
return 0;
}
time_t start, end, diff[5], option;
start = time(0);
bool Bool_Cuting = false, b_n = false;
int MinClusterSize = 600, KN_normal = 50;
float far_cuting = 10, near_cuting = 0, DistanceThreshold = 10.0, ColorThreshold = 6, RegionColorThreshold = 5, SmoothnessThreshold = 30.0, CurvatureThreshold = 0.05