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

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

update documentation

File size: 8.9 KB
RevLine 
[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>square2quadrilateral.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="square2quadrilateral.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//square2quadrilateral.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&nbsp;documentation</td>
67    </tr>
68  </table>
69
70</div>
71
72<div id="secondary_navbar">
73
[189]74<a href="spl_keep_mean.html">&lt;&lt;prev file</a> | next file &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;<a href="square2quadrilateral.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>
[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">square2quadrilateral.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) a unit square onto an arbitrary quadrilateral
[101]91 according to the 4-point correspondences:
[402]92  - (0,0) -> (x0,y0)
93  - (1,0) -> (x1,y1)
94  - (1,1) -> (x2,y2)
95  - (0,1) -> (x3,y3)
96
[101]97 The mapping is done using perspective transformation which preserve
98 lines in all orientations and permit quadrilateral to quadrilateral
[363]99 mappings. see ref. below.
[101]100</div>
[89]101
102     
103
104     
105
106     
107
108     
109
110      <div id="routine_details">
111       
112
113        <div class="routine_details" id="_square2quadrilateral">
114
[234]115          <h2><a class="top" href="#container">top</a>square2quadrilateral <span class="categories">
[157]116 Picture, Grid
[138]117</span></h2>
[89]118       
119          <p class="header">
[290]120            <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>, <a href="#_square2quadrilateral_keyword_DOUBLE">DOUBLE</a>=<span class="result">salar 0 or 1</span>)</p>
[89]121       
122          <div class="comments">
[101]123</div>
[89]124
[138]125          <h3>Return value</h3><div class="preformat">
[242]126 (2,n) array: the new coordinates (xout,yout) of the (xin,yin)
[138]127 point(s) after mapping.
128 If xin is a scalar, then n is equal to the number of elements of
129 x0. If xin is an array , then n is equal to the number of
130 elements of xin.
[321]131 If xin and yin are omitted, <a href="..//Interpolation/square2quadrilateral.html">square2quadrilateral</a> returns the
[138]132 matrix A which is used for the inverse transformation.
[106]133</div>
134
[101]135         
136            <h3>Parameters</h3>
137       
138           
139            <h4 id="_square2quadrilateral_param_x0in">x0in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[106]140              <span class="attr">in</span>
[101]141             
142             
[106]143              <span class="attr">required</span>
[101]144             
145             
146             
147             
148            </h4>
149       
[138]150          <div class="comments"></div>
[101]151           
152            <h4 id="_square2quadrilateral_param_y0in">y0in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[106]153              <span class="attr">in</span>
[101]154             
155             
[106]156              <span class="attr">required</span>
[101]157             
158             
159             
160             
161            </h4>
162       
[138]163          <div class="comments"></div>
[101]164           
165            <h4 id="_square2quadrilateral_param_x1in">x1in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[106]166              <span class="attr">in</span>
[101]167             
168             
[106]169              <span class="attr">required</span>
[101]170             
171             
172             
173             
174            </h4>
175       
[138]176          <div class="comments"></div>
[101]177           
178            <h4 id="_square2quadrilateral_param_y1in">y1in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[106]179              <span class="attr">in</span>
[101]180             
181             
[106]182              <span class="attr">required</span>
[101]183             
184             
185             
186             
187            </h4>
188       
[138]189          <div class="comments"></div>
[101]190           
191            <h4 id="_square2quadrilateral_param_x2in">x2in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[106]192              <span class="attr">in</span>
[101]193             
194             
[106]195              <span class="attr">required</span>
[101]196             
197             
198             
199             
200            </h4>
201       
[138]202          <div class="comments"></div>
[101]203           
204            <h4 id="_square2quadrilateral_param_y2in">y2in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[106]205              <span class="attr">in</span>
[101]206             
207             
[106]208              <span class="attr">required</span>
[101]209             
210             
211             
212             
213            </h4>
214       
[138]215          <div class="comments"></div>
[101]216           
217            <h4 id="_square2quadrilateral_param_x3in">x3in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[106]218              <span class="attr">in</span>
[101]219             
220             
[106]221              <span class="attr">required</span>
[101]222             
223             
224             
225             
226            </h4>
227       
[138]228          <div class="comments"></div>
[101]229           
230            <h4 id="_square2quadrilateral_param_y3in">y3in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[106]231              <span class="attr">in</span>
[101]232             
233             
[106]234              <span class="attr">required</span>
[101]235             
236             
237             
238             
239            </h4>
240       
[138]241          <div class="comments">
[163]242 the coordinates of the quadrilateral (see above for correspondence with the
[138]243 unit square).
244 Can be scalar or array.
245 (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are given in the anticlockwise order.
[106]246</div>
[101]247           
248            <h4 id="_square2quadrilateral_param_xxin">xxin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[106]249              <span class="attr">in</span>
[101]250             
[121]251              <span class="attr">optional</span>
[101]252             
253             
254             
255             
256             
257            </h4>
258       
[290]259          <div class="comments">
260 first coordinates of the point(s) for which we want to do the mapping.</div>
[101]261           
262            <h4 id="_square2quadrilateral_param_yyin">yyin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[106]263              <span class="attr">in</span>
[101]264             
[121]265              <span class="attr">optional</span>
[101]266             
267             
268             
269             
270             
271            </h4>
272       
[138]273          <div class="comments">
[290]274 second coordinates of the point(s) for which we want to do the mapping.
[106]275</div>
[101]276           
[89]277
[101]278         
[89]279
[101]280         
[89]281
[290]282            <h3>Keywords</h3>
283           
284            <h4 id="_square2quadrilateral_keyword_DOUBLE">DOUBLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
285             
286             
287             
288             
289             
290              <span class="attr">type:</span> <span class="value">salar 0 or 1</span>
291              <span class="attr">default:</span> <span class="value">0</span>
292             
293            </h4>
294       
295            <div class="comments">
296 activate to perform double precision computation
297</div>
298           
299         
300
[138]301          <h3>Examples</h3><div class="preformat">
[89]302
[402]303   IDL> splot,[0,5],[0,3],/nodata,xstyle=1,ystyle=1
304   IDL> tracegrille, findgen(11)*.1, findgen(11)*.1,color=indgen(12)*20
305   IDL> xin = (findgen(11)*.1)#replicate(1, 11)
306   IDL> yin = replicate(1, 11)#(findgen(11)*.1)
307   IDL> out = square2quadrilateral(2,1,3,0,5,1,2,3, xin, yin)
308   IDL> tracegrille, reform(out[0,*],11,11), reform(out[1,*],11,11),color=indgen(12)*20
[106]309</div>
310          <h3>Version history</h3>
[101]311         
[234]312          <h4>Version</h4><div class="preformat">
[402]313 $Id: square2quadrilateral.pro 372 2008-08-08 12:31:53Z pinsard $
[118]314</div>
[138]315          <h4>History</h4><div class="preformat">
[402]316 Sebastien Masson (smasson@lodyc.jussieu.fr)
317  - August 2003
318    Based on "Digital Image Warping" by G. Wolberg
319    IEEE Computer Society Press, Los Alamitos, California
320    Chapter 3, see p 52-56
[118]321</div>
[101]322         
323         
[106]324          <h3>Known issues</h3>
[101]325         
326         
327         
[138]328          <h4>Restrictions</h4><div class="preformat">
329 I think degenerated quadrilateral (e.g. flat of twisted) is not work.
330 This has to be tested.
[106]331</div>
[101]332       
333         
334         
335         
336         
337         
338         
339         
340       
[163]341          <h3>Statistics</h3>
342          <table class="statistics">
343            <tr><td>McCabe cyclic</td><td>          14</td></tr>
344            <tr><td>McCabe essential</td><td>           1</td></tr>
345            <tr><td>McCabe modular design</td><td>           1</td></tr>
346          </table>
[101]347         
348       
349        </div>
350       
[89]351      </div>
352
353     
354
355      <div id="tagline">Produced by IDLdoc 2.0.</div>
356
357    </div>
358
359  </body>
[249]360</html>
Note: See TracBrowser for help on using the repository browser.