1r.thin(1) Grass User's Manual r.thin(1)
2
3
4
6 r.thin - Thins non-zero cells that denote linear features in a raster
7 map layer.
8
10 raster
11
13 r.thin
14 r.thin help
15 r.thin input=name output=name [iterations=integer] [--overwrite]
16 [--verbose] [--quiet]
17
18 Flags:
19 --overwrite
20 Allow output files to overwrite existing files
21
22 --verbose
23 Verbose module output
24
25 --quiet
26 Quiet module output
27
28 Parameters:
29 input=name
30 Name of input raster map
31
32 output=name
33 Name for output raster map
34
35 iterations=integer
36 Maximal number of iterations
37 Default: 200
38
40 r.thin scans the named input raster map layer and thins non-zero cells
41 that denote linear features into linear features having a single cell
42 width.
43
44 r.thin will thin only the non-zero cells of the named input raster map
45 layer within the current geographic region settings. The cell width of
46 the thinned output raster map layer will be equal to the cell resolu‐
47 tion of the currently set geographic region. All of the thinned linear
48 features will have the width of a single cell.
49
50 r.thin will create a new output raster data file containing the thinned
51 linear features. r.thin assumes that linear features are encoded with
52 positive values on a background of 0's in the input raster data file.
53
55 r.thin only creates raster map layers. You will need to run r.to.vect
56 on the resultant raster map to create a vector (v.digit) map layer.
57
58 r.thin may create small spurs or "dangling lines" during the thinning
59 process. These spurs may be removed (after creating a vector map
60 layer) by v.clean.
61
62 r.thin creates a 0/1 output map.
63
65 This code implements the thinning algorithm described in "Analysis of
66 Thinning Algorithms Using Mathematical Morphology" by Ben-Kwei Jang and
67 Ronlad T. Chin in Transactions on Pattern Analysis and Machine Intelli‐
68 gence, vol. 12, No. 6, June 1990. The definition Jang and Chin give of
69 the thinning process is "successive removal of outer layers of pixels
70 from an object while retaining any pixels whose removal would alter the
71 connectivity or shorten the legs of the sceleton."
72
73 The sceleton is finally thinned when the thinning process converges;
74 i.e., "no further pixels can be removed without altering the connectiv‐
75 ity or shortening the sceleton legs" (p. 541). The authors prove that
76 the thinning process described always converges and produces one-pixel
77 thick sceletons. The number of iterations depends on the original
78 thickness of the object. Each iteration peels off the outside pixels
79 from the object. Therefore, if the object is <= n pixels thick, the
80 algorithm should converge in <= iterations.
81
83 g.region, r.to.vect, v.clean, v.digit, v.build
84
86 Olga Waupotitsch, U.S.Army Construction Engineering Research Laboratory
87
88 The code for finding the bounding box as well as input/output code was
89 written by Mike Baba (DBA Systems, 1990) and Jean Ezell (USACERL,
90 1988).
91
92 Last changed: $Date: 2006-12-13 15:21:43 +0100 (Wed, 13 Dec 2006) $
93
94 Full index
95
96 © 2003-2008 GRASS Development Team
97
98
99
100GRASS 6.3.0 r.thin(1)