Image processing
Several libraries bring image processing capabilities to Python. SciPy, the main scientific Python library, contains a few image processing routines. scikit-image is another library dedicated to image processing. We will show an example in this section, inspired by the one at http://scikit-image.org/docs/dev/auto_examples/plot_equalize.html.
When using the Anaconda distribution, scikit-image can be installed with conda install scikit-image
.
Let's import some packages.
In [1]: import numpy as np import skimage from skimage import img_as_float import skimage.filters as skif from skimage.color import rgb2gray import skimage.data as skid import skimage.exposure as skie from ipywidgets import interact import matplotlib.pyplot as plt import seaborn %matplotlib inline
There are a few test images in scikit-image. Here is one:
In [2]: chelsea = skid.chelsea() In [3]: chelsea.shape, chelsea.dtype Out...