ImageMeasurements
✖
ImageMeasurements
Details and Options




- ImageMeasurements works with arbitrary 2D and 3D images.
- ImageMeasurements[image,{"prop1","prop2",…}] computes multiple properties.
- ImageMeasurements[image,"Properties"] gives names of all available properties as a list of strings.
- Position, area, and length measurements are computed in the standard image coordinate system.
- For images of type "Byte" and "Bit16", ImageMeasurements always normalizes values to lie between 0 and 1.
- The following properties can be computed on images:
- Global image properties:
-
"AspectRatio" ratio of height to width "Channels" number of image channels "ColorSpace" image color space "DataRange" range of the underlying data "DataType" underlying data type "Dimensions" dimensions of the image data "ImageDimensions" {width, height} or {width,depth,height} of the image "Interleaving" amount of interleaving of the image "SampleDepth" number of bits used to represent each pixel "Transparency" whether or not the image has an alpha channel - Basic histogram properties, measured for each channel separately:
-
"Min" minimum value "Max" maximum value "MinMax" minimum and maximum values "Mean" average value "Median" median value "StandardDeviation" standard deviation "Total" total of all values - Basic image intensity properties:
-
"MinIntensity" minimum intensity "MaxIntensity" maximum intensity "MinMaxIntensity" minimum and maximum intensity "MeanIntensity" average intensity "MedianIntensity" median intensity "StandardDeviationIntensity" standard deviation of the intensity distribution "TotalIntensity" total intensity - Contour properties:
-
"Contours" lines describing the component boundary "ContourHierarchy" topological nesting of the contours "PerimeterPositions" sorted positions of the perimeter elements - 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 - The following format specifications can be used:
-
Automatic determine the output automatically "Association" format the result as an Association "Dataset" format the result as a Dataset "List" format the result as a List "RuleList" format the result as a list of Rule expressions - ImageMeasurements takes a Masking option. The default setting is Masking->All. The Masking option is ignored when returning global image properties.

Examples
open allclose allBasic Examples (2)Summary of the most common use cases

https://wolfram.com/xid/05fos89qur-m5fvfo

https://wolfram.com/xid/05fos89qur-ltosk4


https://wolfram.com/xid/05fos89qur-mjlrnx


https://wolfram.com/xid/05fos89qur-d1npoa

Standard deviation of pixel intensity in a 3D image:

https://wolfram.com/xid/05fos89qur-p2z0qm

Scope (9)Survey of the scope of standard use cases
Basic Uses (6)
Test an image to see if it has an alpha channel:

https://wolfram.com/xid/05fos89qur-dq3moz

Compute multiple properties of an image:

https://wolfram.com/xid/05fos89qur-czqghs

Compute a property of multiple images:

https://wolfram.com/xid/05fos89qur-nir1jp

Compute multiple properties of multiple images:

https://wolfram.com/xid/05fos89qur-ja78al


https://wolfram.com/xid/05fos89qur-66inls

Compare to "Dimensions" property which gives the data dimensions including channels:

https://wolfram.com/xid/05fos89qur-m1bnun

Extract pixel value ranges for each channel:

https://wolfram.com/xid/05fos89qur-k0r9v

Output Format (3)
Format the properties as an Association:

https://wolfram.com/xid/05fos89qur-3gz6t4


https://wolfram.com/xid/05fos89qur-zxz3gc

Return a Dataset:

https://wolfram.com/xid/05fos89qur-yqe5fl

Options (2)Common values & functionality for each option
Masking (1)
CornerNeighbors (1)
By default, ImageMeasurements assumes 8-connectivity:

https://wolfram.com/xid/05fos89qur-cs0d8

https://wolfram.com/xid/05fos89qur-koegg

https://wolfram.com/xid/05fos89qur-g1zrhi

Use CornerNeighborsFalse to assume 4-connectivity:

https://wolfram.com/xid/05fos89qur-kqaz37

https://wolfram.com/xid/05fos89qur-5zya1f

Applications (5)Sample problems that can be solved with this function
Multiply the gradient magnitude of an image by its maximum value, so that the pixels with the largest values are white:

https://wolfram.com/xid/05fos89qur-2u7yih


https://wolfram.com/xid/05fos89qur-xopgc4

Detect whether an image has constant pixel values:

https://wolfram.com/xid/05fos89qur-2fefxp

Ordinal measurement descriptor of an image:

https://wolfram.com/xid/05fos89qur-3ua00s

https://wolfram.com/xid/05fos89qur-40cxka

Compute the centroid distance function for the shapes present in an image:

https://wolfram.com/xid/05fos89qur-42yq2v
Extract the list of shapes from the image:

https://wolfram.com/xid/05fos89qur-sxzk3g

Define a function that parametrizes the distance from the contour centroid:

https://wolfram.com/xid/05fos89qur-16223t
Plot the centroid distance function for some of the shapes:

https://wolfram.com/xid/05fos89qur-j4ss2t

Define a feature vector sampling the centroid distance:

https://wolfram.com/xid/05fos89qur-ha1zw7
Use the feature vectors to cluster the shapes:

https://wolfram.com/xid/05fos89qur-0bwxrf

Compute the Fourier descriptors of a shape:

https://wolfram.com/xid/05fos89qur-je032f
Extract the contour coordinates and compute the Fourier transform of their complex representation:

https://wolfram.com/xid/05fos89qur-med4tp

https://wolfram.com/xid/05fos89qur-eii3bd

https://wolfram.com/xid/05fos89qur-i7a4g2

The original shape can be reconstructed using only a portion of the descriptors:

https://wolfram.com/xid/05fos89qur-nv1wui

https://wolfram.com/xid/05fos89qur-8rgxcj

Control the contour smoothness by interactively setting the number of descriptors:

https://wolfram.com/xid/05fos89qur-ggfb7o

Wolfram Research (2012), ImageMeasurements, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageMeasurements.html (updated 2022).
Text
Wolfram Research (2012), ImageMeasurements, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageMeasurements.html (updated 2022).
Wolfram Research (2012), ImageMeasurements, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageMeasurements.html (updated 2022).
CMS
Wolfram Language. 2012. "ImageMeasurements." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/ImageMeasurements.html.
Wolfram Language. 2012. "ImageMeasurements." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/ImageMeasurements.html.
APA
Wolfram Language. (2012). ImageMeasurements. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageMeasurements.html
Wolfram Language. (2012). ImageMeasurements. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageMeasurements.html
BibTeX
@misc{reference.wolfram_2025_imagemeasurements, author="Wolfram Research", title="{ImageMeasurements}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/ImageMeasurements.html}", note=[Accessed: 05-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_imagemeasurements, organization={Wolfram Research}, title={ImageMeasurements}, year={2022}, url={https://reference.wolfram.com/language/ref/ImageMeasurements.html}, note=[Accessed: 05-June-2025
]}