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 | This is the inverse function of <a href="..//Interpolation/square2quadrilateral.html">square2quadrilateral</a>. |
---|
71 | |
---|
72 | The mapping is done using perspective transformation which preserve |
---|
73 | lines in all orientations and permit quadrilateral to quadrilateral |
---|
74 | mappings. see ref. bellow. |
---|
75 | |
---|
76 | |
---|
77 | |
---|
78 | |
---|
79 | |
---|
80 | <a name="#_quadrilateral2square"></a> |
---|
81 | |
---|
82 | <h2>quadrilateral2square <font size="-1" color="#006633"> |
---|
83 | Picture, Grid |
---|
84 | </font></h2> |
---|
85 | |
---|
86 | <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> |
---|
87 | |
---|
88 | |
---|
89 | |
---|
90 | |
---|
91 | <h3>Return value</h3> |
---|
92 | (2,n) array: the new coordinates (xout,yout) of the (xin,yin) point(s) after |
---|
93 | mapping. |
---|
94 | If xin is a scalar, then n is equal to the number of elements of x0. |
---|
95 | If xin is an array, then n is equal to the number of elements of xin. |
---|
96 | |
---|
97 | |
---|
98 | |
---|
99 | <h3>Parameters</h3> |
---|
100 | |
---|
101 | |
---|
102 | <a name="#_quadrilateral2square_keyword_x0in"></a> |
---|
103 | <h4>x0in |
---|
104 | <font size="-1" color="#006633">in</font> |
---|
105 | |
---|
106 | |
---|
107 | <font size="-1" color="#006633">required</font> |
---|
108 | |
---|
109 | |
---|
110 | |
---|
111 | |
---|
112 | </h4> |
---|
113 | |
---|
114 | |
---|
115 | |
---|
116 | |
---|
117 | <a name="#_quadrilateral2square_keyword_y0in"></a> |
---|
118 | <h4>y0in |
---|
119 | <font size="-1" color="#006633">in</font> |
---|
120 | |
---|
121 | |
---|
122 | <font size="-1" color="#006633">required</font> |
---|
123 | |
---|
124 | |
---|
125 | |
---|
126 | |
---|
127 | </h4> |
---|
128 | |
---|
129 | |
---|
130 | |
---|
131 | |
---|
132 | <a name="#_quadrilateral2square_keyword_x1in"></a> |
---|
133 | <h4>x1in |
---|
134 | <font size="-1" color="#006633">in</font> |
---|
135 | |
---|
136 | |
---|
137 | <font size="-1" color="#006633">required</font> |
---|
138 | |
---|
139 | |
---|
140 | |
---|
141 | |
---|
142 | </h4> |
---|
143 | |
---|
144 | |
---|
145 | |
---|
146 | |
---|
147 | <a name="#_quadrilateral2square_keyword_y1in"></a> |
---|
148 | <h4>y1in |
---|
149 | <font size="-1" color="#006633">in</font> |
---|
150 | |
---|
151 | |
---|
152 | <font size="-1" color="#006633">required</font> |
---|
153 | |
---|
154 | |
---|
155 | |
---|
156 | |
---|
157 | </h4> |
---|
158 | |
---|
159 | |
---|
160 | |
---|
161 | |
---|
162 | <a name="#_quadrilateral2square_keyword_x2in"></a> |
---|
163 | <h4>x2in |
---|
164 | <font size="-1" color="#006633">in</font> |
---|
165 | |
---|
166 | |
---|
167 | <font size="-1" color="#006633">required</font> |
---|
168 | |
---|
169 | |
---|
170 | |
---|
171 | |
---|
172 | </h4> |
---|
173 | |
---|
174 | |
---|
175 | |
---|
176 | |
---|
177 | <a name="#_quadrilateral2square_keyword_y2in"></a> |
---|
178 | <h4>y2in |
---|
179 | <font size="-1" color="#006633">in</font> |
---|
180 | |
---|
181 | |
---|
182 | <font size="-1" color="#006633">required</font> |
---|
183 | |
---|
184 | |
---|
185 | |
---|
186 | |
---|
187 | </h4> |
---|
188 | |
---|
189 | |
---|
190 | |
---|
191 | |
---|
192 | <a name="#_quadrilateral2square_keyword_x3in"></a> |
---|
193 | <h4>x3in |
---|
194 | <font size="-1" color="#006633">in</font> |
---|
195 | |
---|
196 | |
---|
197 | <font size="-1" color="#006633">required</font> |
---|
198 | |
---|
199 | |
---|
200 | |
---|
201 | |
---|
202 | </h4> |
---|
203 | |
---|
204 | |
---|
205 | |
---|
206 | |
---|
207 | <a name="#_quadrilateral2square_keyword_y3in"></a> |
---|
208 | <h4>y3in |
---|
209 | <font size="-1" color="#006633">in</font> |
---|
210 | |
---|
211 | |
---|
212 | <font size="-1" color="#006633">required</font> |
---|
213 | |
---|
214 | |
---|
215 | |
---|
216 | |
---|
217 | </h4> |
---|
218 | |
---|
219 | |
---|
220 | the coordinates of the quadrilateral |
---|
221 | (see above for correspondence with the unit square). Can be |
---|
222 | scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are |
---|
223 | given in the anticlockwise order. |
---|
224 | |
---|
225 | |
---|
226 | |
---|
227 | <a name="#_quadrilateral2square_keyword_xxin"></a> |
---|
228 | <h4>xxin |
---|
229 | <font size="-1" color="#006633">in</font> |
---|
230 | |
---|
231 | |
---|
232 | <font size="-1" color="#006633">required</font> |
---|
233 | |
---|
234 | |
---|
235 | |
---|
236 | |
---|
237 | </h4> |
---|
238 | |
---|
239 | |
---|
240 | the coordinates of the point(s) for which we want to do the mapping. |
---|
241 | Can be scalar or array. |
---|
242 | |
---|
243 | |
---|
244 | |
---|
245 | <a name="#_quadrilateral2square_keyword_yyin"></a> |
---|
246 | <h4>yyin |
---|
247 | <font size="-1" color="#006633">in</font> |
---|
248 | |
---|
249 | |
---|
250 | <font size="-1" color="#006633">required</font> |
---|
251 | |
---|
252 | |
---|
253 | |
---|
254 | |
---|
255 | </h4> |
---|
256 | |
---|
257 | |
---|
258 | the coordinates of the point(s) for which we want to do the mapping. |
---|
259 | Can be scalar or array. |
---|
260 | |
---|
261 | |
---|
262 | |
---|
263 | |
---|
264 | |
---|
265 | <h3>Keywords</h3> |
---|
266 | |
---|
267 | |
---|
268 | <a name="#_quadrilateral2square_keyword_PERF"></a> |
---|
269 | <h4>PERF |
---|
270 | |
---|
271 | |
---|
272 | |
---|
273 | |
---|
274 | |
---|
275 | <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>salar 0 or 1</i></font> |
---|
276 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>0</i></font> |
---|
277 | |
---|
278 | </h4> |
---|
279 | |
---|
280 | |
---|
281 | activate to print the elapsed time spent within quadrilateral2square |
---|
282 | |
---|
283 | |
---|
284 | <a name="#_quadrilateral2square_keyword_DOUBLE"></a> |
---|
285 | <h4>DOUBLE |
---|
286 | |
---|
287 | |
---|
288 | |
---|
289 | |
---|
290 | |
---|
291 | <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>salar 0 or 1</i></font> |
---|
292 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>0</i></font> |
---|
293 | |
---|
294 | </h4> |
---|
295 | |
---|
296 | |
---|
297 | activate to perform double precision computation |
---|
298 | |
---|
299 | |
---|
300 | |
---|
301 | |
---|
302 | <h3>Examples</h3><pre> |
---|
303 | |
---|
304 | IDL> splot,[0,5],[0,3],/nodata,xstyle=1,ystyle=1 |
---|
305 | IDL> tracegrille, findgen(11)*.1, findgen(11)*.1,color=indgen(12)*20 |
---|
306 | IDL> xin = (findgen(11)*.1)#replicate(1, 11) |
---|
307 | IDL> yin = replicate(1, 11)#(findgen(11)*.1) |
---|
308 | IDL> out = square2quadrilateral(2,1,3,0,5,1,2,3, xin, yin) |
---|
309 | IDL> tracegrille, reform(out[0,*],11,11), reform(out[1,*],11,11),color=indgen(12)*20 |
---|
310 | |
---|
311 | IDL> inorg=quadrilateral2square(2,1,3,0,5,1,2,3,out[0,*],out[1,*]) |
---|
312 | IDL> tracegrille, reform(inorg[0,*],11,11), reform(inorg[1,*],11,11),color=indgen(12)*20 |
---|
313 | |
---|
314 | </pre><h3>Version history</h3> |
---|
315 | |
---|
316 | <h4>Version</h4> |
---|
317 | $Id: quadrilateral2square.pro 327 2007-12-13 16:22:35Z pinsard $ |
---|
318 | |
---|
319 | <h4>History</h4> |
---|
320 | Sebastien Masson (smasson@lodyc.jussieu.fr) |
---|
321 | August 2003 |
---|
322 | Based on "Digital Image Warping" by G. Wolberg |
---|
323 | IEEE Computer Society Press, Los Alamitos, California |
---|
324 | Chapter 3, see p 52-56 |
---|
325 | |
---|
326 | |
---|
327 | |
---|
328 | |
---|
329 | <h3>Known issues</h3> |
---|
330 | |
---|
331 | |
---|
332 | |
---|
333 | <h4>Restrictions</h4> |
---|
334 | I think degenerated quadrilateral (e.g. flat of twisted) is not work. |
---|
335 | This has to be tested. |
---|
336 | |
---|
337 | |
---|
338 | |
---|
339 | |
---|
340 | |
---|
341 | |
---|
342 | |
---|
343 | |
---|
344 | |
---|
345 | |
---|
346 | <font size="-3"><p> </p></font> |
---|
347 | <hr size="1" color="#CCCCCC"/> |
---|
348 | |
---|
349 | |
---|
350 | |
---|
351 | |
---|
352 | <p><font color="gray" size="-3"> Produced by IDLdoc 2.0.</font></p> |
---|
353 | |
---|
354 | </body> |
---|
355 | </html> |
---|