Main Features¶
- features
- Compute global and local features (several submodules, include SURF and Haralick features)
- convolve
- Convolution and wavelets
- morph
- Morphological features. Most are available at the mahotas level, include erode(), dilate()...
- watershed
- Seeded watershed implementation
- imread/imsave
- read/write image
Citation:
Coelho, Luis Pedro, 2013. Mahotas: Open source software for scriptable computer vision. Journal of Open Research Software, 1:e3, DOI: http://dx.doi.org/10.5334/jors.ac
- mahotas.distance(bw, metric='euclidean2')
Computes the distance transform of image bw:
dmap[i,j] = min_{i', j'} { (i-i')**2 + (j-j')**2 | !bw[i', j'] }
That is, at each point, compute the distance to the background.
If there is no background, then a very high value will be returned in all pixels (this is a sort of infinity).
Parameters : bw : 2d-ndarray
If boolean, False will denote the background and True the foreground. If not boolean, this will be interpreted as bw != 0 (this way you can use labeled images without any problems).
metric : str, optional
one of ‘euclidean2’ (default) or ‘euclidean’
Returns : dmap : ndarray
distance map