source: trunk/SRC/Documentation/idldoc_assistant_output/Interpolation/square2quadrilateral.html @ 338

Last change on this file since 338 was 338, checked in by smasson, 16 years ago

update documentation

File size: 7.8 KB
Line 
1
2
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4  <head>
5    <title>square2quadrilateral.pro (SAXO Documentation Assistant)</title>
6  </head>
7
8  <body text="#000000" bgcolor="#FFFFFF">
9
10   
11<!-- Navbar template takes a structure with the following fields:
12       overview_href :
13       overview_selected :
14       dir_overview_href :
15       dir_overview_selected :
16       categories_href :
17       categories_selected :
18       index_href :
19       index_selected :
20       search_href :
21       search_selected :
22       file_selected :
23       source_href :
24       source_selected :
25       help_href :
26       help_selected :
27       etc_selected :
28
29       prev_file_href :
30       next_file_href :
31
32       view_single_page_href :
33       view_frames_href :
34
35       summary_fields_href :
36       summary_routine_href :
37       details_routine_href :
38
39       title :
40       subtitle :
41       user :
42-->
43
44
45<table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#F0F0FF" valign="bottom">
46  <tr>
47    <td width="10%">
48<a href="spl_keep_mean.html"><img src="./../prev.gif" border="0" alt="Previous"></a></td>
49    <td width="80%" align="center" valign="center">
50<font size=-1><i>SAXO Documentation Assistant</i>: <a href="./../home.html">Overview</a></font></td>
51    <td width="10%" align="right">
52<a href=""><img src="./../next.gif" border="0" alt="Next"></a></td>
53  </tr>
54</table>
55
56
57    <h1><font size="-2">Interpolation/</font></h1>
58    <h2>square2quadrilateral.pro</h2>
59
60    <dl>
61    </dl>
62
63   
64 warm (or map) a unit square onto an arbitrary quadrilateral
65 according to the 4-point correspondences:
66       (0,0) -> (x0,y0)
67       (1,0) -> (x1,y1)
68       (1,1) -> (x2,y2)
69       (0,1) -> (x3,y3)
70 The mapping is done using perspective transformation which preserve
71 lines in all orientations and permit quadrilateral to quadrilateral
72 mappings. see ref. bellow.
73
74
75   
76
77     
78      <a name="#_square2quadrilateral"></a>
79
80      <h2>square2quadrilateral  <font size="-1" color="#006633">
81 Picture, Grid
82</font></h2>
83
84      <p><font face="Courier"><i>result = </i>square2quadrilateral(<i><a href="#_square2quadrilateral_keyword_x0in">x0in</a>, <a href="#_square2quadrilateral_keyword_y0in">y0in</a>, <a href="#_square2quadrilateral_keyword_x1in">x1in</a>, <a href="#_square2quadrilateral_keyword_y1in">y1in</a>, <a href="#_square2quadrilateral_keyword_x2in">x2in</a>, <a href="#_square2quadrilateral_keyword_y2in">y2in</a>, <a href="#_square2quadrilateral_keyword_x3in">x3in</a>, <a href="#_square2quadrilateral_keyword_y3in">y3in</a>[, <a href="#_square2quadrilateral_keyword_xxin">xxin</a>][, <a href="#_square2quadrilateral_keyword_yyin">yyin</a>]</i>, <a href="#_square2quadrilateral_keyword_DOUBLE">DOUBLE</a>=<i>salar 0 or 1</i>)</font></p>
85
86   
87
88
89    <h3>Return value</h3>
90 (2,n) array: the new coordinates (xout,yout) of the (xin,yin)
91 point(s) after mapping.
92 If xin is a scalar, then n is equal to the number of elements of
93 x0. If xin is an array , then n is equal to the number of
94 elements of xin.
95 If xin and yin are omitted, <a href="..//Interpolation/square2quadrilateral.html">square2quadrilateral</a> returns the
96 matrix A which is used for the inverse transformation.
97
98
99   
100    <h3>Parameters</h3>
101   
102
103    <a name="#_square2quadrilateral_keyword_x0in"></a>
104    <h4>x0in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
105      <font size="-1" color="#006633">in</font>
106     
107     
108      <font size="-1" color="#006633">required</font>
109     
110     
111     
112     
113    </h4>
114
115   
116   
117
118    <a name="#_square2quadrilateral_keyword_y0in"></a>
119    <h4>y0in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
120      <font size="-1" color="#006633">in</font>
121     
122     
123      <font size="-1" color="#006633">required</font>
124     
125     
126     
127     
128    </h4>
129
130   
131   
132
133    <a name="#_square2quadrilateral_keyword_x1in"></a>
134    <h4>x1in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
135      <font size="-1" color="#006633">in</font>
136     
137     
138      <font size="-1" color="#006633">required</font>
139     
140     
141     
142     
143    </h4>
144
145   
146   
147
148    <a name="#_square2quadrilateral_keyword_y1in"></a>
149    <h4>y1in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
150      <font size="-1" color="#006633">in</font>
151     
152     
153      <font size="-1" color="#006633">required</font>
154     
155     
156     
157     
158    </h4>
159
160   
161   
162
163    <a name="#_square2quadrilateral_keyword_x2in"></a>
164    <h4>x2in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
165      <font size="-1" color="#006633">in</font>
166     
167     
168      <font size="-1" color="#006633">required</font>
169     
170     
171     
172     
173    </h4>
174
175   
176   
177
178    <a name="#_square2quadrilateral_keyword_y2in"></a>
179    <h4>y2in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
180      <font size="-1" color="#006633">in</font>
181     
182     
183      <font size="-1" color="#006633">required</font>
184     
185     
186     
187     
188    </h4>
189
190   
191   
192
193    <a name="#_square2quadrilateral_keyword_x3in"></a>
194    <h4>x3in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
195      <font size="-1" color="#006633">in</font>
196     
197     
198      <font size="-1" color="#006633">required</font>
199     
200     
201     
202     
203    </h4>
204
205   
206   
207
208    <a name="#_square2quadrilateral_keyword_y3in"></a>
209    <h4>y3in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
210      <font size="-1" color="#006633">in</font>
211     
212     
213      <font size="-1" color="#006633">required</font>
214     
215     
216     
217     
218    </h4>
219
220   
221 the coordinates of the quadrilateral (see above for correspondence with the
222 unit square).
223 Can be scalar or array.
224 (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are given in the anticlockwise order.
225
226   
227
228    <a name="#_square2quadrilateral_keyword_xxin"></a>
229    <h4>xxin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
230      <font size="-1" color="#006633">in</font>
231     
232      <font size="-1" color="#006633">optional</font>
233     
234     
235     
236     
237     
238    </h4>
239
240   
241 first coordinates of the point(s) for which we want to do the mapping.
242   
243
244    <a name="#_square2quadrilateral_keyword_yyin"></a>
245    <h4>yyin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
246      <font size="-1" color="#006633">in</font>
247     
248      <font size="-1" color="#006633">optional</font>
249     
250     
251     
252     
253     
254    </h4>
255
256   
257 second coordinates of the point(s) for which we want to do the mapping.
258
259   
260   
261
262   
263    <h3>Keywords</h3>
264
265   
266    <a name="#_square2quadrilateral_keyword_DOUBLE"></a>
267    <h4>DOUBLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
268     
269     
270     
271     
272     
273      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>salar 0 or 1</i></font>
274      <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>0</i></font>
275     
276    </h4>
277
278   
279 activate to perform double precision computation
280
281   
282   
283
284    <h3>Examples</h3><pre>
285
286 IDL> splot,[0,5],[0,3],/nodata,xstyle=1,ystyle=1
287 IDL> tracegrille, findgen(11)*.1, findgen(11)*.1,color=indgen(12)*20
288 IDL> xin = (findgen(11)*.1)#replicate(1, 11)
289 IDL> yin = replicate(1, 11)#(findgen(11)*.1)
290 IDL> out = square2quadrilateral(2,1,3,0,5,1,2,3, xin, yin)
291 IDL> tracegrille, reform(out[0,*],11,11), reform(out[1,*],11,11),color=indgen(12)*20
292
293    </pre><h3>Version history</h3>
294   
295    <h4>Version</h4>
296 $Id: square2quadrilateral.pro 327 2007-12-13 16:22:35Z pinsard $
297
298    <h4>History</h4>
299      Sebastien Masson (smasson@lodyc.jussieu.fr)
300      August 2003
301      Based on "Digital Image Warping" by G. Wolberg
302      IEEE Computer Society Press, Los Alamitos, California
303      Chapter 3, see p 52-56
304
305
306   
307
308    <h3>Known issues</h3>
309   
310   
311   
312    <h4>Restrictions</h4>
313 I think degenerated quadrilateral (e.g. flat of twisted) is not work.
314 This has to be tested.
315
316
317   
318   
319   
320   
321   
322   
323   
324
325    <font size="-3"><p>&nbsp;</p></font>
326    <hr size="1" color="#CCCCCC"/>
327     
328
329   
330
331    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
332
333  </body>
334</html>
Note: See TracBrowser for help on using the repository browser.