-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
Description
Context
The poisson surface reconstruction algorithm needs a new unit test. The currently existing test is not very robust and has been made using some unknown empirical readings.
Current Test:
pcl/test/surface/test_poisson.cpp
Lines 67 to 90 in 665a58c
Poisson<PointNormal> poisson; | |
poisson.setInputCloud (cloud_with_normals); | |
PolygonMesh mesh; | |
poisson.reconstruct (mesh); | |
// io::saveVTKFile ("bunny_poisson.vtk", mesh); | |
ASSERT_EQ (mesh.polygons.size (), 1051); | |
// All polygons should be triangles | |
for (std::size_t i = 0; i < mesh.polygons.size (); ++i) | |
EXPECT_EQ (mesh.polygons[i].vertices.size (), 3); | |
EXPECT_EQ (mesh.polygons[10].vertices[0], 121); | |
EXPECT_EQ (mesh.polygons[10].vertices[1], 120); | |
EXPECT_EQ (mesh.polygons[10].vertices[2], 23); | |
EXPECT_EQ (mesh.polygons[200].vertices[0], 130); | |
EXPECT_EQ (mesh.polygons[200].vertices[1], 119); | |
EXPECT_EQ (mesh.polygons[200].vertices[2], 131); | |
EXPECT_EQ (mesh.polygons[1000].vertices[0], 521); | |
EXPECT_EQ (mesh.polygons[1000].vertices[1], 516); | |
EXPECT_EQ (mesh.polygons[1000].vertices[2], 517); |
Expected behavior
A new robust test is needed, which is deterministic and is hopefully not based on empirical readings.
jasjuang