Computes the distance transform of the binary image bw. The result d is a matrix of the same size as bw, where each value is the shortest distance to a non-zero pixel in bw.
method changes the used distance function. Currently the Euclidian distance is the only supported distance function.