Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Get information about the objects in an image

Image Region Analyzer | Browse and filter connected components in an image |

`regionprops` | Measure properties of image regions |

`regionprops3` | Measure properties of 3-D volumetric image regions |

`bwarea` | Area of objects in binary image |

`bwareafilt` | Extract objects from binary image by size |

`bwconncomp` | Find connected components in binary image |

`bwconvhull` | Generate convex hull image from binary image |

`bwdist` | Distance transform of binary image |

`bwdistgeodesic` | Geodesic distance transform of binary image |

`bweuler` | Euler number of binary image |

`bwperim` | Find perimeter of objects in binary image |

`bwpropfilt` | Extract objects from binary image using properties |

`bwselect` | Select objects in binary image |

`bwselect3` | Select objects in binary image |

`graydist` | Gray-weighted distance transform of grayscale image |

`imcontour` | Create contour plot of image data |

`imhist` | Histogram of image data |

`impixel` | Pixel color values |

`improfile` | Pixel-value cross-sections along line segments |

`corr2` | 2-D correlation coefficient |

`mean2` | Average or mean of matrix elements |

`std2` | Standard deviation of matrix elements |

`bwlabel` | Label connected components in 2-D binary image |

`bwlabeln` | Label connected components in binary image |

`labelmatrix` | Create label matrix from bwconncomp structure |

**Get Pixel Information in Image Viewer App**

You can display information about the location and value of individual pixels or small neighborhoods of pixels. This information updates as you move the pointer over the image.

**Measure Distance Between Pixels in Image Viewer App**

You can measure the length of a line segment drawn between two pixels. You can refine the position of the line segment and make multiple measurements.

**Label and Measure Objects in a Binary Image**

An object in a binary image is a set of connected pixels with the same value. You can count, label, and isolate objects, and you can compute their area.

This example shows how to create a histogram that shows the distribution of intensities in a grayscale image.

**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.

**Calculate Region Properties Using Image Region Analyzer**

This example shows how to find the regions, and how to compute the region properties, of a binary image. You can sort the regions based on the properties.

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.

A region in an image has properties such as area, center of mass, orientation, and bounding box.

**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.

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.

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.