1from smilPython import *
2
3
4im1 = Image("https://smil.cmm.minesparis.psl.eu/images/lena.png")
5im1.show()
6
7im2 = Image(im1)
8
9
10
11im2 << ( (im1>100) & im1 )
12im2.show()
13
14
15im3 = Image(im1)
16sePts = ((0,0), (0,1), (1,1), (1,0), (-1,1), (-1,0), (-1,-1), (0,-1), (1,-1))
17
18im3 << 0
19
20for (dx,dy) in sePts:
21 im3 |= trans(im1, dx, dy)
22im3.show()