VisionX V4 | WMAP | VisionX V4 |
vwmap - creates polynomial warp map file from coefficients |
vwmap [-H] [if=<inputfile>] [of=<outputfile>] [xs=<value>] [ys=<value>] [-d] |
Vwmap creates polynomial warp map file from coefficients obtained from vwcoef. The map file is a 2-channel float image file. The points in the map are computed by plugging the output image points into the p-th order polynomial equations for u and v which are defined by the given coefficients. (u,v) would be the point from which to map from in the input image. For a polynomial of order p, n=(p+1)(p+2)/2 coefficients are needed. The float input file format is 0 1 2 . . . n y 1 b0 b1 b2 . . . bn x 0 a0 a1 a2 . . . an The output image file is 2-channel, where channel 1 is the mapping for the x-coordinates and channel 2 is the mapping for the y-coordinates. The output image size is specified by the xs= and ys= parameters. This map file will be used by warp to create the image. COEFFICIENTS are read in as a 2x4 image matrix(i.e. p=2): 0 1 2 3 4 5 y 1 b0 b1 b2 b3 b4 b5 x 0 a0 a1 a2 a3 a4 a5 2nd-order is defined as: x x 0 1 2 0 1 2 0 a0 a1 a2 0 b0 b1 b2 y 1 a3 a4 y 1 b3 b4 2 a5 2 b5 MAPPING POLYNOMIAL is defined as a (ys)x(2*xs) matrix where - (xs,ys) is the output image size - u = a0 + a1*x + a2*x^2 + a3*y + a4*x*y + a5*y^2 - v = b0 + b1*x + b2*x^2 + b3*y + b4*x*y + b5*y^2 MAP is created by backwards mapping (i.e. plug output image points into equations for (x,y) to find where to map from input image (u,v). |
if= |
is a set of coefficients calculated by coef2 or coef3. |
||
of= |
is the map file that will be used to generate the final warped image. |
||
xs= |
is the width of the image. |
||
ys= |
is the height of the image. Note that it is possible to specify a different image size. |
vwcoefs(1), vwarp(1) |
Amy Sun, 1998 |