Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

ROI-Based Processing

Define and operate on regions of interest (ROI)

Functions

roipoly Specify polygonal region of interest (ROI)
poly2mask Convert region of interest (ROI) polygon to region mask
regionfill Fill in specified regions in image using inward interpolation
roicolor Select region of interest (ROI) based on color
roifilt2 Filter region of interest (ROI) in image
imellipse Create draggable ellipse
imfreehand Create draggable freehand region
impoly Create draggable, resizable polygon
imrect Create draggable rectangle
imroi Region-of-interest (ROI) base class

Examples and How To

Create Binary Mask From Grayscale Image

This section describes how to create binary masks to define ROIs.

Create Binary Mask Using an ROI Object

You can use the createMask method of the imroi base class to create a binary mask for any type of ROI object — impoint, imline, imrect, imellipse, impoly, or imfreehand.

Create Binary Mask Without an Associated Image

Using the createMask method of ROI objects you can create a binary mask that defines an ROI associated with a particular image.

Create ROI Based on Color Values

You can use the roicolor function to define an ROI based on color or intensity range.

Apply Filter to Region of Interest in an Image

This example shows how to use masked filtering to increase the contrast of a specific region of an image.

Apply Custom Filter to Region of Interest in Image

This example shows how to filter a region of interest (ROI), using the roifilt2 function to specify the filter.

Fill Region of Interest in an Image

This example shows how to use regionfill to fill a region of interest (ROI) in an image.

Concepts

ROI Processing in Image Processing Toolbox

A region of interest (ROI) is a portion of an image that you want to filter or perform some other operation on.

Overview of ROI Filtering

Filtering a region of interest (ROI) is the process of applying a filter to a region in an image, where a binary mask defines the region.

Was this topic helpful?