MCPcopy Create free account
hub / github.com/Image-Py/imagepy / mid_axis

Function mid_axis

imagepy/ipyalg/graph/skel2d.py:51–56  ·  view source on GitHub ↗
(img)

Source from the content-addressed store, hash-verified

49 return 0;
50
51def mid_axis(img):
52 dis = ndimg.distance_transform_edt(img)
53 dis[[0,-1],:] = 0; dis[:,[0,-1]] = 0
54 idx = np.argsort(dis.flat).astype(np.int32)
55 medial_axis(dis, idx, lut)
56 return dis
57
58if __name__ == '__main__':
59 from time import time

Callers 1

skel2d.pyFile · 0.85

Calls 1

medial_axisFunction · 0.85

Tested by

no test coverage detected