Contenu principal

Annotate Image Displays and Draw ROIs

Overlay masks and labels on images, and draw regions of interest of many shapes

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.

Functions

expand all

imoverlayBurn binary mask into 2-D image
labeloverlayOverlay label matrix regions on 2-D image
uipaintDraw using paintbrush in viewer window (Since R2026a)

Draw ROI Shapes

uidrawInteractively draw ROI in viewer window (Since R2026a)

ROI Shapes

AngleAngle annotation (Since R2026a)
CircleCircle annotation (Since R2026a)
EllipseEllipse annotation (Since R2026a)
FreehandFreehand annotation (Since R2026a)
LineLine annotation (Since R2024a)
PointPoint annotation (Since R2024a)
PolygonPolygon annotation (Since R2026a)
PolylinePolyline annotation (Since R2026a)
RectangleRectangle annotation (Since R2026a)

Draw ROI Shapes

drawassistedCreate customizable freehand ROI with assistance from object edges
drawcircleCreate customizable circular ROI
drawcrosshairCreate customizable crosshair ROI
drawcuboidCreate customizable cuboidal ROI
drawellipseCreate customizable elliptical ROI
drawfreehandCreate customizable freehand ROI
drawlineCreate customizable linear ROI
drawpointCreate customizable point ROI
drawpolygonCreate customizable polygonal ROI
drawpolylineCreate customizable polyline ROI
drawrectangleCreate customizable rectangular ROI

ROI Shapes

AssistedFreehandAssisted freehand region of interest
CircleCircular region of interest
CrosshairCrosshair region of interest
CuboidCuboidal region of interest
EllipseElliptical region of interest
FreehandFreehand region of interest
LineLine region of interest
PointPoint region of interest
PolygonPolygonal region of interest
PolylinePolyline region of interest
RectangleRectangular region of interest

Customize ROI Shapes

drawBegin drawing ROI interactively
reduceReduce density of points in ROI
beginDrawingFromPointBegin drawing ROI from specified point
inROIQuery if points are located in ROI
bringToFrontBring ROI to front of Axes stacking order
waitBlock MATLAB command line until ROI operation is finished

Topics

Specify ROIs

Create Interactive ROIs Using Events and Callback Functions

Featured Examples