| [mmopen] [Up] [mmgdist] | Image Transforms |
| User Feedback |
| f | Image Binary image |
| Bc | Structuring Element
(connectivity) Default: |
| METRIC | String
'EUCLIDEAN', or 'EUC2' for squared Euclidean. Default: |
| y | Image
distance image in uint16, or in int32 datatype with EUC2 option. |
mmdist creates the distance image y of the binary image f. The value of y at the pixel x is the distance of x to the complement of f, that is, the distance of x to nearest point in the complement of f. The distances available are based on the Euclidean metrics and on metrics generated by a a regular graph, that is characterized by a connectivity rule defined by the structuring element Bc. The implementation of the Euclidean algorithm is based on [LZ01].
a = mmframe(mmbinary(ones((5,9))),2,4)
Warning: downcasting image from double to int32 (may lose precision)
f4=mmdist(a)
f8=mmdist(a,mmsebox())
fe=mmdist(a,mmsebox(),'EUCLIDEAN')




To generate useful Distance transforms, the structuring elements must be symmetric and have the origin included. The Euclidean distance transform is rounded to the nearest integer, since it is represented as an unsigned integer image. Use the option EUC2 to compute exact squared Euclidean distance transform.
| mmfreedom | Control automatic data type conversion. |
| mmdtshow | Display a distance transform image with an iso-line color table. |
| mmero | Erode an image by a structuring element. |
| mmgdist | Geodesic Distance Transform. |
| mmsebox | Create a box structuring element. |
| mmsecross | Diamond structuring element and elementary 3x3 cross. |
| [mmopen] [Up] [mmgdist] | |
| User Feedback | |
| Copyright (c) 1998-2008 by SDC Information Systems |