SMIL 1.1.2
Loading...
Searching...
No Matches
loop-sleep.py
1import smilPython as sp
2import time
3
4# define which structuring element to use
5se = sp.SquSE()
6
7# get an image
8imIn = sp.Image("https://smil.cmm.minesparis.psl.eu/images/lena.png")
9# declare output image
10imOut = sp.Image(imIn)
11
12# Display input, temporary and output images
13imIn.show("Input image")
14imOut.show()
15
16input("Hit the enter key to begin")
17for i in range(0,8):
18 s = "Open SE({:})".format(i)
19 print(s)
20 imOut.setName(s)
21
22 r = sp.open(imIn, imOut, se(i))
23
24 # process GUI events and update the image display
25 sp.Gui.processEvents()
26 # an optional wait of 0.4 seconds
27 time.sleep(0.4)
28
29input("Hit the enter key to exit")
30