source: trunk/SRC/Documentation/idldoc_html_output/Interpolation/quadrilateral2square.html @ 402

Last change on this file since 402 was 402, checked in by smasson, 15 years ago

update documentation

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