v.rectify.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <h2>DESCRIPTION</h2>
  2. <em>v.rectify</em> uses control points to calculate a 2D or 3D
  3. transformation matrix based on a first, second, or third order
  4. polynomial and then converts x,y(, z) coordinates to standard map
  5. coordinates for each object in the vector map. The result is a vector
  6. map with a transformed coordinate system (i.e., a different coordinate
  7. system than before it was rectified).
  8. <p>
  9. The <em>-o</em> flag enforces orthogonal rotation (currently for 3D only)
  10. where the axes remain orthogonal to each other, e.g. a cube with right
  11. angles remains a cube with right angles after transformation. This is not
  12. guaranteed even with affine (1<sup>st</sup> order) 3D transformation.
  13. <p>
  14. Great care should be taken with the placement of Ground Control Points.
  15. For 2D transformation, the control points must not lie on a line, instead
  16. 3 of the control points must form a triangle. For 3D transformation, the
  17. control points must not lie on a plane, instead 4 of the control points
  18. must form a triangular pyramid. It is recommended to investigate RMS
  19. errors and deviations of the Ground Control Points prior to transformation.
  20. <p>
  21. 2D Ground Control Points can be identified in
  22. <em><a href="g.gui.gcp.html">g.gui.gcp</a></em>.
  23. <p>
  24. 3D Ground Control Points must be provided in a text file with the
  25. <b>points</b> option. The 3D format is equivalent to the format for 2D
  26. ground control points with an additional third coordinate:
  27. <div class="code"><pre>
  28. x y z east north height status
  29. </pre></div>
  30. where <em>x, y, z</em> are source coordinates, <em>east, north, height</em>
  31. are target coordinates and status (0 or 1) indicates whether a given
  32. point should be used. Numbers must be separated by space and must use a
  33. point (.) as decimal separator.
  34. <p>
  35. If no <b>group</b> is given, the rectified vector will be written to
  36. the current mapset. If a <b>group</b> is given and a target has been
  37. set for this group with <em><a href="i.target.html">i.target</a></em>,
  38. the rectified vector will be written to the target location and mapset.
  39. <h3>Coordinate transformation and RMSE</h3>
  40. <p>The desired order of transformation (1, 2, or 3) is selected with the
  41. <b>order</b> option.
  42. <em>v.rectify</em> will calculate the RMSE if the <b>-r</b> flag is
  43. given and print out statistcs in tabular format. The last row gives a
  44. summary with the first column holding the number of active points,
  45. followed by average deviations for each dimension and both forward and
  46. backward transformation and finally forward and backward overall RMSE.
  47. <h4>2D linear affine transformation (1st order transformation)</h4>
  48. <dl>
  49. <dd> x' = a1 + b1 * x + c1 * y
  50. <dd> y' = a2 + b2 * x + c2 * y
  51. </dl>
  52. <h4>3D linear affine transformation (1st order transformation)</h4>
  53. <dl>
  54. <dd> x' = a1 + b1 * x + c1 * y + d1 * z
  55. <dd> y' = a2 + b2 * x + c2 * y + d2 * z
  56. <dd> z' = a3 + b3 * x + c3 * y + d3 * z
  57. </dl>
  58. The a,b,c,d coefficients are determined by least squares regression
  59. based on the control points entered. This transformation
  60. applies scaling, translation and rotation. It is NOT a
  61. general purpose rubber-sheeting, nor is it ortho-photo
  62. rectification using a DEM, not second order polynomial,
  63. etc. It can be used if (1) you have geometrically correct
  64. data, and (2) the terrain or camera distortion effect can
  65. be ignored.
  66. <h4>Polynomial Transformation Matrix (2nd, 3d order transformation)</h4>
  67. <em>v.rectify</em> uses a first, second, or third order transformation
  68. matrix to calculate the registration coefficients. The minimum number
  69. of control points required for a 2D transformation of the selected order
  70. (represented by n) is
  71. <dl>
  72. <dd>((n + 1) * (n + 2) / 2)
  73. </dl>
  74. or 3, 6, and 10 respectively. For a 3D transformation of first, second,
  75. or third order, the minimum number of required control points is 4, 10,
  76. and 20, respectively. It is strongly recommended that more than the
  77. minimum number of points be identified to allow for an overly-determined
  78. transformation calculation which will generate the Root Mean Square (RMS)
  79. error values for each included point. The polynomial equations are
  80. determined using a modified Gaussian elimination method.
  81. <h2>SEE ALSO</h2>
  82. The GRASS 4 <em>
  83. <a href="https://grass.osgeo.org/gdp/imagery/grass4_image_processing.pdf">Image
  84. Processing manual</a></em>
  85. <p>
  86. <em>
  87. <a href="g.gui.gcp.html">g.gui.gcp</a>,
  88. <a href="i.group.html">i.group</a>,
  89. <a href="i.rectify.html">i.rectify</a>,
  90. <a href="i.target.html">i.target</a>,
  91. <a href="m.transform.html">m.transform</a>,
  92. <a href="r.proj.html">r.proj</a>,
  93. <a href="v.proj.html">v.proj</a>,
  94. <a href="v.transform.html">v.transform</a>,
  95. </em>
  96. <br>
  97. <em>
  98. <a href="wxGUI.gcp.html">Manage Ground Control Points</a>
  99. </em>
  100. <h2>AUTHOR</h2>
  101. Markus Metz
  102. <p>
  103. based on <a href="i.rectify.html">i.rectify</a>
  104. <!--
  105. <p>
  106. <i>Last changed: $Date$</i>
  107. -->