root_mean_square_distance_indexed_normalised_error¶
-
menpofit.error.
root_mean_square_distance_indexed_normalised_error
(shape, gt_shape, index1, index2)[source]¶ Computes the root mean square error between two shapes normalised by the distance measure between two points of the ground truth shape, i.e.
\[\frac{\mathcal{F}(s,s^*)}{\mathcal{N}(s^*)}\]where
\[\mathcal{F}(s,s^*) = \sqrt{\frac{1}{N}\sum_{i=1}^N(s_i-s^*_i)^2}\]where \(s\) and \(s^*\) are the final and ground truth shapes, respectively. \(s_i\) and \(s^*_i\) are the coordinates of the \(i\)’th point of the final and ground truth shapes, and \(N\) is the total number of points. Finally, \(\mathcal{N}(s^*)\) is a normalising function that returns the distance between two points of the ground truth shape.
- Parameters
shape (menpo.shape.PointCloud) – The input shape (e.g. the final shape of a fitting procedure).
gt_shape (menpo.shape.PointCloud) – The ground truth shape.
index1 (int) – The index of the first point.
index2 (int) – The index of the second point.
- Returns
error (float) – The computed root mean square normalised error.