Main Content

基于 ROI 的处理

定义感兴趣的区域 (ROI) 并对其执行运算

感兴趣的区域是您要以某种方式对其进行滤波或运算的部分图像。您可以将 ROI 表示为二值掩膜图像。在封装图像中,属于感兴趣区域的像素设置为 1,感兴趣区域外的像素设置为 0。工具箱提供了几个选项来指定 ROI 和创建二值掩膜。

工具箱支持一组对象,您可以使用这些对象创建许多形状的 ROI,例如圆形、椭圆形、多边形、矩形和手绘形状。创建对象后,您可以修改其形状、位置、外观和行为。有关 ROI 形状的详细信息,请参阅Create ROI Shapes

函数

全部展开

AssistedFreehandAssisted freehand region of interest
CircleCircular region of interest
CrosshairCrosshair region of interest (自 R2019b 起)
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
drawassistedCreate customizable freehand ROI with assistance from object edges
drawcircleCreate customizable circular ROI
drawcrosshairCreate customizable crosshair ROI (自 R2019b 起)
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
drawBegin drawing ROI interactively
reduceReduce density of points in ROI (自 R2019b 起)
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 (自 R2019b 起)
createMask从 ROI 创建二值掩膜图像
roipolySpecify polygonal region of interest (ROI)
poly2mask将感兴趣的区域 (ROI) 多边形转换为区域掩膜
regionfillFill specified regions in image using inward interpolation
inpaintCoherentRestore specific image regions using coherence transport based image inpainting
inpaintExemplarRestore specific image regions using exemplar-based image inpainting (自 R2019b 起)
roicolorSelect region of interest (ROI) based on color
roifilt2Filter region of interest (ROI) in grayscale image
reducepolyReduce density of points in ROI using Ramer–Douglas–Peucker algorithm (自 R2019b 起)

主题

指定 ROI

对 ROI 进行滤波

使用事件和回调函数创建交互式关注区域