PCL网格构造

时间:2019-10-29 08:48:03

标签: c++ 3d point-cloud-library

我正在处理Mesh结构,但是我想使其更简单,是否有任何方法可以使它更简单?我的意思是使三角形变小。

Normals of box

Mesh of box

这是我的代码:

// Initialize objects
pcl::GreedyProjectionTriangulation<pcl::PointNormal> gp3;
pcl::PolygonMesh triangles;

cout << "Set GreedyProjection Parameters....";
//Set the maximum distance between connected points (maximum edge length)
gp3.setSearchRadius(5);//1.5f

 //Set typical values for the parameters
gp3.setMu(2.5);//3 4 lbh baik 5.5f


gp3.setMaximumSurfaceAngle(M_PI / 4); // 45 degrees 4
gp3.setMinimumAngle(M_PI / 18); // 10 degrees
gp3.setMaximumAngle(2 * M_PI / 3); // 120 degrees
gp3.setNormalConsistency(false);
cout << "[Done]" << endl;

cout << "Reconstruct GP PolygonMesh.....";
//Get result
gp3.setInputCloud(cloud_with_normals);
gp3.setSearchMethod(tree2);
gp3.reconstruct(triangles);

谢谢你的帮助!

0 个答案:

没有答案