vil_distance_transform.h
Go to the documentation of this file.
1 #ifndef vil_distance_transform_h_
2 #define vil_distance_transform_h_
3 //:
4 // \file
5 // \brief Compute distance function
6 // \author Tim Cootes
7 
8 #include <vil/vil_image_view.h>
9 
10 //: Compute distance function from zeros in original image
11 // Image is assumed to be filled with max_dist where there
12 // is background, and zero at the places of interest.
13 // On exit, the values are the 8-connected distance to the
14 // nearest original zero region.
15 // \relatesalso vil_image_view
17 
18 //: Compute directed distance function from zeros in original image
19 // Image is assumed to be filled with max_dist where there
20 // is background, and zero at the places of interest.
21 // On exit, the values are the 8-connected distance to the
22 // nearest original zero region above or to the left of current point.
23 // One pass of distance transform, going from low to high i,j.
24 // \relatesalso vil_image_view
26 
27 //: Compute distance function from true elements in mask
28 // On exit, the values are the 8-connected distance to the
29 // nearest original zero region (or max_dist, if that is smaller).
30 // \relatesalso vil_image_view
32  vil_image_view<float>& distance_image,
33  float max_dist);
34 
35 //: Compute distance function from zeros in original image
36 // Image is assumed to be filled with max_dist where there
37 // is background, and zero at the places of interest.
38 // On exit, the values are the 24-connected distance to the
39 // nearest original zero region. (ie considers neighbours in
40 // a +/-2 pixel region around each point).
41 // More accurate than vil_distance_transform(image), but
42 // approximately twice the processing required.
43 // \relatesalso vil_image_view
45 
46 #endif
Concrete view of image data of type T held in memory.
Definition: vil_fwd.h:13
void vil_distance_transform_one_way(vil_image_view< float > &image)
Compute directed distance function from zeros in original image.
A base class reference-counting view of some image data.
void vil_distance_transform_r2(vil_image_view< float > &image)
Compute distance function from zeros in original image.
void vil_distance_transform(vil_image_view< float > &image)
Compute distance function from zeros in original image.