[hofig2s13] [Up] [hofig2s16] Chapter 2 - Binary Opening and Closing

hofig2s14
Radial opening

Description

This figure illustrates the radial opening filter.

Demo Script

.

from morph import *
from handson import *
f=mmreadgray('blobs_1.tif')
B1=mmsedisk(20,'1D')
B2=mmserot(B1,45)
B3=mmserot(B1,90)
B4=mmserot(B1,135)
mmshow(mmseshow(B1))
mmshow(mmseshow(B2))
mmshow(mmseshow(B3))
mmshow(mmseshow(B4))
mmseshow(B1) mmseshow(B2) mmseshow(B3) mmseshow(B4)

.

p1=mmopen(f,B1)
p2=mmopen(f,B2)
p3=mmopen(f,B3)
p4=mmopen(f,B4)
p=mmunion(p1,p2,p3,p4)
mmshow(f)
mmshow(p1)
mmshow(p2)
mmshow(p3)
mmshow(p4)
mmshow(p)
f p1 p2
p3 p4 p

[hofig2s13] [Up] [hofig2s16] http://www.python.org