[Numpy-discussion] Adjacent matrix

Luis Pedro Coelho lpc@cmu....
Tue Jun 14 06:06:02 CDT 2011

On Monday, June 13, 2011 03:55:46 PM Thiago Franco Moraes wrote:
> "Find all of the grid points in that lie adjacent to one or more grid
> points of opposite values."
> This is the code used to calculate that matrix:
> Where nx, ny and nz are the x, y, z dimensions from the "im" input
> binary matrix. I think this operation is called bwperim.

My package, mahotas, supports it directly:

mahotas.bwperim(bw, n)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110614/5982d06a/attachment-0001.bin 

More information about the NumPy-Discussion mailing list