In [1]:
%run common.ipynb
from __future__ import division
img = smooth(img, 5).astype(int)
gimshow(img)
In [2]:
mask = [[ 1, 1, 1],
[ 1,-8, 1],
[ 1, 1, 1]]
lap_img = ndimage.convolve(img, mask)
view_lap = scale(lap_img)
lap_img[lap_img < 0] = 0
histshow(lap_img)
gimshow(lap_img, title="Laplace")
histshow(view_lap)
gimshow(view_lap, title="Scaled Laplace")