Create Study of the V HACD algorithm/Quality Measurement authored by Cristina Cocho's avatar Cristina Cocho
When comparing the results of all the tests done of V-HACD decomposition algorithm, we found out that we needed a criteria that allowed us to quantify the quality of the results obtained.
We can think that the best decomposition is the one whose decomposed model is the closest to the original one. This distance relationship between two meshes (the mesh of the original model and the mesh of the all the decomposed parts merged) can be obtained calculating the Hausdorff distance (https://en.wikipedia.org/wiki/Hausdorff_distance).
In general terms, the Hausdorff Distance is the maximum distance of a set to the nearest point in the other set. As we have two sets (two meshes) the Hausdorff distance is the maximum of the two distances (A to B and B to A). These two distances are not symmetric (quite often we say that the Hausdorff distance is oriented) so both of them need to be calculated.
Meshlab provides a Hausdorff distance calculation (a filter) so we decided to use it to calculate our quality parameter. For simplicity we used the python library Pymeshlab to automatize the quality calculation.