mymesh.register.jaccard#

mymesh.register.jaccard(u, v)[source]#

Jaccard index for measuring the similarity between two binary images or arrays

Parameters:
  • u (np.ndarray(dtype=bool)) – Array of binary data (can be any shape)

  • v (np.ndarray(dtype=bool)) – Array of binary data (can be any shape)

Returns:

J – Jaccard index in the range [0, 1]. 1 = identical, 0 = no overlap.

Return type:

float