1from smilPython import *
2
3
4im1 = Image("https://smil.cmm.minesparis.psl.eu/images/balls.png")
5im1.show()
6
7
8im2 = Image(im1)
9fullThin(im1, HMT_sL1(4) | HMT_sL2(4), im2)
10
11
12im3 = Image(im1)
13hitOrMiss(im2, HMT_sLineJunc(8), im3)
14
15
16im4 = Image(im1)
17hitOrMiss(im2, HMT_sLineEnd(8), im4)
18
19
20dilate(im3, im3, hSE())
21dilate(im4, im4, hSE())
22inf(im3, 1, im3)
23inf(im4, 3, im4)
24sup(im3, im4, im4)
25
26im2.getViewer().drawOverlay(im4)
27im2.show()
28