distmap {EBImage}R Documentation

Distance map transform of binary images

Description

The function computes a distance map transformation of a binary image, i.e. of an image whose pixels are labeled as foreground and background. In the distance map, each pixel contains the distance from that pixel to the nearest background pixel, or to the border of the image. Note: this is a trivial brute force implementation. Please look elsewhere for efficient implementations; see also the references.

Usage

  ## S4 method for signature 'Image':
  distmap(x, t=0.05, exact=FALSE, bg=0.05, ...)

Arguments

x A Grayscale object of Image. x is considered as a binary image, consisting of 0's for background and all other values for foreground.
t A numeric vector of length 1, the background threshold in the range [0,1). Pixels with intensity smaller than t are considered as background.
bg A numeric numeric vector of length 1, the allowed minimum of the fraction of background pixels in the image. Deprecated.
exact ???
... Further arguments.

Value

A Grayscale object of Image with pixels containing the floor values of their distances to the nearest background points.

Author(s)

Oleg Sklyar, osklyar@ebi.ac.uk, 2006

References

2D Euclidean Distance Transform Algorithms: A Comparative Survey. R. Fabbri, L. da F. Costa, J.C. Torelli and O.M. Bruno. ACM Computing Surveys, Vol. 40, No. 1, Article 2 (Feb. 2008).

The Image Processing Handbook. John Russ. 5th edition, 2006, CRC Press.

VIGRA by Ullrich Koethe: http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra

See Also

Image, watershed, thresh, propagate

Examples

  ## Not run: see ?watershed for an example

[Package EBImage version 2.6.0 Index]