|Image Processing Toolbox User's Guide|
8. Examine the Label Matrix
To better understand the label matrix returned by the
bwlabel function, this step explores the pixel values in the image. There are several ways to get a close-up view of pixel values. For example, you can use
imcrop to select a small portion of the image. Another way is to use toolbox Pixel Region tool to examine pixel values. Display the label matrix, using
Start the Pixel Region tool.
By default, it automatically associates itself with the image in the current figure. The Pixel Region tool draws a rectangle, called the pixel region rectangle, in the center of the visible part of the image. This rectangle defines which pixels are displayed in the Pixel Region tool. As you move the rectangle, the Pixel Region tool updates the pixel values displayed in the window. For more information about using the toolbox modular interactive tools, see Building GUIs with Modular Tools..
The following figure shows the Image Viewer with the Pixel Region rectangle positioned over the edges of two rice grains. Note how all the pixels in the rice grains have the values assigned by the
bwlabel function and the background pixels have the value 0 (zero).
Examining the Label Matrix with the Pixel Region Tool
|7. Determine the Number of Objects in the Image||9. Display the Label Matrix as a Pseudocolor Indexed Image|
© 1994-2005 The MathWorks, Inc.