Changeset 101 for trunk/SRC/Interpolation/square2quadrilateral.pro
- Timestamp:
- 06/12/06 10:29:56 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Interpolation/square2quadrilateral.pro
r59 r101 1 1 ;+ 2 ; NAME:square2quadrilateral 3 ; 4 ; PURPOSE:warm (or map) a unit square onto an arbitrary quadrilateral 2 ; 3 ; @file_comments warm (or map) a unit square onto an arbitrary quadrilateral 5 4 ; according to the 4-point correspondences: 6 5 ; (0,0) -> (x0,y0) … … 12 11 ; mappings. see ref. bellow. 13 12 ; 14 ; CATEGORY:image/grid manipulation15 ; 16 ; CALLING SEQUENCE:13 ; @categories image, grid manipulation 14 ; 15 ; @examples 17 16 ; 18 17 ; res = square2quadrilateral(x0,y0,x1,y1,x2,y2,x3,y3[,xin,yin]) 19 18 ; 20 ; INPUTS: 21 ; 22 ; x0,y0,x1,y1,x2,y2,x3,y3 the coordinates of the quadrilateral 23 ; (see above for correspondance with the unit square). Can be 24 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 25 ; given in the anticlockwise order. 26 ; 27 ; xin,yin:the coordinates of the point(s) for which we want to do the 19 FUNCTION square2quadrilateral, x0in, y0in, x1in, y1in, x2in, y2in, x3in, y3in, xxin, yyin 20 ; @param x0in {in}{required} the coordinates of the quadrilateral 21 ; (see above for correspondance with the unit square). Can be 22 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 23 ; given in the anticlockwise order. 24 ; @param y0in {in}{required} the coordinates of the quadrilateral 25 ; (see above for correspondance with the unit square). Can be 26 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 27 ; given in the anticlockwise order. 28 ; @param x1in {in}{required} the coordinates of the quadrilateral 29 ; (see above for correspondance with the unit square). Can be 30 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 31 ; given in the anticlockwise order. 32 ; @param y1in {in}{required} the coordinates of the quadrilateral 33 ; (see above for correspondance with the unit square). Can be 34 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 35 ; given in the anticlockwise order. 36 ; @param x2in {in}{required} the coordinates of the quadrilateral 37 ; (see above for correspondance with the unit square). Can be 38 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 39 ; given in the anticlockwise order. 40 ; @param y2in {in}{required} the coordinates of the quadrilateral 41 ; (see above for correspondance with the unit square). Can be 42 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 43 ; given in the anticlockwise order. 44 ; @param x3in {in}{required} the coordinates of the quadrilateral 45 ; (see above for correspondance with the unit square). Can be 46 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 47 ; given in the anticlockwise order. 48 ; @param y3in {in}{required} the coordinates of the quadrilateral 49 ; (see above for correspondance with the unit square). Can be 50 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 51 ; given in the anticlockwise order. 52 ; 53 ; @param xxin {in}{required} the coordinates of the point(s) for which we want to do the 28 54 ; mapping. Can be scalar or array. 29 ; 30 ; KEYWORD PARAMETERS: 31 ; 32 ; /DOUBLE: use double precision to perform the computation 33 ; 34 ; OUTPUTS: 55 ; @param yyin {in}{required} the coordinates of the point(s) for which we want to do the 56 ; mapping. Can be scalar or array. 57 ; 58 ; @returns 35 59 ; 36 60 ; (2,n) array: the new coodinates (xout, yout) of the (xin,yin) … … 42 66 ; matrix A which is used for the inverse transformation. 43 67 ; 44 ; COMMON BLOCKS:none 45 ; 46 ; SIDE EFFECTS: 47 ; 48 ; RESTRICTIONS: I think degenerated quadrilateral (e.g. flat of 68 ; 69 ; @restrictions I think degenerated quadrilateral (e.g. flat of 49 70 ; twisted) is not work. This has to be tested. 50 71 ; 51 ; EXAMPLE:72 ; @examples 52 73 ; 53 74 ; IDL> splot,[0,5],[0,3],/nodata,xstyle=1,ystyle=1 … … 58 79 ; IDL> tracegrille, reform(out[0,*],11,11), reform(out[1,*],11,11),color=indgen(12)*20 59 80 ; 60 ; MODIFICATION HISTORY:61 ; Sebastien Masson (smasson @lodyc.jussieu.fr)81 ; @history 82 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 62 83 ; August 2003 63 84 ; Based on "Digital Image Warping" by G. Wolberg
Note: See TracChangeset
for help on using the changeset viewer.