| [mmcloserec] [Up] [mmvmax] | Connected Operators |
Implemented in Python.
| f | Image Gray-scale (uint8 or uint16) image. |
| h | Double Contrast parameter. Default:
|
| Bc | Structuring Element Structuring element (connectivity). Default:
|
| y | Image Gray-scale (uint8 or uint16) or binary image. |
mmhmin sup-reconstructs the gray-scale image
f from the marker created by the addition of the positive integer value
h to
f, using the connectivity
Bc. This operator removes connected basins with contrast less than
h. This function is very userful for simplifying the basins of the image.
>>> a = uint8([
[10, 3, 6, 18, 16, 15, 10],
[10, 9, 6, 18, 6, 5, 10],
[10, 9, 9, 15, 4, 9, 10],
[10, 10, 10, 10, 10, 10, 10]])
>>> print mmhmin(a,1,mmsebox())
[[10 4 6 18 16 15 10] [10 9 6 18 6 5 10] [10 9 9 15 5 9 10] [10 10 10 10 10 10 10]]
>>> f = mmreadgray('r4x2_256.tif')
>>> mmshow(f)
>>> fb = mmhmin(f,70)
>>> mmshow(fb)
>>> mmshow(mmregmin(fb))
![]() |
![]() |
|
| f | fb |
![]() |
|
| mmregmin(fb) |
def mmhmin(f, h=1, Bc=None):
if Bc is None: Bc = mmsecross()
g = mmaddm(f,h)
y = mmsuprec(g,f,Bc);
return y
| mmsebox | Create a box structuring element. |
| mmsecross | Diamond structuring element and elementary 3x3 cross. |
| mmfreedom | Control automatic data type conversion. |
| mmhmax | Remove peaks with contrast less than h. |
| mmareaclose | Area closing |
| [mmcloserec] [Up] [mmvmax] | |
| Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center. |