Image Processing Toolbox User's Guide |
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.
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.
Name Size Bytes Class I 256x256 65536 uint8 array I2 256x256 65536 uint8 array I3 256x256 65536 uint8 array background 256x256 65536 uint8 array bw 256x256 65536 logical array level 1x1 8 double array Grand total is 327681 elements using 327688 bytes
5. Adjust the Contrast in the Processed Image | 7. Determine the Number of Objects in the Image |
© 1994-2005 The MathWorks, Inc.