Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning IPython for Interactive Computing and Data Visualization, Second Edition

You're reading from   Learning IPython for Interactive Computing and Data Visualization, Second Edition Get started with Python for data analysis and numerical computing in the Jupyter notebook

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781783986989
Length 200 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Cyrille Rossant Cyrille Rossant
Author Profile Icon Cyrille Rossant
Cyrille Rossant
Arrow right icon
View More author details
Toc

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...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime