[89] | 1 | |
---|
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
---|
| 3 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
| 4 | |
---|
| 5 | <!-- Generated by IDLdoc 2.0 --> |
---|
| 6 | |
---|
| 7 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
| 8 | <head> |
---|
[104] | 9 | <title>quadrilateral2square.pro (SAXO Documentation)</title> |
---|
[89] | 10 | |
---|
| 11 | |
---|
[191] | 12 | <link rel="stylesheet" type="text/css" media="all" href="./../main_files.css" /> |
---|
| 13 | <link rel="stylesheet" type="text/css" media="print" href="./../main_files_print.css" /> |
---|
[89] | 14 | |
---|
| 15 | |
---|
| 16 | <script type="text/javascript"> |
---|
| 17 | function setTitle() { |
---|
[104] | 18 | parent.document.title="quadrilateral2square.pro (SAXO Documentation)"; |
---|
[89] | 19 | } |
---|
| 20 | </script> |
---|
| 21 | </head> |
---|
| 22 | |
---|
| 23 | <body onload="setTitle();"> |
---|
| 24 | |
---|
| 25 | <div id="navbar_title"> |
---|
[104] | 26 | <h1>SAXO Documentation</h1> |
---|
[89] | 27 | </div> |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | <div id="main_navbar"> |
---|
| 31 | |
---|
| 32 | <table cellspacing="0"> |
---|
| 33 | <tr> |
---|
| 34 | |
---|
[189] | 35 | <td><a href="./../overview.html" title="Overview of library">Overview</a></td> |
---|
[89] | 36 | |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | <td >Directory</td> |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | |
---|
[189] | 43 | <td><a href="./../idldoc-categories.html" title="Browse library by category">Categories</a></td> |
---|
[89] | 44 | |
---|
| 45 | |
---|
| 46 | |
---|
[189] | 47 | <td><a href="./../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td> |
---|
[89] | 48 | |
---|
| 49 | |
---|
| 50 | |
---|
[189] | 51 | <td><a href="./../search-page.html" title="Search library">Search</a></td> |
---|
[89] | 52 | |
---|
| 53 | |
---|
| 54 | <td id="selected">File</td> |
---|
| 55 | |
---|
| 56 | |
---|
[189] | 57 | <td><a href="../../../Interpolation//quadrilateral2square.pro" title="Source code of a file">Source</a></td> |
---|
[89] | 58 | |
---|
| 59 | |
---|
| 60 | |
---|
[189] | 61 | <td><a href="./../idldoc-help.html" title="Help on IDLdoc">Help</a></td> |
---|
[89] | 62 | |
---|
| 63 | |
---|
| 64 | <td >Etc</td> |
---|
| 65 | |
---|
| 66 | <td id="flexible">Developer documentation</td> |
---|
| 67 | </tr> |
---|
| 68 | </table> |
---|
| 69 | |
---|
| 70 | </div> |
---|
| 71 | |
---|
| 72 | <div id="secondary_navbar"> |
---|
| 73 | |
---|
[189] | 74 | <a href="neighbor.html"><<prev file</a> | <a href="spl_fstdrv.html">next file >></a> <a href="quadrilateral2square.html" target="_TOP">view single page</a> | <a href="./../index.html" target="_TOP">view frames</a> summary: fields | routine details: <a href="#routine_details">routine</a> |
---|
[89] | 75 | |
---|
| 76 | </div> |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | <div id="container"> |
---|
| 80 | |
---|
[189] | 81 | <h1 class="directory"><a href="directory-overview.html">Interpolation/</a></h1> |
---|
[89] | 82 | <h2 class="pro_file">quadrilateral2square.pro</h2> |
---|
| 83 | |
---|
| 84 | <div id="file_attr"> |
---|
| 85 | <dl> |
---|
| 86 | </dl> |
---|
| 87 | </div> |
---|
| 88 | |
---|
[138] | 89 | <div id="file_comments"> |
---|
| 90 | warm (or map) an arbitrary quadrilateral onto a unit square |
---|
[101] | 91 | according to the 4-point correspondences: |
---|
| 92 | (x0,y0) -> (0,0) |
---|
| 93 | (x1,y1) -> (1,0) |
---|
| 94 | (x2,y2) -> (1,1) |
---|
| 95 | (x3,y3) -> (0,1) |
---|
[290] | 96 | This is the inverse function of <a href="..//Interpolation/square2quadrilateral.html">square2quadrilateral</a>. |
---|
[234] | 97 | |
---|
[101] | 98 | The mapping is done using perspective transformation which preserve |
---|
| 99 | lines in all orientations and permit quadrilateral to quadrilateral |
---|
[363] | 100 | mappings. see ref. below. |
---|
[101] | 101 | </div> |
---|
[89] | 102 | |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | |
---|
| 106 | |
---|
| 107 | |
---|
| 108 | |
---|
| 109 | |
---|
| 110 | |
---|
| 111 | <div id="routine_details"> |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | <div class="routine_details" id="_quadrilateral2square"> |
---|
| 115 | |
---|
[234] | 116 | <h2><a class="top" href="#container">top</a>quadrilateral2square <span class="categories"> |
---|
[157] | 117 | Picture, Grid |
---|
[101] | 118 | </span></h2> |
---|
[89] | 119 | |
---|
| 120 | <p class="header"> |
---|
[290] | 121 | <span class="result">result = </span>quadrilateral2square(<span class="result"><a href="#_quadrilateral2square_param_x0in">x0in</a>, <a href="#_quadrilateral2square_param_y0in">y0in</a>, <a href="#_quadrilateral2square_param_x1in">x1in</a>, <a href="#_quadrilateral2square_param_y1in">y1in</a>, <a href="#_quadrilateral2square_param_x2in">x2in</a>, <a href="#_quadrilateral2square_param_y2in">y2in</a>, <a href="#_quadrilateral2square_param_x3in">x3in</a>, <a href="#_quadrilateral2square_param_y3in">y3in</a>, <a href="#_quadrilateral2square_param_xxin">xxin</a>, <a href="#_quadrilateral2square_param_yyin">yyin</a></span>, <a href="#_quadrilateral2square_keyword_PERF">PERF</a>=<span class="result">salar 0 or 1</span>, <a href="#_quadrilateral2square_keyword_DOUBLE">DOUBLE</a>=<span class="result">salar 0 or 1</span>)</p> |
---|
[89] | 122 | |
---|
| 123 | <div class="comments"> |
---|
[101] | 124 | </div> |
---|
[89] | 125 | |
---|
[138] | 126 | <h3>Return value</h3><div class="preformat"> |
---|
[242] | 127 | (2,n) array: the new coordinates (xout,yout) of the (xin,yin) point(s) after |
---|
[138] | 128 | mapping. |
---|
| 129 | If xin is a scalar, then n is equal to the number of elements of x0. |
---|
[242] | 130 | If xin is an array, then n is equal to the number of elements of xin. |
---|
[101] | 131 | </div> |
---|
[89] | 132 | |
---|
| 133 | |
---|
| 134 | <h3>Parameters</h3> |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | <h4 id="_quadrilateral2square_param_x0in">x0in |
---|
[101] | 138 | <span class="attr">in</span> |
---|
[89] | 139 | |
---|
| 140 | |
---|
[101] | 141 | <span class="attr">required</span> |
---|
[89] | 142 | |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | |
---|
| 146 | </h4> |
---|
| 147 | |
---|
[118] | 148 | <div class="comments"></div> |
---|
[89] | 149 | |
---|
| 150 | <h4 id="_quadrilateral2square_param_y0in">y0in |
---|
[101] | 151 | <span class="attr">in</span> |
---|
[89] | 152 | |
---|
| 153 | |
---|
[101] | 154 | <span class="attr">required</span> |
---|
[89] | 155 | |
---|
| 156 | |
---|
| 157 | |
---|
| 158 | |
---|
| 159 | </h4> |
---|
| 160 | |
---|
[118] | 161 | <div class="comments"></div> |
---|
[89] | 162 | |
---|
| 163 | <h4 id="_quadrilateral2square_param_x1in">x1in |
---|
[101] | 164 | <span class="attr">in</span> |
---|
[89] | 165 | |
---|
| 166 | |
---|
[101] | 167 | <span class="attr">required</span> |
---|
[89] | 168 | |
---|
| 169 | |
---|
| 170 | |
---|
| 171 | |
---|
| 172 | </h4> |
---|
| 173 | |
---|
[118] | 174 | <div class="comments"></div> |
---|
[89] | 175 | |
---|
| 176 | <h4 id="_quadrilateral2square_param_y1in">y1in |
---|
[101] | 177 | <span class="attr">in</span> |
---|
[89] | 178 | |
---|
| 179 | |
---|
[101] | 180 | <span class="attr">required</span> |
---|
[89] | 181 | |
---|
| 182 | |
---|
| 183 | |
---|
| 184 | |
---|
| 185 | </h4> |
---|
| 186 | |
---|
[118] | 187 | <div class="comments"></div> |
---|
[89] | 188 | |
---|
| 189 | <h4 id="_quadrilateral2square_param_x2in">x2in |
---|
[101] | 190 | <span class="attr">in</span> |
---|
[89] | 191 | |
---|
| 192 | |
---|
[101] | 193 | <span class="attr">required</span> |
---|
[89] | 194 | |
---|
| 195 | |
---|
| 196 | |
---|
| 197 | |
---|
| 198 | </h4> |
---|
| 199 | |
---|
[118] | 200 | <div class="comments"></div> |
---|
[89] | 201 | |
---|
| 202 | <h4 id="_quadrilateral2square_param_y2in">y2in |
---|
[101] | 203 | <span class="attr">in</span> |
---|
[89] | 204 | |
---|
| 205 | |
---|
[101] | 206 | <span class="attr">required</span> |
---|
[89] | 207 | |
---|
| 208 | |
---|
| 209 | |
---|
| 210 | |
---|
| 211 | </h4> |
---|
| 212 | |
---|
[118] | 213 | <div class="comments"></div> |
---|
[89] | 214 | |
---|
| 215 | <h4 id="_quadrilateral2square_param_x3in">x3in |
---|
[101] | 216 | <span class="attr">in</span> |
---|
[89] | 217 | |
---|
| 218 | |
---|
[101] | 219 | <span class="attr">required</span> |
---|
[89] | 220 | |
---|
| 221 | |
---|
| 222 | |
---|
| 223 | |
---|
| 224 | </h4> |
---|
| 225 | |
---|
[118] | 226 | <div class="comments"></div> |
---|
[89] | 227 | |
---|
| 228 | <h4 id="_quadrilateral2square_param_y3in">y3in |
---|
[101] | 229 | <span class="attr">in</span> |
---|
[89] | 230 | |
---|
| 231 | |
---|
[101] | 232 | <span class="attr">required</span> |
---|
[89] | 233 | |
---|
| 234 | |
---|
| 235 | |
---|
| 236 | |
---|
| 237 | </h4> |
---|
| 238 | |
---|
[118] | 239 | <div class="comments"> |
---|
| 240 | the coordinates of the quadrilateral |
---|
[163] | 241 | (see above for correspondence with the unit square). Can be |
---|
[118] | 242 | scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are |
---|
| 243 | given in the anticlockwise order. |
---|
[101] | 244 | </div> |
---|
[89] | 245 | |
---|
| 246 | <h4 id="_quadrilateral2square_param_xxin">xxin |
---|
[101] | 247 | <span class="attr">in</span> |
---|
[89] | 248 | |
---|
| 249 | |
---|
[101] | 250 | <span class="attr">required</span> |
---|
[89] | 251 | |
---|
| 252 | |
---|
| 253 | |
---|
| 254 | |
---|
| 255 | </h4> |
---|
| 256 | |
---|
[138] | 257 | <div class="comments"> |
---|
| 258 | the coordinates of the point(s) for which we want to do the mapping. |
---|
| 259 | Can be scalar or array. |
---|
| 260 | </div> |
---|
[89] | 261 | |
---|
| 262 | <h4 id="_quadrilateral2square_param_yyin">yyin |
---|
[101] | 263 | <span class="attr">in</span> |
---|
[89] | 264 | |
---|
| 265 | |
---|
[101] | 266 | <span class="attr">required</span> |
---|
[89] | 267 | |
---|
| 268 | |
---|
| 269 | |
---|
| 270 | |
---|
| 271 | </h4> |
---|
| 272 | |
---|
[138] | 273 | <div class="comments"> |
---|
| 274 | the coordinates of the point(s) for which we want to do the mapping. |
---|
| 275 | Can be scalar or array. |
---|
[101] | 276 | </div> |
---|
[89] | 277 | |
---|
| 278 | |
---|
| 279 | |
---|
| 280 | |
---|
| 281 | |
---|
| 282 | |
---|
| 283 | <h3>Keywords</h3> |
---|
| 284 | |
---|
| 285 | <h4 id="_quadrilateral2square_keyword_PERF">PERF |
---|
| 286 | |
---|
| 287 | |
---|
| 288 | |
---|
| 289 | |
---|
| 290 | |
---|
[290] | 291 | <span class="attr">type:</span> <span class="value">salar 0 or 1</span> |
---|
| 292 | <span class="attr">default:</span> <span class="value">0</span> |
---|
[89] | 293 | |
---|
[290] | 294 | </h4> |
---|
| 295 | |
---|
| 296 | <div class="comments"> |
---|
| 297 | activate to print the elapsed time spent within quadrilateral2square |
---|
| 298 | </div> |
---|
| 299 | |
---|
| 300 | <h4 id="_quadrilateral2square_keyword_DOUBLE">DOUBLE |
---|
[89] | 301 | |
---|
| 302 | |
---|
[290] | 303 | |
---|
| 304 | |
---|
| 305 | |
---|
| 306 | <span class="attr">type:</span> <span class="value">salar 0 or 1</span> |
---|
| 307 | <span class="attr">default:</span> <span class="value">0</span> |
---|
| 308 | |
---|
[89] | 309 | </h4> |
---|
| 310 | |
---|
[118] | 311 | <div class="comments"> |
---|
[290] | 312 | activate to perform double precision computation |
---|
[118] | 313 | </div> |
---|
[89] | 314 | |
---|
| 315 | |
---|
| 316 | |
---|
[138] | 317 | <h3>Examples</h3><div class="preformat"> |
---|
[101] | 318 | |
---|
| 319 | IDL> splot,[0,5],[0,3],/nodata,xstyle=1,ystyle=1 |
---|
| 320 | IDL> tracegrille, findgen(11)*.1, findgen(11)*.1,color=indgen(12)*20 |
---|
| 321 | IDL> xin = (findgen(11)*.1)#replicate(1, 11) |
---|
| 322 | IDL> yin = replicate(1, 11)#(findgen(11)*.1) |
---|
| 323 | IDL> out = square2quadrilateral(2,1,3,0,5,1,2,3, xin, yin) |
---|
| 324 | IDL> tracegrille, reform(out[0,*],11,11), reform(out[1,*],11,11),color=indgen(12)*20 |
---|
| 325 | |
---|
| 326 | IDL> inorg=quadrilateral2square(2,1,3,0,5,1,2,3,out[0,*],out[1,*]) |
---|
| 327 | IDL> tracegrille, reform(inorg[0,*],11,11), reform(inorg[1,*],11,11),color=indgen(12)*20 |
---|
| 328 | </div> |
---|
| 329 | <h3>Version history</h3> |
---|
[89] | 330 | |
---|
[234] | 331 | <h4>Version</h4><div class="preformat"> |
---|
[363] | 332 | $Id: quadrilateral2square.pro 358 2008-04-28 09:41:14Z pinsard $ |
---|
[118] | 333 | </div> |
---|
[138] | 334 | <h4>History</h4><div class="preformat"> |
---|
[101] | 335 | Sebastien Masson (smasson@lodyc.jussieu.fr) |
---|
| 336 | August 2003 |
---|
| 337 | Based on "Digital Image Warping" by G. Wolberg |
---|
| 338 | IEEE Computer Society Press, Los Alamitos, California |
---|
| 339 | Chapter 3, see p 52-56 |
---|
[138] | 340 | |
---|
[118] | 341 | </div> |
---|
[89] | 342 | |
---|
| 343 | |
---|
[101] | 344 | <h3>Known issues</h3> |
---|
[89] | 345 | |
---|
| 346 | |
---|
| 347 | |
---|
[138] | 348 | <h4>Restrictions</h4><div class="preformat"> |
---|
| 349 | I think degenerated quadrilateral (e.g. flat of twisted) is not work. |
---|
| 350 | This has to be tested. |
---|
[101] | 351 | </div> |
---|
[89] | 352 | |
---|
| 353 | |
---|
| 354 | |
---|
| 355 | |
---|
| 356 | |
---|
| 357 | |
---|
| 358 | |
---|
| 359 | |
---|
| 360 | |
---|
[163] | 361 | <h3>Statistics</h3> |
---|
| 362 | <table class="statistics"> |
---|
| 363 | <tr><td>McCabe cyclic</td><td> 8</td></tr> |
---|
| 364 | <tr><td>McCabe essential</td><td> 1</td></tr> |
---|
| 365 | <tr><td>McCabe modular design</td><td> 1</td></tr> |
---|
| 366 | </table> |
---|
[89] | 367 | |
---|
| 368 | |
---|
| 369 | </div> |
---|
| 370 | |
---|
| 371 | </div> |
---|
| 372 | |
---|
| 373 | |
---|
| 374 | |
---|
| 375 | <div id="tagline">Produced by IDLdoc 2.0.</div> |
---|
| 376 | |
---|
| 377 | </div> |
---|
| 378 | |
---|
| 379 | </body> |
---|
[249] | 380 | </html> |
---|