]> AND Private Git Repository - canny.git/blob - stc/exp/python/testdiff.py
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
ajout canny_p3_stc.py
[canny.git] / stc / exp / python / testdiff.py
1 import Image as im
2 import numpy as np
3
4 cover = im.open("lena512.bmp")
5 cover.save("lena512.png")
6
7 d7= im.open("diff7.pgm")
8 d7.save("diff7.png")
9 d7= im.open("diff7.png")
10
11 l6 = im.open("lena6.pgm")
12 l6.save("lena6.png")
13
14 l7 = im.open("lena7.pgm")
15 l7.save("lena7.png")
16
17
18 e6 = im.open("edge6.pgm")
19 e6.save("edge6.png")
20
21 e7 = im.open("edge7.pgm")
22 e7.save("edge7.png")
23
24
25 d6= im.open("diff6.pgm")
26 d6.save("diff6.png")
27 d6= im.open("diff6.png")
28
29 print d7.size
30 m7 = d7.getdata()
31 m6 = d6.getdata()
32
33 r7= {}
34
35 for e in m7:
36     if e not in r7:
37         r7[e] = 1
38 print r7
39
40 r6={}
41 for e in m6:
42     if e not in r6:
43         r6[e] = 1
44 print r6
45