PointCloudLibrary / PointCloudLibrary/pcl
GreedyProjectionTriangulation
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
Describe the bug
I use GreedyProjectionTriangulation to create trainglular mesh from a point cloud. However, there are many triangles' normal direction are in opposite direction compared to the others. I have try to change input parameters but it always has the same issue.
Context
try to reconstruct surface from a scanning point cloud.
Expected behavior
All traingles' normal direction should be consistent in reconstructed mesh.
Current Behavior
Many triangles' normal direction are in opposite direction compared to the others.
What happens instead of the expected behavior?
To Reproduce
- load surf_moving.pcd in attached zip file.
- The point cloud is point normal cloud.
- use the code snippets for GreedyProjectionTriangulation
- The result is shown as surf_moving.ply
Screenshots/Code snippets
- screenshots of the GUI issues

- code snippets:
pcl::GreedyProjectionTriangulation<pcl::PointNormal> gp3;
pcl::PolygonMesh mesh;
gp3.setMu(2.5);
gp3.setMaximumNearestNeighbors(100);
gp3.setMaximumSurfaceAngle(M_PI / 4); // 45 degrees
gp3.setMinimumAngle(M_PI / 18); // 10 degrees
gp3.setMaximumAngle(2 * M_PI / 3); // 120 degrees
gp3.setNormalConsistency(false);
gp3.setInputCloud(cloud_normals);
gp3.setSearchMethod(tree);
gp3.reconstruct(mesh);
Your Environment (please complete the following information):
- OS: Windows 10
- Compiler: Visual Studio 2017 C++
- PCL Version 1.9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the GreedyProjectionTriangulation usage shown in the issue and reproduce it with surf_moving.pcd from the attached data.zip, using the provided code and PCL 1.9 environment. Compare the generated surf_moving.ply with the input point normals and investigate why triangle directions differ; done means the reconstructed mesh has consistent triangle normal directions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100