Debian Codegraph @

imagery/i.rectify/i.rectify.html

raw
1 <h2>DESCRIPTION</h2>
2
3 <em>i.rectify</em> uses the control points included in the source data
4 or identified with the
5 <a href="wxGUI.gcp.html">Ground Control Points Manager</a>
6 to calculate a transformation matrix and then converts x,y
7 cell coordinates to standard map coordinates for each pixel
8 in the image. The result is a planimetric image with a
9 transformed coordinate system (i.e., a different coordinate
10 system than before it was rectified). Supported transformation methods
11 are first, second, and third order polynomial and thin plate spline.
12 Thin plate spline is recommended for ungeoreferenced satellite imagery
13 where ground control points (GCPs) are included. Examples are
14 <a href="https://gdal.org/en/stable/drivers/raster/l1b.html">NOAA/AVHRR</a>
15 and <a href="https://gdal.org/en/stable/drivers/raster/esat.html#raster-esat">ENVISAT</a>
16 imagery which include throusands of GCPs.
17
18 <p>
19 If no ground control points are available, the
20 <a href="wxGUI.gcp.html">Ground Control Points Manager</a>
21 must be run before <em>i.rectify</em>. An image must be
22 georeferenced before it can reside in a standard coordinate
23 project, and therefore be analyzed with the other map
24 layers there. Upon
25 completion of <em>i.rectify</em>, the rectified image is
26 deposited in the target standard coordinate project. This
27 project is selected using
28
29 <em><a href="i.target.html">i.target</a></em>.
30
31 <p>More than one raster map may be rectified at a time. Each cell file
32 should be given a unique output file name. The rectified image or
33 rectified raster maps will be located in the target project when the
34 program is completed. The original unrectified files are not modified
35 or removed.
36
37 <p>If the <b>-c</b> flag is used, <em>i.rectify</em> will only rectify that
38 portion of the image or raster map that occurs within the chosen window
39 region in the target project, and only that portion of the cell
40 file will be relocated in the target database. It is
41 important therefore, to check the current mapset window in
42 the target project if the <b>-c</b> flag is used.
43
44 <p>
45 If you are rectifying a file with plans to patch it to
46 another file using the GRASS program <em>r.patch</em>,
47 choose option number one, the current window in the target
48 project. This window, however, must be the default window
49 for the target project. When a file being rectified is
50 smaller than the default window in which it is being
51 rectified, NULLs are added to the rectified file. Patching
52 files of the same size that contain NULL data,
53 eliminates the possibility of a no-data line in the patched
54 result. This is because, when the images are patched, the
55 NULLs in the image are "covered" with non-NULL pixel
56 values. When rectifying files that are going to be
57 patched, rectify all of the files using the same default
58 window.
59
60 <h3>Coordinate transformation</h3>
61 <p>The desired order of transformation (1, 2, or 3) is selected with the
62 <b>order</b> option.
63
64 The program will calculate the RMSE and check the required number of points.
65
66 <h4>Linear affine transformation (1st order transformation)</h4>
67
68 <dl>
69 <dd> x' = ax + by + c
70 <dd> y' = Ax + By + C
71 </dl>
72
73 The a, b, c, A, B, C are determined by least squares regression
74 based on the control points entered. This transformation
75 applies scaling, translation and rotation. It is NOT a
76 general purpose rubber-sheeting like TPS, nor is it ortho-photo
77 rectification using a DEM, not second order polynomial,
78 etc. It can be used if (1) you have geometrically correct
79 images, and (2) the terrain or camera distortion effect can
80 be ignored.
81
82 <h4>Polynomial Transformation Matrix (2nd, 3d order transformation)</h4>
83
84 <em>i.rectify</em> uses a first, second, or third order transformation
85 matrix to calculate the registration coefficients. The number
86 of control points required for a selected order of transformation
87 (represented by n) is
88
89 <dl>
90 <dd>((n + 1) * (n + 2) / 2)
91 </dl>
92
93 or 3, 6, and 10 respectively. It is strongly recommended
94 that one or more additional points be identified to allow
95 for an overly-determined transformation calculation which
96 will generate the Root Mean Square (RMS) error values for
97 each included point. The RMS error values for all the
98 included control points are immediately recalculated when
99 the user selects a different transformation order from the
100 menu bar. The polynomial equations are performed using a
101 modified Gaussian elimination method.
102
103 <h4>Thin plate spline (TPS) transformation</h4>
104 TPS transformation is selected with the <b>-t</b> flag. This method of
105 coordinate transformation is recommended for satellite imagery where
106 hundreds or thousands of GCPs are included, and for historical printed
107 or scanned maps with unknown georeferencing and/or known localized
108 distortions.
109 <p>
110 TPS combines a linear affine transformation with individual
111 transformation coefficients for each GCP, using the radial basis kernel
112 function with the distance <em>dist</em> between any two points:
113
114 <dl>
115 <dd>dist<sup>2</sup> * log(dist)
116 </dl>
117
118 As a consequence, localized distortions can be removed with TPS
119 transformation. For example, scan line sensors will have due to the
120 changing viewing angle larger distortions towards the end points of the
121 scan line than at the center of the scan line. Even higher order
122 polynomial transformations are not able to remove these locally
123 different distortions, but TPS transformation can. For best results,
124 TPS requires an even and, for localized distortions, dense spacing of
125 GCPs.
126
127 <h3>Resampling method</h3>
128 <p>The rectified data is resampled with one of seven different methods:
129 <em>nearest</em>, <em>bilinear</em>, <em>cubic</em>, <em>lanczos</em>,
130 <em>bilinear_f</em>, <em>cubic_f</em>, or <em>lanczos_f</em>.
131 <p>The <em>method=nearest</em> method, which performs a nearest neighbor assignment,
132 is the fastest of the resampling methods. It is primarily used for
133 categorical data such as a land use classification, since it will not change
134 the values of the data cells. The <em>method=bilinear</em> method determines the new
135 value of the cell based on a weighted distance average of the 4 surrounding
136 cells in the input map. The <em>method=cubic</em> method determines the new value of
137 the cell based on a weighted distance average of the 16 surrounding cells in
138 the input map. The <em>method=lanczos</em> method determines the new value of
139 the cell based on a weighted distance average of the 25 surrounding cells in
140 the input map.
141 <p>The bilinear, cubic and lanczos interpolation methods are most appropriate for
142 continuous data and cause some smoothing. These options should not be used
143 with categorical data, since the cell values will be altered.
144 <p>In the bilinear, cubic and lanczos methods, if any of the surrounding cells used to
145 interpolate the new cell value are NULL, the resulting cell will be NULL, even if
146 the nearest cell is not NULL. This will cause some thinning along NULL borders,
147 such as the coasts of land areas in a DEM. The <em>bilinear_f</em>, <em>cubic_f</em>
148 and <em>lanczos_f</em> interpolation methods can be used if thinning along NULL edges is
149 not desired. These methods "fall back" to simpler interpolation methods along NULL borders.
150 That is, from lanczos to cubic to bilinear to nearest.
151 <p>If nearest neighbor assignment is used, the output map has the same raster
152 format as the input map. If any of the other interpolations is used, the
153 output map is written as floating point.
154
155 <p><!--
156 Note: In interactive mode it is possible to define a new file name
157 for the target images. This is (currently) not provided in command line
158 mode.
159 -->
160
161 <h2>NOTES</h2>
162
163 If <em>i.rectify</em> starts normally but after some time the following text is seen:
164 <br><code>
165 ERROR: Error writing segment file
166 </code><br>
167 the user may try the <b>-c</b> flag or the module needs more free space
168 on the hard drive.
169
170 <h2>SEE ALSO</h2>
171
172 The GRASS 4 <em>
173 <a href="https://grass.osgeo.org/gdp/imagery/grass4_image_processing.pdf">Image
174 Processing manual</a></em>
175
176 <p><em>
177 <a href="m.transform.html">m.transform</a>,
178 <a href="r.proj.html">r.proj</a>,
179 <a href="v.proj.html">v.proj</a>,
180 <a href="i.group.html">i.group</a>,
181 <a href="i.target.html">i.target</a>
182 </em>
183 <br>
184 <em>
185 <a href="wxGUI.gcp.html">Ground Control Points Manager</a>
186 </em>
187
188 <h2>AUTHORS</h2>
189
190 William R. Enslin,
191 Michigan State University,
192 Center for Remote Sensing
193
194 <p>Modified for GRASS 5.0 by:<br>
195 Luca Palmeri ([email protected])<br>
196 Bill Hughes<br>
197 Pierre de Mouveaux ([email protected])
198 <br>
199 CMD mode by Bob Covill