RETRO commands


PROGRAM NAME

vdistance - Compute Distance from the Boundary in a Two-Valued Image (K1)

DESCRIPTION

vdistance Computes the distance from the nearest boundary point.

The distance transform uses the following iterative algorithm :


U(m,n) : original image. This image contains only two gray levels, 0 for the background, and any other value for the objects.


Uk(i,j): image after k iterations.


U0(m,n)= U(m,n), and for k= 1, 2, 3, ...


Uk(m,n)= U0(m,n)+min{Uk-1(i,j);((i,j):dist(m,n;i,j)<= 1)},

dist(m,n;i,j) is the distance between (m,n) and (i,j).

dist(i,j-1;i,j) = dist(i,j+1;i,j) =dist(i-1,j;i,j) =dist(i+1,j;i,j) = 1.

dist(i-1,j-1;i,j) = dist(i+1,j-1;i,j) =dist(i-1,j+1;i,j) =dist(i+1,j+1;i,j) = 2.

The transform is completed when k equals the maximum thickness of the region. That is, when Uk+1 equals Uk.


The distance image can be used to extract edges or the medial axis (form of skeleton).

Set of functions that can be used with vdistance:

vmediaxis Customizes the medial axis from the distance image.

\fBkthresh Generate a binary image.

ADVICE: For this routine, the image must be a byte binary image, with the gray-level value 0 for the background.
It is advisable to perform a threshold operation prior to using vdistance.

REQUIRED ARGUMENTS

-i
type: infile
desc: input image
-o
type: outfile
desc: output image

OPTIONAL ARGUMENTS

none

EXAMPLES

vdistance -i image1 -o image2
Computes the distance from the nearest boundary point.
For this routine, the image has to be a byte binary image, with the gray-level value 0 for the background. So it is strongly advisable to perform thresholding before running vdistance.

SEE ALSO

kclip

RESTRICTIONS

vdistance works only on BYTE binary images which background value is zero.

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.