Image Processing Toolbox User's Guide Previous page   Next Page

7. Determine the Number of Objects in the Image

After converting the image to a binary image, you can use the bwlabel function to determine the number of grains of rice in the image. The bwlabel function labels all the components in the binary image bw and returns the number of components it finds in the image in the output value, numObjects.

The accuracy of the results depends on a number of factors, including

Previous page  6. Create a Binary Version of the Image 8. Examine the Label Matrix Next page

© 1994-2005 The MathWorks, Inc.