Hello,

I want to use hausdorff distance to evaluate the quality of my segmentation algorithm and so I try examples from skimage and scipy but weirdly they give me differents results …

**Does someone know why ? Which one should I use ?**

```
import numpy as np
# create data
shape = (60, 60)
image = np.zeros(shape)
x_diamond, y_diamond = 30, 30
r = 10
plt_x = [0, 1, 0, -1]
plt_y = [1, 0, -1, 0]
set_ax = [(x_diamond + r * x) for x in plt_x]
set_ay = [(y_diamond + r * y) for y in plt_y]
x_kite, y_kite = 30, 30
x_r, y_r = 15, 20
set_bx = [(x_kite + x_r * x) for x in plt_x]
set_by = [(y_kite + y_r * y) for y in plt_y]
# ====== SKIMAGE =========
from skimage import metrics
coords_a = np.zeros(shape, dtype=bool)
coords_b = np.zeros(shape, dtype=bool)
for x, y in zip(set_ax, set_ay):
coords_a[(x, y)] = True
for x, y in zip(set_bx, set_by):
coords_b[(x, y)] = True
metrics.hausdorff_distance(coords_a, coords_b)
# >>> return 10
# ====== SCIPY =========
from scipy.spatial.distance import directed_hausdorff
set_a = np.array((set_ax, set_ay))
set_b = np.array((set_bx, set_by))
directed_hausdorff(set_a, set_b)
# >>> return 14.142135623730951
```