source: trunk/SRC/Documentation/idldoc_assistant_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: 8.5 KB
Line 
1
2
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4  <head>
5    <title>quadrilateral2square.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="neighbor.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="spl_fstdrv.html"><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>quadrilateral2square.pro</h2>
59
60    <dl>
61    </dl>
62
63   
64 warm (or map) an arbitrary quadrilateral onto a unit square
65 according to the 4-point correspondences:
66  - (x0,y0) -> (0,0)
67  - (x1,y1) -> (1,0)
68  - (x2,y2) -> (1,1)
69  - (x3,y3) -> (0,1)
70
71 This is the inverse function of <a href="..//Interpolation/square2quadrilateral.html">square2quadrilateral</a>.
72
73 The mapping is done using perspective transformation which preserve
74 lines in all orientations and permit quadrilateral to quadrilateral
75 mappings. see ref. below.
76
77
78   
79
80     
81      <a name="#_quadrilateral2square"></a>
82
83      <h2>quadrilateral2square  <font size="-1" color="#006633">
84 Picture, Grid
85</font></h2>
86
87      <p><font face="Courier"><i>result = </i>quadrilateral2square(<i><a href="#_quadrilateral2square_keyword_x0in">x0in</a>, <a href="#_quadrilateral2square_keyword_y0in">y0in</a>, <a href="#_quadrilateral2square_keyword_x1in">x1in</a>, <a href="#_quadrilateral2square_keyword_y1in">y1in</a>, <a href="#_quadrilateral2square_keyword_x2in">x2in</a>, <a href="#_quadrilateral2square_keyword_y2in">y2in</a>, <a href="#_quadrilateral2square_keyword_x3in">x3in</a>, <a href="#_quadrilateral2square_keyword_y3in">y3in</a>, <a href="#_quadrilateral2square_keyword_xxin">xxin</a>, <a href="#_quadrilateral2square_keyword_yyin">yyin</a></i>, <a href="#_quadrilateral2square_keyword_PERF">PERF</a>=<i>salar 0 or 1</i>, <a href="#_quadrilateral2square_keyword_DOUBLE">DOUBLE</a>=<i>salar 0 or 1</i>)</font></p>
88
89   
90
91
92    <h3>Return value</h3>
93 (2,n) array: the new coordinates (xout,yout) of the (xin,yin) point(s) after
94 mapping.
95 If xin is a scalar, then n is equal to the number of elements of x0.
96 If xin is an array, then n is equal to the number of elements of xin.
97
98
99   
100    <h3>Parameters</h3>
101   
102
103    <a name="#_quadrilateral2square_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="#_quadrilateral2square_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="#_quadrilateral2square_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="#_quadrilateral2square_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="#_quadrilateral2square_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="#_quadrilateral2square_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="#_quadrilateral2square_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="#_quadrilateral2square_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
222 (see above for correspondence with the unit square). Can be
223 scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are
224 given in the anticlockwise order.
225
226   
227
228    <a name="#_quadrilateral2square_keyword_xxin"></a>
229    <h4>xxin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
230      <font size="-1" color="#006633">in</font>
231     
232     
233      <font size="-1" color="#006633">required</font>
234     
235     
236     
237     
238    </h4>
239
240   
241 the coordinates of the point(s) for which we want to do the mapping.
242 Can be scalar or array.
243
244   
245
246    <a name="#_quadrilateral2square_keyword_yyin"></a>
247    <h4>yyin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
248      <font size="-1" color="#006633">in</font>
249     
250     
251      <font size="-1" color="#006633">required</font>
252     
253     
254     
255     
256    </h4>
257
258   
259 the coordinates of the point(s) for which we want to do the mapping.
260 Can be scalar or array.
261
262   
263   
264
265   
266    <h3>Keywords</h3>
267
268   
269    <a name="#_quadrilateral2square_keyword_PERF"></a>
270    <h4>PERF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
271     
272     
273     
274     
275     
276      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>salar 0 or 1</i></font>
277      <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>0</i></font>
278     
279    </h4>
280
281   
282 activate to print the elapsed time spent within quadrilateral2square
283
284   
285    <a name="#_quadrilateral2square_keyword_DOUBLE"></a>
286    <h4>DOUBLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
287     
288     
289     
290     
291     
292      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>salar 0 or 1</i></font>
293      <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>0</i></font>
294     
295    </h4>
296
297   
298 activate to perform double precision computation
299
300   
301   
302
303    <h3>Examples</h3><pre>
304
305   IDL> splot,[0,5],[0,3],/nodata,xstyle=1,ystyle=1
306   IDL> tracegrille, findgen(11)*.1, findgen(11)*.1,color=indgen(12)*20
307   IDL> xin = (findgen(11)*.1)#replicate(1, 11)
308   IDL> yin = replicate(1, 11)#(findgen(11)*.1)
309   IDL> out = square2quadrilateral(2,1,3,0,5,1,2,3, xin, yin)
310   IDL> tracegrille, reform(out[0,*],11,11), reform(out[1,*],11,11),color=indgen(12)*20
311
312   IDL> inorg=quadrilateral2square(2,1,3,0,5,1,2,3,out[0,*],out[1,*])
313   IDL> tracegrille, reform(inorg[0,*],11,11), reform(inorg[1,*],11,11),color=indgen(12)*20
314
315    </pre><h3>Version history</h3>
316   
317    <h4>Version</h4>
318 $Id: quadrilateral2square.pro 372 2008-08-08 12:31:53Z pinsard $
319
320    <h4>History</h4>
321      Sebastien Masson (smasson@lodyc.jussieu.fr)
322      August 2003
323      Based on "Digital Image Warping" by G. Wolberg
324      IEEE Computer Society Press, Los Alamitos, California
325      Chapter 3, see p 52-56
326
327
328   
329
330    <h3>Known issues</h3>
331   
332   
333   
334    <h4>Restrictions</h4>
335 I think degenerated quadrilateral (e.g. flat of twisted) is not work.
336 This has to be tested.
337
338
339   
340   
341   
342   
343   
344   
345   
346
347    <font size="-3"><p>&nbsp;</p></font>
348    <hr size="1" color="#CCCCCC"/>
349     
350
351   
352
353    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
354
355  </body>
356</html>
Note: See TracBrowser for help on using the repository browser.