In [1]:
%run common.ipynb
from __future__ import division


Populating the interactive namespace from numpy and matplotlib

In [19]:
img = smooth(img)
gradient = np.gradient(img)
magnitude = np.sqrt(gradient[0]**2 + gradient[1]**2)
magnitude *= 255/magnitude.max() #normalize to L-1
gimshow(magnitude)



In [22]:
def f(c):
    gimshow(img+c*magnitude)
interact(f, c=1.0)