| 1 |
This file contains commented 'ortho_rectify.rst' debug output |
| 2 |
(appears when compiling i.ortho.photo with DEBUG3 option) to |
| 3 |
explain the algorithm of ortho rectificaton. |
| 4 |
|
| 5 |
|
| 6 |
After launching photo.rectify following procedure is performed: |
| 7 |
|
| 8 |
main.c |
| 9 |
Looking for elevation file in group: DSCN0542 |
| 10 |
Block elevation: dtm.10meters in dtm.10meters |
| 11 |
Starting exec_rectify... |
| 12 |
Looking for elevation file in group: DSCN0542 |
| 13 |
Block elevation: dtm.10meters in dtm.10meters |
| 14 |
Starting exec_rectify... |
| 15 |
|
| 16 |
---------------------------------------------------------------------- |
| 17 |
exec.c |
| 18 |
I look for files to ortho rectify |
| 19 |
ORTHO RECTIFYING: |
| 20 |
NAME DSCN0542b |
| 21 |
MAPSET michelazzi |
| 22 |
RESULT 542nikon02 |
| 23 |
---------------------------------------------------------------------- |
| 24 |
target.c |
| 25 |
select_current_env... |
| 26 |
---------------------------------------------------------------------- |
| 27 |
exec.c |
| 28 |
reading was fine... |
| 29 |
Starting the rectification... |
| 30 |
---------------------------------------------------------------------- |
| 31 |
rectify.c |
| 32 |
Open temp elevation file: |
| 33 |
target window: rs=723 cs=884 n=5102422.000000 s=5101699.000000 w=1651900.000000 e=1652784.000000 |
| 34 |
|
| 35 |
NOTES: the size of target window is defined in photo.rectify/global.h |
| 36 |
#define TIE_ROW_DIST 128 |
| 37 |
#define TIE_COL_DIST 128 |
| 38 |
#define NROWS 128 |
| 39 |
#define NCOLS 128 |
| 40 |
-> 128 is too large for alpine regions! MN 2003 |
| 41 |
|
| 42 |
---------------------------------------------------------------------- |
| 43 |
aver_z.c |
| 44 |
In ortho meanz = 245.609802 |
| 45 |
[...] |
| 46 |
In ortho meanz = 6101.599517 |
| 47 |
In ortho meanz = 6351.202117 |
| 48 |
In ortho aver_z = 254.048085 |
| 49 |
|
| 50 |
NOTES: calculates average height of all ground control points, |
| 51 |
in case no ground control point available, the average height is used in 'rectify.c' (z2) |
| 52 |
-> this may lead to problems ? MN 2003 |
| 53 |
---------------------------------------------------------------------- |
| 54 |
rectify.c |
| 55 |
elev layer = dtm.10meters mapset elev = dtm.10meters elevfd = 5 |
| 56 |
Number Tie_Points: y_ties 24 x_ties 29 |
| 57 |
Tie_Point row 0 col 0 |
| 58 |
east 1651901.000000 north 5102421.000000 |
| 59 |
row2 = 1.000000 col2 = 1.000000 |
| 60 |
r2 = 1 c2 = 1 |
| 61 |
elevbuf[c2] = 406.303589 |
| 62 |
e2 = 1651901.000000 n2 = 5102421.000000 z2 = 406.303589 |
| 63 |
XC = 1652204.875702 YC = 5101789.573258 ZC = 102.602297 |
| 64 |
omega = 0.062981 phi = 0.268649 kappa = 0.280221 |
| 65 |
|
| 66 |
NOTES: the rectification is done with tiles |
| 67 |
---------------------------------------------------------------------- |
| 68 |
../libes/orthoref.c |
| 69 |
After ortho ref (photo cords): ex = 11.520612 nx = -49.332506 |
| 70 |
---------------------------------------------------------------------- |
| 71 |
../libes/georef.c |
| 72 |
After geo ref: ex = -942.577786 nx = -1679.150555 |
| 73 |
---------------------------------------------------------------------- |
| 74 |
rectify.c |
| 75 |
Tie_Point row 0 col 1 |
| 76 |
east 1651933.000000 north 5102421.000000 |
| 77 |
row2 = 1.000000 col2 = 33.000000 |
| 78 |
r2 = 1 c2 = 33 |
| 79 |
elevbuf[c2] = 393.022095 |
| 80 |
e2 = 1651933.000000 n2 = 5102421.000000 z2 = 393.022095 |
| 81 |
XC = 1652204.875702 YC = 5101789.573258 ZC = 102.602297 |
| 82 |
omega = 0.062981 phi = 0.268649 kappa = 0.280221 |
| 83 |
---------------------------------------------------------------------- |
| 84 |
../libes/orthoref.c |
| 85 |
After ortho ref (photo cords): ex = 9.522318 nx = -49.863916 |
| 86 |
|
| 87 |
NOTES: using the XC, YC, ZC, omega, phi, kappa, photo coordinates (in pixel) are |
| 88 |
calculated |
| 89 |
|
| 90 |
---------------------------------------------------------------------- |
| 91 |
../libes/georef.c |
| 92 |
After geo ref: ex = -976.095185 nx = -1688.082343 |
| 93 |
|
| 94 |
NOTES: using ex, nx from orthoref and calculates the position according to |
| 95 |
the tie points grid |
| 96 |
|
| 97 |
---------------------------------------------------------------------- |
| 98 |
rectify.c |
| 99 |
[...] |
| 100 |
Tie_Point row 23 col 28 |
| 101 |
east 1652783.000000 north 5101700.000000 |
| 102 |
row2 = 722.000000 col2 = 883.000000 |
| 103 |
r2 = 722 c2 = 883 |
| 104 |
elevbuf[c2] = 318.217010 |
| 105 |
e2 = 1652783.000000 n2 = 5101700.000000 z2 = 318.217010 |
| 106 |
XC = 1652204.875702 YC = 5101789.573258 ZC = 102.602297 |
| 107 |
omega = 0.062981 phi = 0.268649 kappa = 0.280221 |
| 108 |
---------------------------------------------------------------------- |
| 109 |
../libes/orthoref.c |
| 110 |
After ortho ref (photo cords): ex = -14.763034 nx = 6.790096 |
| 111 |
---------------------------------------------------------------------- |
| 112 |
../libes/georef.c |
| 113 |
After geo ref: ex = -1383.557478 nx = -739.400496 |
| 114 |
---------------------------------------------------------------------- |
| 115 |
rectify.c |
| 116 |
---------------------------------------------------------------------- |
| 117 |
ps_cp.c |
| 118 |
Patching column 884: |
| 119 |
Patching 723 row: |
| 120 |
In ps_cp |
| 121 |
ps_cp allocated |
| 122 |
k = 0 i = 0 j = 0 |
| 123 |
e1[k] = -942.577786 |
| 124 |
n1[k] = -1679.150555 |
| 125 |
e2[k] = 0.000000 |
| 126 |
n2[k] = 0.000000 |
| 127 |
k = 1 i = 0 j = 1 |
| 128 |
e1[k] = -976.095185 |
| 129 |
n1[k] = -1688.082343 |
| 130 |
e2[k] = 32.000000 |
| 131 |
n2[k] = 0.000000 |
| 132 |
k = 2 i = 1 j = 0 |
| 133 |
e1[k] = -927.097096 |
| 134 |
n1[k] = -1670.419345 |
| 135 |
e2[k] = 0.000000 |
| 136 |
n2[k] = 32.000000 |
| 137 |
k = 3 i = 1 j = 1 |
| 138 |
e1[k] = -956.976064 |
| 139 |
n1[k] = -1707.546288 |
| 140 |
e2[k] = 32.000000 |
| 141 |
n2[k] = 32.000000 |
| 142 |
ps_cp initialized |
| 143 |
|
| 144 |
NOTES: calculation of pixel positions and transfer of pixels to new location |
| 145 |
|
| 146 |
---------------------------------------------------------------------- |
| 147 |
../libes/georef.c |
| 148 |
ref equ: case good |
| 149 |
E21 = -943.487394 -0.990568 0.540622 |
| 150 |
N21 = -1672.101767 -0.719668 -0.167699 |
| 151 |
got pseudo pts: row 0 col 0 |
| 152 |
compute geo matrix |
| 153 |
perform georef |
| 154 |
write matrix |
| 155 |
---------------------------------------------------------------------- |
| 156 |
ps_cp.c |
| 157 |
Patching 691 row: |
| 158 |
In ps_cp |
| 159 |
ps_cp allocated |
| 160 |
[...] |
| 161 |
Patching 51 row: |
| 162 |
In ps_cp |
| 163 |
ps_cp allocated |
| 164 |
k = 0 i = 0 j = 0 |
| 165 |
e1[k] = -1388.556052 |
| 166 |
n1[k] = -765.005604 |
| 167 |
e2[k] = 0.000000 |
| 168 |
n2[k] = 0.000000 |
| 169 |
k = 1 i = 0 j = 1 |
| 170 |
e1[k] = -1392.213733 |
| 171 |
n1[k] = -764.361388 |
| 172 |
e2[k] = 18.000000 |
| 173 |
n2[k] = 0.000000 |
| 174 |
k = 2 i = 1 j = 0 |
| 175 |
e1[k] = -1382.484111 |
| 176 |
n1[k] = -748.482320 |
| 177 |
e2[k] = 0.000000 |
| 178 |
n2[k] = 32.000000 |
| 179 |
k = 3 i = 1 j = 1 |
| 180 |
e1[k] = -1387.020336 |
| 181 |
n1[k] = -747.828931 |
| 182 |
e2[k] = 18.000000 |
| 183 |
n2[k] = 32.000000 |
| 184 |
ps_cp initialized |
| 185 |
---------------------------------------------------------------------- |
| 186 |
../libes/georef.c |
| 187 |
ref equ: case good |
| 188 |
E21 = -1388.336416 -0.227609 0.176021 |
| 189 |
N21 = -765.007897 0.036045 0.516496 |
| 190 |
got pseudo pts: row 21 col 27 |
| 191 |
compute geo matrix |
| 192 |
perform georef |
| 193 |
write matrix |
| 194 |
|
| 195 |
NOTES: calculation of coefficients of geocoding |
| 196 |
|
| 197 |
---------------------------------------------------------------------- |
| 198 |
ps_cp.c |
| 199 |
Patching 19 row: |
| 200 |
In ps_cp |
| 201 |
ps_cp allocated |
| 202 |
k = 0 i = 0 j = 0 |
| 203 |
e1[k] = -1382.484111 |
| 204 |
n1[k] = -748.482320 |
| 205 |
e2[k] = 0.000000 |
| 206 |
n2[k] = 0.000000 |
| 207 |
k = 1 i = 0 j = 1 |
| 208 |
e1[k] = -1387.020336 |
| 209 |
n1[k] = -747.828931 |
| 210 |
e2[k] = 18.000000 |
| 211 |
n2[k] = 0.000000 |
| 212 |
k = 2 i = 1 j = 0 |
| 213 |
e1[k] = -1379.325854 |
| 214 |
n1[k] = -739.733821 |
| 215 |
e2[k] = 0.000000 |
| 216 |
n2[k] = 17.000000 |
| 217 |
k = 3 i = 1 j = 1 |
| 218 |
e1[k] = -1383.557478 |
| 219 |
n1[k] = -739.400496 |
| 220 |
e2[k] = 18.000000 |
| 221 |
n2[k] = 17.000000 |
| 222 |
ps_cp initialized |
| 223 |
---------------------------------------------------------------------- |
| 224 |
../libes/georef.c |
| 225 |
ref equ: case good |
| 226 |
E21 = -1382.560261 -0.243551 0.194739 |
| 227 |
N21 = -748.402304 0.027409 0.505204 |
| 228 |
got pseudo pts: row 22 col 27 |
| 229 |
compute geo matrix |
| 230 |
perform georef |
| 231 |
write matrix |
| 232 |
---------------------------------------------------------------------- |
| 233 |
exec.c |
| 234 |
Done. Writing results... |
| 235 |
|
| 236 |
End of show. |