In [1]:
%load_ext autoreload

%autoreload 2

In [2]:
%pylab inline

import os
import sys
sys.path.append('..')

from PIL import Image

from utils.filters import *


Populating the interactive namespace from numpy and matplotlib

In [3]:
image = Image.open('../utils/tests/lena.jpg')
imshow(image)


Out[3]:
<matplotlib.image.AxesImage at 0x7f3a2409d198>

In [4]:
blurred = GaussianBlur(15).apply(image)
imshow(blurred)


Out[4]:
<matplotlib.image.AxesImage at 0x7f3a224c5ef0>

In [5]:
noised1 = GaussianNoise(alpha=0.66, loc=128, scale=128).apply(image)
imshow(noised1)


Out[5]:
<matplotlib.image.AxesImage at 0x7f3a2232ecc0>

In [6]:
noised2 = UniformNoise(alpha=0.66).apply(image)
imshow(noised2)


Out[6]:
<matplotlib.image.AxesImage at 0x7f3a22313278>

In [7]:
vignette = Vignette().apply(image)
imshow(vignette)


Out[7]:
<matplotlib.image.AxesImage at 0x7f3a222737f0>

In [8]:
gotham = Gotham().apply(image)
imshow(gotham)


Out[8]:
<matplotlib.image.AxesImage at 0x7f3a22256390>

In [9]:
lomo = Lomo().apply(image)
imshow(lomo)


Out[9]:
<matplotlib.image.AxesImage at 0x7f3a221b6ef0>

In [10]:
toaster = Toaster().apply(image)
imshow(toaster)


Out[10]:
<matplotlib.image.AxesImage at 0x7f3a2211ba90>

In [11]:
kelvin = Kelvin().apply(image)
imshow(kelvin)


Out[11]:
<matplotlib.image.AxesImage at 0x7f3a220ff5f8>