r.thin.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <h2>DESCRIPTION</h2>
  2. <em>r.thin</em> scans the named <em>input</em> raster map
  3. layer and thins non-zero cells that denote linear features
  4. into linear features having a single cell width.
  5. <p>
  6. <em>r.thin</em> will thin only the non-zero cells of the
  7. named <em>input</em> raster map layer within the current
  8. geographic region settings. The cell width of the thinned
  9. <em>output</em> raster map layer will be equal to the cell
  10. resolution of the currently set geographic region. All of
  11. the thinned linear features will have the width of a single
  12. cell.
  13. <p>
  14. <em>r.thin</em> will create a new <em>output</em> raster
  15. data file containing the thinned linear features.
  16. <em>r.thin</em> assumes that linear features are encoded
  17. with positive values on a background of 0's in the
  18. <em>input</em> raster data file.
  19. <h2>NOTE</h2>
  20. <em>r.thin</em> only creates raster map layers. The user will need to run
  21. <em><a href="r.to.vect.html">r.to.vect</a></em>
  22. on the resultant raster map to create a vector
  23. (<em><a href="wxGUI.Vector_Digitizer.html">wxGUI vector digitizer</a></em>) map layer.
  24. <p><em>r.thin</em> may create small spurs or "dangling lines"
  25. during the thinning process. These spurs may be removed
  26. (after creating a vector map layer) by
  27. <em><a href="v.clean.html">v.clean</a></em>.
  28. <p>
  29. <em>r.thin</em> creates a 0/1 output map.
  30. <h2>NOTE</h2>
  31. This code implements the thinning algorithm described in
  32. "Analysis of Thinning Algorithms Using Mathematical
  33. Morphology" by Ben-Kwei Jang and Ronlad T. Chin in
  34. <em>Transactions on Pattern Analysis and Machine
  35. Intelligence</em>, vol. 12, No. 6, June 1990. The
  36. definition Jang and Chin give of the thinning process is
  37. "successive removal of outer layers of pixels from an
  38. object while retaining any pixels whose removal would alter
  39. the connectivity or shorten the legs of the sceleton."
  40. <p>The sceleton is finally thinned when the thinning process
  41. converges; i.e., "no further pixels can be removed without
  42. altering the connectivity or shortening the sceleton legs"
  43. (p. 541). The authors prove that the thinning process
  44. described always converges and produces one-pixel thick
  45. sceletons. The number of iterations depends on the
  46. original thickness of the object. Each iteration peels off
  47. the outside pixels from the object. Therefore, if the
  48. object is &lt;= n pixels thick, the algorithm should
  49. converge in &lt;= iterations.
  50. <h2>SEE ALSO</h2>
  51. <em>
  52. <a href="g.region.html">g.region</a>,
  53. <a href="r.to.vect.html">r.to.vect</a>,
  54. <a href="v.clean.html">v.clean</a>,
  55. <a href="wxGUI.Vector_Digitizer.html">wxGUI vector digitizer</a>,
  56. <a href="v.build.html">v.build</a>
  57. </em>
  58. <h2>AUTHOR</h2>
  59. Olga Waupotitsch, U.S.Army Construction Engineering Research Laboratory
  60. <p>The code for finding the bounding box as well as input/output code
  61. was written by Mike Baba (DBA Systems, 1990) and Jean Ezell (USACERL, 1988).
  62. <p><i>Last changed: $Date$</i>