[hofig2s7] [Up] [hofig2s9] Chapter 2 - Binary Opening and Closing

hofig2s8
Restoration of corrupted grain-type image

Description

This figure illustrates the use of opening for restoration of grain-type image.

Demo Script

.

from morph import *
from handson import *
n_overlap=mmbggmodel((300, 200),mmsedisk(2),4,0.001)
f1=mmbggmodel((300, 200),mmsedisk(12),2,0.0001)
f2=mmbggmodel((300, 200),mmsedisk(16),2,0.00004)
B=mmsedisk(12)
f=mmopen(mmunion(f1,f2),B)
cor=mmunion(f,n_overlap)
g = mmopen(cor,B)
mmshow(f)
mmshow(n_overlap)
mmshow(cor)
mmshow(g)
f n_overlap cor
g

[hofig2s7] [Up] [hofig2s9] http://www.python.org