Open dwoll opened 2 years ago
Hi, I am not sure what seems to be the issue. You can obtain the max/mean/RMS Haussdorfdistance both ways like (just switch ForwardSampling to BackwardSampling to get the reverse values):
samp$ForwardSampling$maxdist
samp$ForwardSampling$meandist
samp$ForwardSampling$RMSdist
Right, these are the classical HD metrics. Some people argue that the 95% HD is also relevant. It is basically the HD for the best-matching part of the structures ("Partial HD" called by Huttenlocher 1993: https://people.eecs.berkeley.edu/~malik/cs294/Huttenlocher93.pdf), ignoring 5% of the vertices with the longest distance. My C++ is weak, but calculating it in Rvcg
should be doable. If the SamplingFlags::HIST
is set, alls dist
s are stored:
The 95% HD would be the 0.95 quantile of the stored dist
s, and could be returned by a public interface like mean_dist
.
Many thanks in advance!
Hi,
the dists are included and you can compute the 95%-Quantile as
quantile(samp$distances1,probs=.95)
This only applies for cases without sampling. When doing edge/face sampling, the function does not store the dists but only tracks cumulatively. E.g. for computing mean_dist, all values are summed up and it divided by the number of samples afterwards (same for RMS). See here: https://github.com/zarquon42b/Rvcg/blob/24682559bf0ee192def5fab08d2420922354643c/src/metroSampling.h#L251-L255
Again, thanks for developing
Rvcg
! WhilevcgMetro()
provides relevant distance-based similarity metrics, I think that the 95% Hausdorff distance is currently not returned. As this metric is increasingly used, would it be possible to return it as well in theForwardSampling
andBackwardSampling
components ofvcgMetro()
?Thanks in advance for considering!