--
You received this message because you are subscribed to the Google Groups "scikit-image" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "scikit-image" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scikit-image/wM-zMGL9dVI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scikit-image...@googlegroups.com.
def floyd_warshall(x,y):
dist = np.sqrt((x[:,np.newaxis]-x[np.newaxis,:])**2 + (y[:,np.newaxis]-y[np.newaxis,:])**2)
d = np.array(dist)
d[dist>1.5] = np.inf # sqrt(2) < 1.5 < 2
n = len(x)
for k in xrange(n):
kd = d[:,k,np.newaxis] + d[k,:]
d = np.minimum(d,kd)
return d
skel = np.argwhere(skel)
x, y = skel[:,0], skel[:,1]
d = np.max(floyd_warshall(x,y))
--
You received this message because you are subscribed to the Google Groups "scikit-image" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "scikit-image" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image...@googlegroups.com.