Guest User

Untitled

a guest
Jun 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. import numpy as np
  2.  
  3. def procrustes_distance(reference_shape, shape):
  4.  
  5. ref_x = reference_shape[::2]
  6. ref_y = reference_shape[1::2]
  7.  
  8. x = shape[::2]
  9. y = shape[1::2]
  10.  
  11. dist = np.sum(np.sqrt((ref_x - x)**2 + (ref_y - y)**2))
  12.  
  13. return dist
Add Comment
Please, Sign In to add comment