Skip to content

[test] Unit test design for poisson surface reconstruction  #4005

@shrijitsingh99

Description

@shrijitsingh99

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions