Graphics Previous page   Next Page

Working with 8-Bit and 16-Bit Images

MATLAB usually works with double-precision (64-bit) floating-point numbers. However, to reduce memory requirements for working with images, MATLAB provides support for storing images as 8-bit or 16-bit unsigned integers by using the numeric classes uint8 or uint16, respectively. An image whose data matrix has class uint8 is called an 8-bit image; an image whose data matrix has class uint16 is called a 16-bit image.

The image function can display 8- or 16-bit images directly without converting them to double precision. However, image interprets matrix values slightly differently when the image matrix is uint8 or uint16. The specific interpretation depends on the image type.


Previous page  RGB (Truecolor) Images 8-Bit and 16-Bit Indexed Images Next page

© 1994-2005 The MathWorks, Inc.