Image Processing Toolbox User's Guide Previous page   Next Page

6. Create a Binary Version of the Image

Create a binary version of the image by using thresholding. The function graythresh automatically computes an appropriate threshold to use to convert the grayscale image to binary. The im2bw function performs the conversion.

Binary Version of the Image

The binary image bw returned by im2bw is of class logical, as can be seen in this call to whos. The Image Processing Toolbox uses logical arrays to represent binary images. For more information, see Binary Images.

MATLAB responds with

Previous page  5. Adjust the Contrast in the Processed Image 7. Determine the Number of Objects in the Image Next page

© 1994-2005 The MathWorks, Inc.