Distance Transform Operator


This operator maps a binary image into a gray level image. The pixel values of the gray level image represent a distance metric from the border of its connected component.

This operator can map distances based on three metrics: euclidean, cityblock (4-connected) and chessboard (8-connected) distances.

The images below show the operator when applied on an euclidean disc.


Original Image and its Distance Transform with Euclidean metric


with cityblock and chessboard metric

One important application of this operator in conjunction with the Threshold operator is to simulate the Erosion operator using a disk structure element of a given radius.

Below is the Distance Transform image using the cityblock metric thresholded at the value 41 which is exactly the same as the erosion by a cityblock disk of radius 41.


Original image eroded by a cityblock disk of radius 41



Back to the initial page