Gray-weighted distance transform of grayscale image
T = graydist(A,mask)
T = graydist(A,C,R)
T = graydist(A,ind)
T = graydist(...,method)
an alternate distance metric.
T = graydist(...,
the chamfer weights that are assigned to the local neighborhood during
outward propagation. Each pixel's contribution to the geodesic time
is based on the chamfer weight in a particular direction multiplied
by the pixel intensity.
Logical image the same size as
Numeric vectors that contain the positive integer row and column
coordinates of the seed locations. Coordinate values are valid
Numeric vector of positive integer, linear indices of seed locations.
Type of distance metric.
Array the same size as
A can be numeric or logical, and it must
mask is a logical array of the same
ind are numeric vectors that contain positive
T is an array of the same size
A. If the input numeric type of
double. If the
input is any other numeric type, the output
Matrices generated by the
have equal row, column and diagonal sums. The minimum path between
the upper left and lower right corner is along the diagonal. The following
example demonstrates how the
computes this path:
A = magic(3) T1 = graydist(A,1,1); T2 = graydist(A,3,3); T = T1 + T2
A = 8 1 6 3 5 7 4 9 2 T = 10 11 17 13 10 13 17 17 10
As expected, there is a constant-value minimum path along the diagonal.
graydist uses the geodesic time algorithm
described in Soille, P., Generalized geodesy via geodesic
time,, Pattern Recognition Letters, vol.15, December 1994;
The basic equation for geodesic time along a path is: