[hofig4s8] [Up] [hofig4s10] Chapter 4 - Hit-or-Miss Transform

hofig4s9
Reconstruction of pruned skeleton

Description

This figure illustrates the reconstruction of pruned skeleton by geodesic dilation.

Demo Script

.

from morph import *
S=mmreadgray('scissors.tif')
T=mmthin(S,mmhomothin())
P15=mmthin(T,mmendpoints(),15)
EP = mmsupcanon(P15,mmendpoints())
EPR=mmcdil(EP,T,mmsebox(),45)
E=mmunion(P15,EPR)
fig_a=mmunion(mmgray(S,'uint8',80),mmgray(T,'uint8',150),mmgray(P15))
fig_b=mmunion(mmgray(T,'uint8',100),mmgray(mmdil(EP,mmsebox())))
fig_c=mmunion(mmgray(T,'uint8',100),mmgray(EPR))
fig_d=mmunion(mmgray(S,'uint8',100),mmgray(E))
mmshow(fig_a)
mmshow(fig_b)
mmshow(fig_c)
mmshow(fig_d)
fig_a fig_b
fig_c fig_d

[hofig4s8] [Up] [hofig4s10] http://www.python.org