Main Content

ROI-Based Processing

Define and operate on regions of interest (ROI)

A region of interest (ROI) is a portion of an image that you want to filter or operate on in some way. You can represent an ROI as a binary mask image. In the mask image, pixels that belong to the ROI are set to1and pixels outside the ROI are set to0. The toolbox offers several options to specify ROIs and create binary masks.

The toolbox supports a set of objects that you can use to create ROIs of many shapes, such circles, ellipses, polygons, rectangles, and hand-drawn shapes. After you create the objects, you can modify their shape, position, appearance, and behavior. For more information about the ROI shapes, seeCreate ROI Shapes.

Functions

expand all

AssistedFreehand Assisted freehand region of interest
Circle Circular region of interest
Crosshair Crosshair region of interest
Cuboid Cuboidal region of interest
Ellipse Elliptical region of interest
Freehand Freehand region of interest
Line Line region of interest
Point Point region of interest
Polygon Polygonal region of interest
Polyline Polyline region of interest
Rectangle Rectangular region of interest
drawassisted Create customizable freehand ROI with assistance from object edges
drawcircle Create customizable circular ROI
drawcrosshair Create customizable crosshair ROI
drawcuboid Create customizable cuboidal ROI
drawellipse Create customizable elliptical ROI
drawfreehand Create customizable freehand ROI
drawline Create customizable linear ROI
drawpoint 创建可定制的点ROI
drawpolygon Create customizable polygonal ROI
drawpolyline Create customizable polyline ROI
drawrectangle Create customizable rectangular ROI
draw Begin drawing ROI interactively
减少 Reduce density of points in ROI
beginDrawingFromPoint Begin drawing ROI from specified point
inROI Query if points are located in ROI
bringToFront Bring ROI to front of Axes stacking order
wait BlockMATLABcommand line until ROI operation is finished
createMask Create binary mask image from ROI
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
inpaintCoherent Restore specific image regions using coherence transport based image inpainting
inpaintExemplar Restore specific image regions using exemplar-based image inpainting
roicolor Select region of interest (ROI) based on color
roifilt2 Filter region of interest (ROI) in image
减少poly Reduce density of points in ROI using Ramer–Douglas–Peucker algorithm

Topics

Specify ROIs

Filter ROIs

Create Interactive ROIs Using Events and Callback Functions