From ef06623aa40e69d9e5332208f9ead5af2e7ea4b6 Mon Sep 17 00:00:00 2001 From: couchot Date: Thu, 30 Oct 2014 16:17:52 +0100 Subject: [PATCH] =?utf8?q?ourapproach.tex=20modifi=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- stc/exp/python/testdiff.py | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 stc/exp/python/testdiff.py diff --git a/stc/exp/python/testdiff.py b/stc/exp/python/testdiff.py new file mode 100644 index 0000000..8e6a64f --- /dev/null +++ b/stc/exp/python/testdiff.py @@ -0,0 +1,45 @@ +import Image as im +import numpy as np + +cover = im.open("lena512.bmp") +cover.save("lena512.png") + +d7= im.open("diff7.pgm") +d7.save("diff7.png") +d7= im.open("diff7.png") + +l6 = im.open("lena6.pgm") +l6.save("lena6.png") + +l7 = im.open("lena7.pgm") +l7.save("lena7.png") + + +e6 = im.open("edge6.pgm") +e6.save("edge6.png") + +e7 = im.open("edge7.pgm") +e7.save("edge7.png") + + +d6= im.open("diff6.pgm") +d6.save("diff6.png") +d6= im.open("diff6.png") + +print d7.size +m7 = d7.getdata() +m6 = d6.getdata() + +r7= {} + +for e in m7: + if e not in r7: + r7[e] = 1 +print r7 + +r6={} +for e in m6: + if e not in r6: + r6[e] = 1 +print r6 + -- 2.39.5