Image Processing Toolbox User's Guide Previous page   Next Page

Selecting Objects in a Binary Image

You can use the bwselect function to select individual objects in a binary image. You specify pixels in the input image, and bwselect returns a binary image that includes only those objects from the input image that contain one of the specified pixels.

You can specify the pixels either noninteractively or with a mouse. For example, suppose you want to select objects in the image displayed in the current axes. You type

The cursor changes to crosshairs when it is over the image. Click the objects you want to select; bwselect displays a small star over each pixel you click. When you are done, press Return. bwselect returns a binary image consisting of the objects you selected, and removes the stars.

See the reference page for bwselect for more information.


Previous page  Connected-Component Labeling Finding the Area of the Foreground of a Binary Image Next page

© 1994-2005 The MathWorks, Inc.