
Chapter 2
Images Files and File Types
We shall see that matrices can be handled very efficiently in MATLAB, Octave and Python.
Images may be considered as matrices whose elements are the pixel values of the image.
In this chapter we shall investigate how the matrix capabilities of each system allow us to
investigate images and their properties.
2.1 Opening and Viewing Grayscale Images
Suppose you are sitting at your computer and have started your system. You will have
a prompt of some sort, and in it you can type:
MATLAB/Octave
>> w = imread(’wombats.png’);
or from the io module of skimage
Python
In : import skimage.io as io
In : w = io.imread(’wombats.png’) ...