Distance Transform

A distance transform, also known as distance map or distance field, is a derived representation of a digital image. The choice of the term depends on the point of view on the object in question: whether the initial image is transformed into another representation, or it is simply endowed with an additional map or field.

The map labels each pixel of the image with the distance to the nearest obstacle pixel. A most common type of obstacle pixel is a boundary pixel in a binary image. See the image for an example of a chessboard distance transform on a binary image.

Usually the transform/map is qualified with the chosen metric. For example, one may speak of Manhattan distance transform, if the underlying metric is Manhattan distance. Common metrics are:

  • Euclidean distance
  • Taxicab geometry, also known as City block distance or Manhattan distance.
  • Chessboard distance

Applications are digital image processing (e.g., blurring effects, skeletonizing), motion planning in robotics, and even pathfinding.

Famous quotes containing the words distance and/or transform:

    “Midway the lake we took on board two manly-looking middle-aged men.... I talked with one of them, telling him that I had come all this distance partly to see where the white pine, the Eastern stuff of which our houses are built, grew, but that on this and a previous excursion into another part of Maine I had found it a scarce tree; and I asked him where I must look for it. With a smile, he answered that he could hardly tell me.”
    —Henry David Thoreau (1817–1862)

    “It is necessary to turn political crisis into armed crisis by performing violent actions that will force those in power to transform the military situation into a political situation. That will alienate the masses, who, from then on, will revolt against the army and the police and blame them for this state of things.”
    —Carlos Marighella (d. 1969)