| [mmseunion] [Up] [mmcero] | Dilations And Erosions |
| User Feedback |
| f | Image Gray-scale (uint8 or uint16) or binary image |
| g | Image Gray-scale (uint8 or uint16) or binary image
Conditioning image. |
| b | Structuring Element
Default: |
| n | Double Non-negative integer.
(number of iterations). Default: |
| y | Image |
mmcdil creates the image y by dilating the image f by the structuring element b conditionally to the image g. This operator may be applied recursively n times.
f = mmbinary(uint8([[1, 0, 0, 0, 0, 0, 0],\
[0, 0, 0, 0, 0, 0, 0],\
[0, 0, 0, 0, 1, 0, 0,]]))
g = mmbinary(uint8([[1, 1, 1, 0, 0, 1, 1],\
[1, 0, 1, 1, 1, 0, 0],\
[0, 0, 0, 0, 1, 0, 0]]));
y1=mmcdil(f,g,mmsecross())
y2=mmcdil(f,g,mmsecross(),3)
f = uint8([\
[ 0, 0, 0, 80, 0, 0],\
[ 0, 0, 0, 0, 0, 0],\
[ 10, 10, 0, 255, 0, 0]])
g = uint8([\
[ 0, 1, 2, 50, 4, 5],\
[ 2, 3, 4, 0, 0, 0],\
[ 12, 255, 14, 15, 16, 17]])
y1=mmcdil(f,g,mmsecross())
y2=mmcdil(f,g,mmsecross(),3)
g=mmreadgray('pcb1bin.tif')
f=mmframe(g,5,5)
y5=mmcdil(f,g,mmsecross(),5)
y25=mmcdil(f,g,mmsecross(),25)
mmshow(g)
mmshow(g,f)
mmshow(g,y5)
mmshow(g,y25)
![]() |
![]() |
|
| g | g,f |
![]() |
![]() |
|
| g,y5 | g,y25 |


| [mmseunion] [Up] [mmcero] | |
| User Feedback | |
| Copyright (c) 1998-2008 by SDC Information Systems |