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)