Image Processing Toolbox User's Guide |
Specifying a Region of Interest
A region of interest is a portion of an image that you want to filter or perform some other operation on. You define a region of interest by creating a binary mask, which is a binary image with the same size as the image you want to process. The mask contains 1's for all pixels that are part of the region of interest, and 0's everywhere else.
You can define more than one region in an image. The regions can be geographic in nature, such as polygons that encompass contiguous pixels, or they can be defined by a range of intensities. In the latter case, the pixels are not necessarily contiguous.
The following subsections discuss methods for creating binary masks:
roicolor
function)
For an interactive demonstration of region-based processing, try running roidemo
.
Region-Based Processing | Selecting a Polygon |
© 1994-2005 The MathWorks, Inc.