In [10]:
import skimage as skm
import skimage.io as io
from skimage.filters import sobel
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
In [20]:
im=io.imread('mini-pizza.jpg')
gim=skm.color.rgb2gray(im)
io.imshow(gim)
Out[20]:
In [21]:
elevation_map=sobel(gim)
io.imshow(elevation_map)
Out[21]:
In [27]:
hist = np.histogram(gim, bins=np.arange(0, 256))
plt.plot(hist[1][:-1], hist[0], lw=2)
Out[27]:
In [ ]: