distance_two_indices¶
-
menpofit.error.
distance_two_indices
(index1, index2, shape)[source]¶ Computes the Euclidean distance between two points of a shape, i.e.
\[\sqrt{(s_{i,x}-s_{j,x})^2 + (s_{i,y}-s_{j,y})^2}\]where \(s_{i,x}\), \(s_{i,y}\) are the x and y coordinates of the \(i\)’th point (index1) and \(s_{j,x}\), \(s_{j,y}\) are the x and y coordinates of the \(j\)’th point (index2).
- Parameters
index1 (int) – The index of the first point.
index2 (int) – The index of the second point.
shape (menpo.shape.PointCloud) – The input shape.
- Returns
distance_two_indices (float) – The Euclidean distance between the points.