Commit dc7c99bb authored by Taddeüs Kroes's avatar Taddeüs Kroes

ImProc ass1: Improved imports.

parent af846a58
from numpy import *
from numpy import empty, array, minimum, maximum, meshgrid, ix_, arange, \
correlate
def linfilter1(f, w):
g = empty(f.shape, dtype=f.dtype)
......@@ -52,6 +53,7 @@ def linfilter3(f, w):
return f[ix_(ii, jj)]
r = 0 * f
for di, dj, weight in didjw:
r += weight * translate(di, dj)
......
from linfilters import *
from pylab import imread, ones, plot, semilogy, savefig, show
from scipy.ndimage.interpolation import zoom
from pylab import *
from time import time
from sys import argv
repeat = 1
w = (3, 11)
......@@ -28,6 +29,10 @@ for times in timings:
plot(x, times, 'o-')
semilogy()
if len(argv) > 1:
savefig(argv[1])
show()
#subplot(1, 3, 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment