source: trunk/SRC/Documentation/idldoc_assistant_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: 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
71 The mapping is done using perspective transformation which preserve
72 lines in all orientations and permit quadrilateral to quadrilateral
73 mappings. see ref. below.
74
75
76   
77
78     
79      <a name="#_square2quadrilateral"></a>
80
81      <h2>square2quadrilateral  <font size="-1" color="#006633">
82 Picture, Grid
83</font></h2>
84
85      <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>
86
87   
88
89
90    <h3>Return value</h3>
91 (2,n) array: the new coordinates (xout,yout) of the (xin,yin)
92 point(s) after mapping.
93 If xin is a scalar, then n is equal to the number of elements of
94 x0. If xin is an array , then n is equal to the number of
95 elements of xin.
96 If xin and yin are omitted, <a href="..//Interpolation/square2quadrilateral.html">square2quadrilateral</a> returns the
97 matrix A which is used for the inverse transformation.
98
99
100   
101    <h3>Parameters</h3>
102   
103
104    <a name="#_square2quadrilateral_keyword_x0in"></a>
105    <h4>x0in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
106      <font size="-1" color="#006633">in</font>
107     
108     
109      <font size="-1" color="#006633">required</font>
110     
111     
112     
113     
114    </h4>
115
116   
117   
118
119    <a name="#_square2quadrilateral_keyword_y0in"></a>
120    <h4>y0in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
121      <font size="-1" color="#006633">in</font>
122     
123     
124      <font size="-1" color="#006633">required</font>
125     
126     
127     
128     
129    </h4>
130
131   
132   
133
134    <a name="#_square2quadrilateral_keyword_x1in"></a>
135    <h4>x1in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
136      <font size="-1" color="#006633">in</font>
137     
138     
139      <font size="-1" color="#006633">required</font>
140     
141     
142     
143     
144    </h4>
145
146   
147   
148
149    <a name="#_square2quadrilateral_keyword_y1in"></a>
150    <h4>y1in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
151      <font size="-1" color="#006633">in</font>
152     
153     
154      <font size="-1" color="#006633">required</font>
155     
156     
157     
158     
159    </h4>
160
161   
162   
163
164    <a name="#_square2quadrilateral_keyword_x2in"></a>
165    <h4>x2in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
166      <font size="-1" color="#006633">in</font>
167     
168     
169      <font size="-1" color="#006633">required</font>
170     
171     
172     
173     
174    </h4>
175
176   
177   
178
179    <a name="#_square2quadrilateral_keyword_y2in"></a>
180    <h4>y2in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
181      <font size="-1" color="#006633">in</font>
182     
183     
184      <font size="-1" color="#006633">required</font>
185     
186     
187     
188     
189    </h4>
190
191   
192   
193
194    <a name="#_square2quadrilateral_keyword_x3in"></a>
195    <h4>x3in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
196      <font size="-1" color="#006633">in</font>
197     
198     
199      <font size="-1" color="#006633">required</font>
200     
201     
202     
203     
204    </h4>
205
206   
207   
208
209    <a name="#_square2quadrilateral_keyword_y3in"></a>
210    <h4>y3in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
211      <font size="-1" color="#006633">in</font>
212     
213     
214      <font size="-1" color="#006633">required</font>
215     
216     
217     
218     
219    </h4>
220
221   
222 the coordinates of the quadrilateral (see above for correspondence with the
223 unit square).
224 Can be scalar or array.
225 (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are given in the anticlockwise order.
226
227   
228
229    <a name="#_square2quadrilateral_keyword_xxin"></a>
230    <h4>xxin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
231      <font size="-1" color="#006633">in</font>
232     
233      <font size="-1" color="#006633">optional</font>
234     
235     
236     
237     
238     
239    </h4>
240
241   
242 first coordinates of the point(s) for which we want to do the mapping.
243   
244
245    <a name="#_square2quadrilateral_keyword_yyin"></a>
246    <h4>yyin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
247      <font size="-1" color="#006633">in</font>
248     
249      <font size="-1" color="#006633">optional</font>
250     
251     
252     
253     
254     
255    </h4>
256
257   
258 second coordinates of the point(s) for which we want to do the mapping.
259
260   
261   
262
263   
264    <h3>Keywords</h3>
265
266   
267    <a name="#_square2quadrilateral_keyword_DOUBLE"></a>
268    <h4>DOUBLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
269     
270     
271     
272     
273     
274      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>salar 0 or 1</i></font>
275      <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>0</i></font>
276     
277    </h4>
278
279   
280 activate to perform double precision computation
281
282   
283   
284
285    <h3>Examples</h3><pre>
286
287   IDL> splot,[0,5],[0,3],/nodata,xstyle=1,ystyle=1
288   IDL> tracegrille, findgen(11)*.1, findgen(11)*.1,color=indgen(12)*20
289   IDL> xin = (findgen(11)*.1)#replicate(1, 11)
290   IDL> yin = replicate(1, 11)#(findgen(11)*.1)
291   IDL> out = square2quadrilateral(2,1,3,0,5,1,2,3, xin, yin)
292   IDL> tracegrille, reform(out[0,*],11,11), reform(out[1,*],11,11),color=indgen(12)*20
293
294    </pre><h3>Version history</h3>
295   
296    <h4>Version</h4>
297 $Id: square2quadrilateral.pro 372 2008-08-08 12:31:53Z pinsard $
298
299    <h4>History</h4>
300 Sebastien Masson (smasson@lodyc.jussieu.fr)
301  - August 2003
302    Based on "Digital Image Warping" by G. Wolberg
303    IEEE Computer Society Press, Los Alamitos, California
304    Chapter 3, see p 52-56
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.