ImageForestingComponents

ImageForestingComponents[image]
finds a segmentation of image, returning an integer matrix in which positive integers label different components.

ImageForestingComponents[image,marker]
tries to find a segmentation into components that include pixels indicated by marker.

ImageForestingComponents[image,marker,r]
finds components that are connected at a pixel scale given by r.

DetailsDetails

  • ImageForestingComponents[image,marker] generates a graph-based segmentation of image, starting with the pixels specified by marker.
  • ImageForestingComponents works with 3D as well as 2D images.
  • In ImageForestingComponents[image,marker], marker can be given either as an image, a graphics object, or a list of points in the standard image coordinate system, where x runs from 0 to image width and y runs from 0 to image height, and position corresponds to the bottom-left corner of the image.
  • Nonzero elements of marker are treated as weighted seeds for the segmentation.
  • ImageForestingComponents produces a complete segmentation, assigning each pixel to a foreground component.
  • ImageForestingComponents works with binary, grayscale, and arbitrary multichannel images.
  • ImageForestingComponents[image,marker,r] generates a segmentation where pixels in each component are connected within the radius r. The default radius setting is 2.
  • ImageForestingComponents[image,marker,{r1,r2}] specifies different radii in vertical and horizontal directions.

Background
Background

  • ImageForestingComponents returns an array of integers obtained through application of the image foresting transform (IFT). This transform provides a way to segment (separate) images into indexed components, each of which contains pixels having a similar color. The image foresting transform operates by constructing a graph in which neighboring pixels are joined by edges having weights proportional to the similarity of their colors and then partitioning this graph.
  • Like other segmentation functions, ImageForestingComponents returns a label array in which each pixel is replaced by an integer corresponding to the component in which that pixel appears. A characteristic of ImageForestingComponents is that every pixel is assigned to some component. This means there is no separate background. Unlike some other segmentation schemes, ImageForestingComponents works in full color space without converting to intensity values.
  • The image foresting transform is particularly good at segmenting images in which there is a high contrast between the segments to be separated.
  • Other image segmentation functions include MorphologicalComponents and ClusteringComponents. The array returned by ImageForestingComponents may be visualized using Colorize and related functions.
Introduced in 2010
(8.0)
| Updated in 2014
(10.0)