| [mmclohole] [Up] [mmasfrec] | Connected Operators |
| User Feedback |
| fin | Image Gray-scale (uint8 or uint16) image |
| T | Double
Criterion value. If T==-1, then the dynamics is determined, not the flooding at this criterion. This was selected just to use the same algoritm to compute two completely distinct functions. |
| option | String
criterion: 'AREA', 'VOLUME', 'H'. |
| Bc | Structuring Element
Connectivity. Default: |
| y | Image Gray-scale (uint8 or uint16) image |
This is a flooding algorithm. It is the basis to implement many topological functions. It is a connected filter that floods an image following some topological criteria: area, volume, depth. These filters are equivalent to area-close, volume-basin or h-basin, respectively. This code may be difficult to understand because of its many options. Basically, when t is negative, the generalized dynamics: area, volume, h is computed. When the flooding is computed, every time a new level in the flooding happens, a test is made to verify if the criterion has reached. This is used to set the value to that height. This value image will be used later for sup-reconstruction (flooding) at that particular level. This test happens in the raising of the water and in the merging of basins.
f=uint8([[0, 2, 3], [2, 2, 3], [2, 1, 4]])
print mmflood(f,-1,'h',mmsecross())
[[4 0 0] [0 0 0] [0 1 0]]
print mmflood(f,1,'h',mmsecross())
[[1 2 3] [2 2 3] [2 2 4]]
print mmflood(f,2,'h',mmsecross())
[[2 2 3] [2 2 3] [2 2 4]]
print mmflood(f,-1,'area',mmsecross())
[[9 0 0] [0 0 0] [0 1 0]]
print mmflood(f,1,'area',mmsecross())
[[0 2 3] [2 2 3] [2 1 4]]
print mmflood(f,2,'area',mmsecross())
[[2 2 3] [2 2 3] [2 2 4]]
print mmflood(f,-1,'volume',mmsecross())
[[17 0 0] [ 0 0 0] [ 0 1 0]]
print mmflood(f,1,'volume',mmsecross())
[[1 2 3] [2 2 3] [2 2 4]]
print mmflood(f,2,'volume',mmsecross())
[[2 2 3] [2 2 3] [2 2 4]]
| mmfreedom | Control automatic data type conversion. |
| mmsebox | Create a box structuring element. |
| mmsecross | Diamond structuring element and elementary 3x3 cross. |
| mmareaclose | Area closing |
| mmhmin | Remove basins with contrast less than h. |
| [mmclohole] [Up] [mmasfrec] | |
| User Feedback | |
| Copyright (c) 1998-2008 by SDC Information Systems |