| [mmcthin] [Up] [mmskiz] | Thinning And Thickening |
| User Feedback |
| f | Image Gray-scale (uint8 or uint16) image |
| g | Image Gray-scale (uint8 or uint16) or binary image
marker image: binary or labeled. |
| Bc | Structuring Element
(watershed connectivity) Default: |
| LINEREG | String
Output image: 'LINES' or 'REGIONS'. Default: |
| Y | Image Gray-scale (uint8 or uint16) or binary image |
mmcwatershed creates the image y by detecting the domain of the catchment basins of f indicated by the marker image g, according to the connectivity defined by Bc. According to the flag LINEREG y will be a labeled image of the catchment basins domain or just a binary image that presents the watershed lines. To know more about watershed and watershed from markers, see [BM93]. The implementation of this function is based on [LF00].
WARNING: There is a common mistake related to the marker image g. If this image contains only zeros and ones, but it is not a binary image, the result will be an image with all ones. If the marker image is binary, you have to set this explicitly using the logical function.
a = uint8([\
[10, 10, 10, 10, 10, 10, 10],\
[10, 9, 6, 18, 6, 5, 10],\
[10, 9, 6, 18, 6, 8, 10],\
[10, 9, 9, 15, 9, 9, 10],\
[10, 9, 9, 15, 12, 10, 10],\
[10, 10, 10, 10, 10, 10, 10]])
b = mmcmp(a,'==',uint8(6))
print mmcwatershed(a,b)
[[False False False True False False False] [False False False True False False False] [False False False True False False False] [False False False True False False False] [False False False True False False False] [False False False False True False False]]
print mmcwatershed(a,b,mmsecross(),'REGIONS')
[[1 1 1 1 2 2 2] [1 1 1 1 2 2 2] [1 1 1 1 2 2 2] [1 1 1 1 2 2 2] [1 1 1 1 2 2 2] [1 1 1 1 2 2 2]]




| mmfreedom | Control automatic data type conversion. |
| mmwatershed | Watershed detection. |
| mmsebox | Create a box structuring element. |
| mmsecross | Diamond structuring element and elementary 3x3 cross. |
| mmswatershed | Detection of similarity-based watershed from markers. |
| mmdcalc | Extract the keys of a calculator. |
| [mmcthin] [Up] [mmskiz] | |
| User Feedback | |
| Copyright (c) 1998-2008 by SDC Information Systems |