1r.thin(1)                     Grass User's Manual                    r.thin(1)
2
3
4

NAME

6       r.thin   - Thins non-zero cells that denote linear features in a raster
7       map layer.
8

KEYWORDS

10       raster
11

SYNOPSIS

13       r.thin
14       r.thin help
15       r.thin input=name output=name  [iterations=integer]   [--overwrite]
16
17   Flags:
18       --overwrite
19
20   Parameters:
21       input=name
22           Name of input raster map
23
24       output=name
25           Name for output raster map
26
27       iterations=integer
28           Maximal number of iterations Default: 200
29

DESCRIPTION

31       r.thin scans the named input raster map layer and thins non-zero  cells
32       that  denote  linear features into linear features having a single cell
33       width.
34
35       r.thin will thin only the non-zero cells of the named input raster  map
36       layer within the current geographic region settings.  The cell width of
37       the thinned output raster map layer will be equal to the  cell  resolu‐
38       tion of the currently set geographic region.  All of the thinned linear
39       features will have the width of a single cell.
40
41       r.thin will create a new output raster data file containing the thinned
42       linear  features.  r.thin assumes that linear features are encoded with
43       positive values on a background of 0's in the input raster data file.
44

NOTE

46       r.thin only creates raster map layers.  You will need to run  r.to.vect
47       on the resultant raster file to create a vector (v.digit) map layer.
48
49       r.thin  may  create small spurs or "dangling lines" during the thinning
50       process.  These spurs may be  removed  (after  creating  a  vector  map
51       layer) by v.clean.
52
53       r.thin creates a 0/1 output map.
54

NOTE

56       This  code  implements the thinning algorithm described in "Analysis of
57       Thinning Algorithms Using Mathematical Morphology" by Ben-Kwei Jang and
58       Ronlad T. Chin in Transactions on Pattern Analysis and Machine Intelli‐
59       gence, vol. 12, No. 6, June 1990.  The definition Jang and Chin give of
60       the  thinning  process is "successive removal of outer layers of pixels
61       from an object while retaining any pixels whose removal would alter the
62       connectivity or shorten the legs of the sceleton."
63
64       The  sceleton  is  finally thinned when the thinning process converges;
65       i.e., "no further pixels can be removed without altering the connectiv‐
66       ity  or shortening the sceleton legs" (p. 541).  The authors prove that
67       the thinning process described always converges and produces  one-pixel
68       thick  sceletons.   The  number  of  iterations depends on the original
69       thickness of the object.  Each iteration peels off the  outside  pixels
70       from  the  object.   Therefore, if the object is <= n pixels thick, the
71       algorithm should converge in <= iterations.
72

SEE ALSO

74       g.region, r.to.vect, v.clean, v.digit, v.build
75

AUTHOR

77       Olga Waupotitsch, U.S.Army Construction Engineering Research Laboratory
78
79       The code for finding the bounding box as well as input/output code  was
80       written  by  Mike  Baba  (DBA  Systems,  1990) and Jean Ezell (USACERL,
81       1988).
82
83       Last changed: $Date: 2004/08/10 08:35:01 $
84
85       Full index
86
87
88
89GRASS 6.2.2                                                          r.thin(1)
Impressum