Wolfram Language & System 10.0 (2014)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


computes the values of property prop for each component of a label matrix m that consists of identical elements.

uses the connectivity of nonzero pixels in image to compute the label matrix.

uses label matrix m and corresponding pixel values of image to compute properties.

only returns measurements that satisfy a criterion crit.

Details and OptionsDetails and Options

  • ComponentMeasurements[input,"prop"] returns an expression of the form , where the are the values of computed for segment i.
  • The input images and label matrices can be either 2D or 3D.
  • ComponentMeasurements[input,{"prop1","prop2",}] computes multiple properties.
  • ComponentMeasurements takes a CornerNeighbors option. The default setting is CornerNeighbors->True.
  • Position, area, and length measurements are taken in the standard image coordinate system.
  • ComponentMeasurements[input,"Properties"] gives the names of supported properties for the given input as a list of strings. Not all properties are supported for all inputs.
  • Properties related to area measurements:
  • "Count"number of elements
    "Area"approximate area, where each pixel area is weighted by its neighborhood configuration
    "FilledCount"number of elements after filling holes
    "EquivalentDiskRadius"radius of a disk that has the same area
    "AreaRadiusCoverage"fraction of pixels within the equivalent disk radius
  • Perimeter properties:
  • "PerimeterCount"number of elements on the perimeter
    "PerimeterLength"total length of outer pixel sides
    "OuterPerimeterCount"number of elements adjacent to the component
    "PolygonalLength"total length of the polygon formed by the centers of the perimeter elements
    "MaxPerimeterDistance"largest distance of an inner element to the perimeter
    "AuthalicRadius"radius of a circle that has the same polygonal perimeter length
  • Centroid properties:
  • "Centroid"center of mass coordinates
    "Medoid"coordinate of the closest element to the centroid
    "MeanCentroidDistance"mean distance of all elements from the centroid
    "MaxCentroidDistance"maximum distance of all elements from the centroid
    "MinCentroidDistance"minimum distance of all elements from the centroid
  • Parameters of the oriented best-fit ellipse:
  • "Length"largest axis of the best-fit ellipse
    "Width"smallest axis of the best-fit ellipse
    "SemiAxes"lengths of the semiaxes of the best-fit ellipse
    "Orientation"angle between the largest axis and the horizontal axis
    "Elongation"elongation, computed as
    "Eccentricity"eccentricity of the best-fit ellipse
  • Shape measurements:
  • "Circularity"ratio of equivalent disk perimeter to the perimeter length
    "FilledCircularity"circularity after filling holes
    "Rectangularity"fraction of pixels within the minimal bounding box
  • Bounding box properties:
  • "BoundingBox"axes-oriented bounding box in the form
    "BoundingBoxArea"area enclosed by the bounding box
    "MinimalBoundingBox"smallest possible oriented bounding box defined by the four corner vertices
  • Bounding disk properties:
  • "BoundingDiskCenter"bounding disk center coordinates
    "BoundingDiskRadius"bounding disk radius
    "BoundingDiskCoverage"coverage of bounding disk area by the component area
  • Convex hull properties:
  • "ConvexCount"number of elements included in the convex hull
    "ConvexVertices"corner elements of the convex hull
    "ConvexArea"area of the convex hull polygon
    "ConvexPerimeterLength"length of the convex hull polygon
    "ConvexCoverage"fraction of elements occupied in the convex hull
    "CaliperLength"largest diameter of the convex hull (Feret diameter)
    "CaliperWidth"smallest diameter of the convex hull
    "MeanCaliperDiameter"mean of all possible caliper diameters
    "CaliperElongation"1 (caliper width/caliper height)
  • Neighborhood properties:
  • "Neighbors"direct neighbors, given as a set of labels
    "NeighborCount"number of direct neighbors
    "ExteriorNeighbors"labels of exterior neighbors
    "ExteriorNeighborCount"number of exterior neighbors
    "InteriorNeighbors"labels of interior neighbors
    "InteriorNeighborCount"number of interior neighbors
    "AdjacentBorders"list of adjacent image borders
    "AdjacentBorderCount"number of adjacent image borders
  • Basic topological properties:
  • "Fragmentation"number of connected components minus one
    "Holes"number of holes in each component
    "Complexity"total number of components and holes minus one
    "EulerNumber"number of components minus the number of holes
  • Relational topological properties:
  • "EmbeddedComponents"embedded components, given as a list of labels
    "EmbeddedComponentCount"number of embedded components
    "EnclosingComponents"enclosing components, given as a list of labels
    "EnclosingComponentCount"number of enclosing components (nesting level)
  • General properties:
  • "Label"label of the component
    "Mask"binary mask given as an array
  • Pixel value measurements can be computed if the original image is specified in the form ComponentMeasurements[{labelmatrix,image},].
  • For images of type or , ComponentMeasurements always normalizes values to lie between 0 and 1.
  • The following pixel value measurements are available:
  • Basic pixel value measurements:
  • "Data"image data given as a flat list of channel vectors
    "IntensityData"list of image intensity values
  • Basic histogram properties, measured for each channel individually, in each component:
  • "Min"minimum value
    "Max"maximum value
    "Mean"average value
    "Median"median value
    "StandardDeviation"standard deviation
    "Total"total of all values
  • Basic image intensity properties:
  • "MinIntensity"minimum intensity
    "MaxIntensity"maximum intensity
    "MeanIntensity"average intensity
    "MedianIntensity"median intensity
    "StandardDeviationIntensity"standard deviation of the intensity distribution
    "TotalIntensity"total intensity
  • Spatial intensity measurements:
  • "Skew"asymmetry in intensity distribution
    "IntensityCentroid"coordinates of the intensity-weighted centroid
  • Statistical measurements:
  • "Entropy"data entropy (base E)
    "Energy"data energy
  • Component independent global properties:
  • "LabelCount"total number of labels
    "Dimensions"dimensions of the entire input
Introduced in 2010
| Updated in 2014