Image Processing Toolbox User's Guide Previous page   Next Page

Grayscale Images

An grayscale image, also known as a intensity image, is a data matrix, I, whose values represent intensities within some range. MATLAB stores a grayscale image as a individual matrix, with each element of the matrix corresponding to one image pixel. The matrix can be of class uint8, uint16, int16, single, or double.While grayscale images are rarely saved with a colormap, MATLAB uses a colormap to display them.

For a matrix of class single or double, using the default grayscale colormap, the intensity 0 represents black and the intensity 1 represents white. For a matrix of type uint8, uint16, or int16, the intensity intmin(class(I)) represents black and the intensity intmax(class(I)) represents white.

The figure below depicts an grayscale image of class double.

Pixel Values in a Grayscale Image Define Gray Levels


Previous page  Indexed Images Truecolor Images Next page

© 1994-2005 The MathWorks, Inc.