Reader small image

You're reading from  Mastering SciPy

Product typeBook
Published inNov 2015
Reading LevelIntermediate
Publisher
ISBN-139781783984749
Edition1st Edition
Languages
Right arrow
Authors (2):
Francisco Javier Blanco-Silva
Francisco Javier Blanco-Silva
author image
Francisco Javier Blanco-Silva

I will always be indebted to Bradley J. Lucier and Rodrigo Bañuelos, for being a constant inspiration, for their guidance and teachings. Special thanks to my editors, Sriram Neelakantam, Bharat Patil, Nikhil Potdukhe, and Mohammad Rizvi. Many colleagues have contributed with encouragement and fruitful discussions. In particular, I would like to mention Parsa Bakhtary, Aaron Dutle, Edsel Peña, Pablo Sprechmann, Adam Taylor, and Holly Watson. But the most special thanks go without a doubt to my wife and daughter. Grace's love and smiles alone provided all the motivation, enthusiasm and skills to overcome any difficulties encountered during the pursuit of this book, and everything life threw at me ever since she was born.
Read more about Francisco Javier Blanco-Silva

View More author details
Right arrow

Digital images


The dictionary defines a pixel (an abbreviation of picture element) as a minute area of illumination on a display screen, one of many from which an image is composed. We therefore consider a digital image as a set of pixels, each of them defined by its location (irrespective of the kind of coordinates chosen) and the intensity of light of the corresponding image at that location.

Depending on the way we measure intensity, a digital image belongs to one of three possible types:

  • Binary

  • Gray-scale

  • Color (with or without an alpha channel)

Binary

In a binary image there are only two possible intensities—light or dark. Such images are traditionally best implemented as simple two-dimensional Boolean arrays. True indicates a bright spot, while False measures a dark spot.

For instance, to create a binary image of size 128 x 128, with a single disk of radius 6 centered at the location (30, 100), we could issue the following:

In [1]: import numpy as np, matplotlib.pyplot as plt
In [2]: disk...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering SciPy
Published in: Nov 2015Publisher: ISBN-13: 9781783984749

Authors (2)

author image
Francisco Javier Blanco-Silva

I will always be indebted to Bradley J. Lucier and Rodrigo Bañuelos, for being a constant inspiration, for their guidance and teachings. Special thanks to my editors, Sriram Neelakantam, Bharat Patil, Nikhil Potdukhe, and Mohammad Rizvi. Many colleagues have contributed with encouragement and fruitful discussions. In particular, I would like to mention Parsa Bakhtary, Aaron Dutle, Edsel Peña, Pablo Sprechmann, Adam Taylor, and Holly Watson. But the most special thanks go without a doubt to my wife and daughter. Grace's love and smiles alone provided all the motivation, enthusiasm and skills to overcome any difficulties encountered during the pursuit of this book, and everything life threw at me ever since she was born.
Read more about Francisco Javier Blanco-Silva