A C++ Implementation of Mesh-to-Mesh Distance

In 3D vision, a common problem involves the comparison of meshes. In 3D reconstruction or surface reconstruction, triangular meshes are usually compared considering accuracy and completeness — the distance from the reconstruction to the reference and vice-versa. In this article, I want to present an efficient C++ tool for computing accuracy and completeness considering both references meshes as well as reference point clouds.

In 3D reconstruction, performance is frequently reported in terms of accuracy and completeness [1]. Accuracy is the distance of the reconstructed shape to the reference shape; and completeness is defined as the distance from the reference shape to the reconstructed shape. Usually, shapes are available in the form of triangular meshes; however, on real data, point clouds are also common. This article presents a C++ tool implementing both accuracy and completeness as illustrated in Figure 1 for evaluating 3D reconstruction and shape completion methods:

Mesh Evaluation on GitHub

Figure 1 (click to enlarge): Illustration of accuracy and completeness for evaluation of 3D reconstruction and shape completion.

In order to compute mesh-to-mesh or mesh-to-point distances, the tool uses the point-to-triangle distance from christopherbatty/SDFGen. Given, for example, two meshes — a reconstructed mesh and a reference mesh — a pre-defined number of points is sampled uniformly on both meshes. Accuracy is then computed as the average distance of points on the reconstructed mesh to the reference mesh; completeness is the average distance of points from the reference mesh to the reconstructed mesh. Alternatively, the reference can directly be specified as point cloud in which case only completeness is computed as the point cloud is assumed to be incomplete (in which case computing accuracy is not meaningful).

  • [1] Rasmus Ramsbøl Jensen, Anders Lindbjerg Dahl, George Vogiatzis, Engil Tola, Henrik Aanæs: Large Scale Multi-view Stereopsis Evaluation. CVPR 2014: 406-413.
What is your opinion on this article? Let me know your thoughts on Twitter @davidstutz92 or LinkedIn in/davidstutz92.