1from __future__ import print_function
2
3import pylab as p
4import numpy as np
5import mahotas
6
7f = np.ones((256,256), bool)
8f[200:,240:] = False
9f[128:144,32:48] = False
10# f is basically True with the exception of two islands: one in the lower-right
11# corner, another, middle-left
12
13dmap = mahotas.distance(f)
14p.imshow(dmap)
15p.show()
16