'Area' |
Actual number of pixels in the region, returned as a scalar. (This value
might differ slightly from the value returned by bwarea ,
which weights different patterns of pixels differently.)
To find the equivalent to the area of a 3-D volume, use the
'Volume' property of
regionprops3 .
| Yes | Yes | Yes |
'BoundingBox' | Position and size of the smallest box containing the region, returned as a
1-by-(2*Q) vector. The first Q
elements are the coordinates of the minimum corner of the box. The second
Q elements are the size of the box along each dimension.
For example, a 2-D bounding box with value [5.5 8.5 11 14]
indicates that the (x,y) coordinate of
the top-left corner of the box is (5.5, 8.5), the horizontal width of the box
is 11 pixels, and the vertical height of the box is 14 pixels. | Yes | Yes | Yes |
'Centroid' | Center of mass of the region, returned as a 1-by-Q
vector. The first element of Centroid is the horizontal
coordinate (or x-coordinate) of the center of mass. The
second element is the vertical coordinate (or
y-coordinate). All other elements of
Centroid are in order of dimension. This figure
illustrates the centroid and bounding box for a discontiguous region. The
region consists of the white pixels; the green box is the bounding box, and
the red dot is the centroid.
| Yes | Yes | Yes |
'Circularity' | Roundness of objects, returned as a struct with field
Circularity . The struct contains the circularity value
for each object in the input image. The circularity value is computed as
(4*Area*pi)/(Perimeter2) .
For a perfect circle, the circularity value is 1. The input must be a label
matrix or binary image with contiguous regions. If the image contains
discontiguous regions, regionprops returns unexpected results.
Note Circularity is not recommended for very small
objects such as a 3-by-3 square. For such cases, the results might exceed
the circularity value for a perfect circle.
| 2-D only | No | Yes |
'ConvexArea' | Number of pixels in 'ConvexImage' , returned as a scalar. | 2-D only | No | No |
'ConvexHull' | Smallest convex polygon that can contain the region, returned as a p-by-2
matrix. Each row of the matrix contains the x- and
y-coordinates of one vertex of the polygon. | 2-D only | No | No |
'ConvexImage' | Image that specifies the convex hull, with all pixels within the hull filled in (set to
on ), returned as a binary image
(logical ). The image is the size of the bounding box of the
region. (For pixels that the boundary of the hull passes through,
regionprops uses the same logic as
roipoly to determine whether the pixel is inside or outside
the hull.) | 2-D only | No | No |
'Eccentricity' | Eccentricity of the ellipse that has the same second-moments as the region, returned as a
scalar. The eccentricity is the ratio of the distance between the foci of the
ellipse and its major axis length. The value is between 0 and 1. (0 and 1 are
degenerate cases. An ellipse whose eccentricity is 0 is actually a circle, while
an ellipse whose eccentricity is 1 is a line segment.) | 2-D only | Yes | Yes |
'EquivDiameter' | Diameter of a circle with the same area as the region, returned as a scalar. Computed as
sqrt(4*Area/pi) . | 2-D only | Yes | Yes |
'EulerNumber' | Number of objects in the region minus the number of holes in those objects, returned as a
scalar. This property is supported only for 2-D label matrices.
regionprops uses 8-connectivity to compute the Euler number
(also known as the Euler characteristic). To learn more about connectivity, see
Pixel Connectivity. | 2-D only | No | Yes |
'Extent' | Ratio of pixels in the region to pixels in the total bounding box, returned as a scalar.
Computed as the Area divided by the area of the bounding
box. | 2-D only | Yes | Yes |
'Extrema' | Extrema points in the region, returned as an 8-by-2 matrix. Each row of the matrix
contains the x- and y-coordinates of
one of the points. The format of the vector is [top-left top-right
right-top right-bottom bottom-right bottom-left left-bottom
left-top] . This figure illustrates the extrema of two different
regions. In the region on the left, each extrema point is distinct. In the
region on the right, certain extrema points (such as
top-left and left-top ) are
identical.
| 2-D only | Yes | Yes |
'FilledArea' | Number of on pixels in FilledImage , returned as a
scalar. | Yes | No | Yes |
'FilledImage' | Image the same size as the bounding box of the region, returned as a binary
(logical ) array. The on pixels
correspond to the region, with all holes filled in, as shown in this
figure.
| Yes | No | Yes |
'Image' | Image the same size as the bounding box of the region, returned as a binary
(logical ) array. The on pixels
correspond to the region, and all other pixels are
off . | Yes | Yes | Yes |
'MajorAxisLength' | Length (in pixels) of the major axis of the ellipse that has the same
normalized second central moments as the region, returned as a scalar. | 2-D only | Yes | Yes |
'MaxFeretProperties' | Feret properties that include maximum Feret diameter, its relative
angle, and coordinate values, returned as a struct with fields:
Field | Description | MaxFeretDiameter | Maximum Feret diameter measured as the maximum distance between
any two boundary points on the antipodal vertices of convex hull
that enclose the object. | MaxFeretAngle | Angle of the maximum Feret diameter with respect to horizontal
axis of the image. | MaxFeretCoordinates | Endpoint coordinates of the maximum Feret diameter. |
The input can be a binary image, connected component, or a
label matrix. | 2-D only | No | No |
'MinFeretProperties' | Feret properties that include minimum Feret diameter, its relative
angle, and coordinate values, returned as a struct with fields:
Field | Description | MinFeretDiameter | Minimum Feret diameter measured as the minimum distance between
any two boundary points on the antipodal vertices of convex hull
that enclose the object. | MinFeretAngle | Angle of the minimum Feret diameter with respect to horizontal
axis of the image. | MinFeretCoordinates | Endpoint coordinates of the minimum Feret diameter. |
The input can be a binary image, a connected component, or a
label matrix. | 2-D only | No | No |
'MinorAxisLength' | Length (in pixels) of the minor axis of the ellipse that has the same normalized second
central moments as the region, returned as a scalar. | 2-D only | Yes | Yes |
'Orientation' | Angle between the x-axis and the major axis of the ellipse that has the
same second-moments as the region, returned as a scalar. The value is in
degrees, ranging from -90 degrees to 90 degrees. This figure illustrates the
axes and orientation of the ellipse. The left side of the figure shows an
image region and its corresponding ellipse. The right side shows the same
ellipse with the solid blue lines representing the axes. The red dots are the
foci. The orientation is the angle between the horizontal dotted line and the
major axis.
| 2-D only | Yes | Yes |
'Perimeter' | Distance around the boundary of the region returned as a scalar.
regionprops computes the perimeter by calculating the
distance between each adjoining pair of pixels around the border of the
region. If the image contains discontiguous regions,
regionprops returns unexpected results. This figure
illustrates the pixels included in the perimeter calculation for this
object.
| 2-D only | No | Yes |
'PixelIdxList' | Linear indices of the pixels in the region, returned as a p-element
vector. | Yes | Yes | Yes |
'PixelList' | Locations of pixels in the region, returned as a p-by-Q
matrix. Each row of the matrix has the form [x y z ...] and
specifies the coordinates of one pixel in the region. | Yes | Yes | Yes |
'Solidity' | Proportion of the pixels in the convex hull that are also in the region, returned as a
scalar. Computed as Area/ConvexArea . | 2-D only | No | No |
'SubarrayIdx' | Elements of L inside the object bounding box, returned as a cell array
that contains indices such that L(idx{:}) extracts the
elements. | Yes | Yes | No |