Main Content

Region and Image Properties

Get information about the objects in an image

Image regions, also called objects, connected components, or blobs, have properties such as area, center of mass, orientation, and bounding box. To calculate these properties (and many more), you can use the Image Region Analyzer app or the regionprops function.

You can also measure pixel values of individual pixels, along a path in an image, or aggregated over an entire image.

Apps

Image Region AnalyzerBrowse and filter connected components in an image

Functions

expand all

regionpropsMeasure properties of image regions
regionprops3Measure properties of 3-D volumetric image regions
bwareaArea of objects in binary image
bwconvhullGenerate convex hull image from binary image
bweulerEuler number of binary image
bwferetMeasure Feret properties
bwperimFind perimeter of objects in binary image
impixelPixel color values
improfilePixel-value cross-sections along line segments
imcontourCreate contour plot of image data
bwdistDistance transform of binary image
bwdistgeodesicGeodesic distance transform of binary image
graydistGray-weighted distance transform of grayscale image
imhistHistogram of image data
mean2Average or mean of matrix elements
std2Standard deviation of matrix elements
corr22-D correlation coefficient
bwconncompFind and count connected components in binary image
bwareaopenRemove small objects from binary image
bwareafiltExtract objects from binary image by size
bwpropfiltExtract objects from binary image using properties
bwselectSelect objects in binary image
bwselect3Select objects in binary volume
bwlabelLabel connected components in 2-D binary image
bwlabelnLabel connected components in binary image
labelmatrixCreate label matrix from bwconncomp structure
label2rgbConvert label matrix into RGB image
poly2labelCreate label matrix from set of ROIs
poly2maskConvert region of interest (ROI) polygon to region mask

Topics

Region and Object Properties

Pixel and Path Properties

  • Pixel Values
    To determine the values of one or more pixels in an image, you can select points on an image interactively, or you can specify the pixel coordinates in an array.
  • Get Pixel Information in Image Viewer App
    Display information about the location and value of individual pixels or small neighborhoods of pixels.
  • Measure Distance Between Pixels in Image Viewer App
    Measure the length of a line segment drawn between two pixels. You can refine the position of the line segment and make multiple measurements.
  • Intensity Profile of Images
    The intensity profile of an image is the set of intensity values taken from regularly spaced points along a line or path in the image.

Image Properties

  • Image Mean, Standard Deviation, and Correlation Coefficient
    You can compute standard statistics of all pixels in a 2-D image. The statistics in the toolbox differ from their 1-D counterparts, which operate on each column of an image separately.
  • Create Image Histogram
    Create a histogram that shows the distribution of intensities in a grayscale image.
  • Distance Transform of a Binary Image
    The distance transform of a binary image shows the distance from each pixel to a nonzero pixel. There are different ways to measure the distance between two pixels.
  • Contour Plot of Image Data
    A contour is a path in an image along which intensity values are constant. Contour plots can show the outline of objects in an image or represent a 3-D shape in a 2-D plane.