Book Image

Mastering SciPy

By : Francisco Javier Blanco-Silva, Francisco Javier B Silva
Book Image

Mastering SciPy

By: Francisco Javier Blanco-Silva, Francisco Javier B Silva

Overview of this book

Table of Contents (16 chapters)
Mastering SciPy
About the Author
About the Reviewers

High-level operations on digital images

Before addressing the challenges of image processing and compression, it pays off to examine the sequence of basic operations that we perform on images. These operations are the building blocks of the algorithms we are to explore. By themselves, they beautifully illustrate the basic principle of mathematical imaging. An image is represented as a mathematical object and, as such, basic operations on the corresponding object can be translated to either physical operations or queries on the corresponding image.

Object measurements

In the setting of binary images, we could regard an image as a set of objects or blobs (in white) on an empty region of the plane (the background, in black). It is then possible to perform different measures on each of the objects represented:

In [1]: import numpy as np, matplotlib.pyplot as plt; \
   ...: from import hubble_deep_field
In [2]: image = (hubble_deep_field()[:,:,0] > 120)


Hubble eXtreme Deep...