WLJS LogoWLJS Notebook

ComponentMeasurements

ComponentMeasurements[{image,lmat},"prop"] computes the property "prop" for components of image indicated by the label matrix lmat.

ComponentMeasurements[image,"prop"] computes the property "prop" for connected components of image.

ComponentMeasurements[…,"prop",crit] only returns measurements for components that satisfy the criterion crit.

ComponentMeasurements[…,"prop",crit,format] formats the result according to the output specification format.

Examples

ComponentMeasurements[Binarize[img], "Area"]
(* {1 -> 245, 2 -> 132, ...} *)
ComponentMeasurements[img, {"Centroid", "BoundingBox"}]

Please visit the official Wolfram Language Reference for more details.

On this page