source: trunk/SRC/Documentation/idldoc_html_output/Interpolation/square2quadrilateral.html @ 107

Last change on this file since 107 was 107, checked in by smasson, 18 years ago

bugfix in ead/write_oasis

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>square2quadrilateral.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="square2quadrilateral.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?format=raw" title="Overview of library">Overview</a></td>
36     
37
38     
39      <td >Directory</td>
40     
41
42     
43      <td><a href="./../idldoc-categories.html?format=raw" title="Browse library by category">Categories</a></td>
44     
45
46     
47      <td><a href="./../idldoc-index.html?format=raw" title="Index of files, routines, and parameters">Index</a></td>
48     
49
50     
51      <td><a href="./../search-page.html?format=raw" title="Search library">Search</a></td>
52     
53
54      <td id="selected">File</td>
55
56     
57      <td >Source</td>
58     
59
60     
61      <td><a href="./../idldoc-help.html?format=raw" 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="spl_keep_mean.html">&lt;&lt;prev file</a> | <a href="testinterp.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="square2quadrilateral.html?format=raw" target="_TOP">view single page</a> | <a href="./../index.html?format=raw" 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?format=raw">Interpolation/</a></h1>
82      <h2 class="pro_file">square2quadrilateral.pro</h2>
83
84      <div id="file_attr">
85        <dl>
86        </dl>
87      </div>
88
89      <div id="file_comments"> warm (or map) a unit square onto an arbitrary quadrilateral
90 according to the 4-point correspondences:
91       (0,0) -> (x0,y0)
92       (1,0) -> (x1,y1)
93       (1,1) -> (x2,y2)
94       (0,1) -> (x3,y3)
95 The mapping is done using perspective transformation which preserve
96 lines in all orientations and permit quadrilateral to quadrilateral
97 mappings. see ref. bellow.
98</div>
99
100     
101
102     
103
104     
105
106     
107
108      <div id="routine_details">
109       
110
111        <div class="routine_details" id="_square2quadrilateral">
112
113          <h2><a class="top" href="#container">top</a>square2quadrilateral <span class="categories"> image, grid manipulation
114</span></h2>
115       
116          <p class="header">
117            <span class="result">result = </span>square2quadrilateral(<span class="result"><a href="#_square2quadrilateral_param_x0in">x0in</a>, <a href="#_square2quadrilateral_param_y0in">y0in</a>, <a href="#_square2quadrilateral_param_x1in">x1in</a>, <a href="#_square2quadrilateral_param_y1in">y1in</a>, <a href="#_square2quadrilateral_param_x2in">x2in</a>, <a href="#_square2quadrilateral_param_y2in">y2in</a>, <a href="#_square2quadrilateral_param_x3in">x3in</a>, <a href="#_square2quadrilateral_param_y3in">y3in</a>, <a href="#_square2quadrilateral_param_xxin">xxin</a>, <a href="#_square2quadrilateral_param_yyin">yyin</a></span>)</p>
118       
119          <div class="comments">
120</div>
121
122          <h3>Return value</h3><div class="value">
123
124     (2,n) array: the new coodinates (xout, yout) of the (xin,yin)
125     point(s) after mapping.
126     If xin is a scalar, then n is equal to the number of elements of
127     x0. If xin is an array , then n is equal to the number of
128     elements of xin.
129     If xin and yin are omited, square2quadrilateral returns the
130     matrix A which is used for the inverse transformation.
131
132</div>
133
134         
135            <h3>Parameters</h3>
136       
137           
138            <h4 id="_square2quadrilateral_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">  the coordinates of the quadrilateral
150     (see above for correspondance with the unit square). Can be
151     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are
152     given in the anticlockwise order.</div>
153           
154            <h4 id="_square2quadrilateral_param_y0in">y0in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
155              <span class="attr">in</span>
156             
157             
158              <span class="attr">required</span>
159             
160             
161             
162             
163            </h4>
164       
165          <div class="comments">  the coordinates of the quadrilateral
166     (see above for correspondance with the unit square). Can be
167     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are
168     given in the anticlockwise order.</div>
169           
170            <h4 id="_square2quadrilateral_param_x1in">x1in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
171              <span class="attr">in</span>
172             
173             
174              <span class="attr">required</span>
175             
176             
177             
178             
179            </h4>
180       
181          <div class="comments">  the coordinates of the quadrilateral
182     (see above for correspondance with the unit square). Can be
183     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are
184     given in the anticlockwise order.</div>
185           
186            <h4 id="_square2quadrilateral_param_y1in">y1in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
187              <span class="attr">in</span>
188             
189             
190              <span class="attr">required</span>
191             
192             
193             
194             
195            </h4>
196       
197          <div class="comments">  the coordinates of the quadrilateral
198     (see above for correspondance with the unit square). Can be
199     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are
200     given in the anticlockwise order.</div>
201           
202            <h4 id="_square2quadrilateral_param_x2in">x2in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
203              <span class="attr">in</span>
204             
205             
206              <span class="attr">required</span>
207             
208             
209             
210             
211            </h4>
212       
213          <div class="comments">  the coordinates of the quadrilateral
214     (see above for correspondance with the unit square). Can be
215     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are
216     given in the anticlockwise order.</div>
217           
218            <h4 id="_square2quadrilateral_param_y2in">y2in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
219              <span class="attr">in</span>
220             
221             
222              <span class="attr">required</span>
223             
224             
225             
226             
227            </h4>
228       
229          <div class="comments">  the coordinates of the quadrilateral
230     (see above for correspondance with the unit square). Can be
231     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are
232     given in the anticlockwise order.</div>
233           
234            <h4 id="_square2quadrilateral_param_x3in">x3in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
235              <span class="attr">in</span>
236             
237             
238              <span class="attr">required</span>
239             
240             
241             
242             
243            </h4>
244       
245          <div class="comments">  the coordinates of the quadrilateral
246     (see above for correspondance with the unit square). Can be
247     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are
248     given in the anticlockwise order.</div>
249           
250            <h4 id="_square2quadrilateral_param_y3in">y3in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
251              <span class="attr">in</span>
252             
253             
254              <span class="attr">required</span>
255             
256             
257             
258             
259            </h4>
260       
261          <div class="comments">  the coordinates of the quadrilateral
262     (see above for correspondance with the unit square). Can be
263     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are
264     given in the anticlockwise order.
265</div>
266           
267            <h4 id="_square2quadrilateral_param_xxin">xxin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
268              <span class="attr">in</span>
269             
270             
271              <span class="attr">required</span>
272             
273             
274             
275             
276            </h4>
277       
278          <div class="comments"> the coordinates of the point(s) for which we want to do the
279     mapping. Can be scalar or array.</div>
280           
281            <h4 id="_square2quadrilateral_param_yyin">yyin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
282              <span class="attr">in</span>
283             
284             
285              <span class="attr">required</span>
286             
287             
288             
289             
290            </h4>
291       
292          <div class="comments"> the coordinates of the point(s) for which we want to do the
293     mapping. Can be scalar or array.
294</div>
295           
296
297         
298
299         
300
301          <h3>Examples</h3><div class="value"> 
302 IDL>  res = square2quadrilateral(x0,y0,x1,y1,x2,y2,x3,y3[,xin,yin])
303 
304 
305
306 IDL> splot,[0,5],[0,3],/nodata,xstyle=1,ystyle=1
307 IDL> tracegrille, findgen(11)*.1, findgen(11)*.1,color=indgen(12)*20
308 IDL> xin = (findgen(11)*.1)#replicate(1, 11)
309 IDL> yin = replicate(1, 11)#(findgen(11)*.1)
310 IDL> out = square2quadrilateral(2,1,3,0,5,1,2,3, xin, yin)
311 IDL> tracegrille, reform(out[0,*],11,11), reform(out[1,*],11,11),color=indgen(12)*20
312</div>
313          <h3>Version history</h3>
314         
315         
316          <h4>History</h4><div class="value">
317      Sebastien Masson (smasson@lodyc.jussieu.fr)
318      August 2003
319      Based on "Digital Image Warping" by G. Wolberg
320      IEEE Computer Society Press, Los Alamitos, California
321      Chapter 3, see p 52-56
322      </div>
323         
324         
325          <h3>Known issues</h3>
326         
327         
328         
329          <h4>Restrictions</h4><div class="value"> I think degenerated quadrilateral (e.g. flat of
330 twisted) is not work. This has to be tested.
331</div>
332       
333         
334         
335         
336         
337         
338         
339         
340       
341         
342       
343        </div>
344       
345      </div>
346
347     
348
349      <div id="tagline">Produced by IDLdoc 2.0.</div>
350
351    </div>
352
353  </body>
354</html>
Note: See TracBrowser for help on using the repository browser.