O'Reilly logo

Python: Advanced Predictive Analytics by Joseph Babcock, Ashish Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Images

Like textual data, images are potentially noisy and complex. Furthermore, unlike language, which has a structure of words, paragraphs, and sentences, images have no predefined rules that we might use to simplify raw data. Thus, much of image analysis will involve extracting patterns from the input's features, which are ideally interpretable to a human analyst based only on the input pixels.

Cleaning image data

One of the common operations we will perform on images is to enhance contrast or change their color scale. For example, let us start with an example image of a coffee cup from the skimage package, which you can import and visualize using the following commands:

>>> from skimage import data, io, segmentation
>>> image = data.coffee() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required