regionprops用来度量图像区域属性的函数。
Syntax
STATS = regionprops(L,properties)
Description
STATS = regionprops(L,properties) measures a set of properties for each labeled region in the label matrix L. Positive integer elements of L correspond to different regions. For example, the set of elements of L equal to 1 corresponds to region 1; the set of elements of L equal to 2 corresponds to region 2; and so on. The return value STATS is a structure array of length max(L(:)). The fields of the structure array denote different measurements for each region, as specified by properties
这就是matlab help中的解释,即函数regionprops用于提取图像中感兴趣区域的属性,包括以下几个内容:
'Area''EulerNumber''Orientation''BoundingBox''Extent''Perimeter''Centroid''Extrema''PixelIdxList''ConvexArea''FilledArea''PixelList''ConvexHull''FilledImage''Solidity''ConvexImage''Image''SubarrayIdx''Eccentricity''MajorAxisLength''EquivDiameter''MinorAxisLength'
翻译过来就是:
'Area'
是标量,计算出在图像各个区域中像素总个数。
'BoundingBox'
是1行ndims(L)*2列的向量,即包含相应区域的最小矩形。包括矩形左上角坐标和长宽。
'Centroid'是1行ndims(L)列的向量,给出每个区域的质心(重心)
MajorAxisLength'
是标量,与区域具有相同标准二阶中心矩的椭圆的长轴长度(像素意义下)
'MinorAxisLength'
是标量,与区域具有相同标准二阶中心矩的椭圆的短轴长度(像素意义下)。
'Eccentricity'
是标量,与区域具有相同标准二阶中心矩的椭圆的离心率(可作为特征)。
'Orientation'
是标量,与区域具有相同标准二阶中心矩的椭圆的长轴与x轴的交角(度)。