MAN page from RedHat Other XITE-3.3-3.i386.rpm
WARP
Section: User Commands (1)
Updated: 16 Mar 1998
Index
NAME
warp - polynomial control point mapping
SYNTAX
warp [-ip <n>] [-bg <bg>] [-cp <cpfile>] [-p <poldeg>]
[-xstart <xstart>] [-xstop <xstop>]
[-xsize <xsize>] [-ystart <ystart>]
[-ystop <ystop>] [-ysize <xsize>]
[-rss] [-qr] [ <inimage> <outimage> ]
DESCRIPTION
Perform an output to input mapping (k,l) = M(i,j).Given an input image I(k, l), calculate O(i,j).
If 'poldeg' == 1 (default) :
k = Q(i, j) = q0 + i * q1 + j * q2
l = R(i, j) = r0 + i * r1 + j * r2
If 'poldeg' == 2 :
k = Q(i, j) = q0 + i*q1 + j*q2 + i*i*q3 + i*j*q4 + j*j*q5
l = R(i, j) = r0 + i*r1 + j*r2 + i*i*r3 + i*j*r4 + j*j*r5
The coefficients qand rwill be printed if the -qrflagis set.
If -rssis set, the residuals r(m) will be calculated:
dk = k - Q(i,j)
dl = l - R(i,j)
r(m) = sqrt(dk*dk + dl*dl)
The control point file cpfileconsists of pairs of points.Each line is a set of i,j,kand l.iand jare coordinates in the reference image.kand lare coordinates in the image to be transformed.Lines with # in coloumn 1 are treated as comment lines.Blank lines are ignored. Pixels inside a line are separatedby blanks, lines are separated by newline.
#
# Example 1
#
# i j k l
#------------------
57 44 61 144
27 72 38 180
114 122 132 201
180 199 213 255
193 166 215 217
191 288 241 336
If inimageand outimageare specified, the transformwill be performed.The interpolation method -ipis
-ip 0 : Nearest neighbor
-ip 1 : Bilinear interpolation
g(x) = bi(f(x), f(x+1), d)
bi(x, y, d) = x(1-d) + yd
-ip 3 ; Cubic interpolation
g(x) = cc(f(x-1), f(x), f(x+1), f(x+2), d)
cc(x, y, z, v, d) = y + d((-x+z) +
d((2x-2y+z-v) + d(-x+y-z+v)))
Default is bilinear interpolation (-ip 1).
If the output image should have another size or startpointthan the input image, this may be specified by the-xstart,-xstop,-xsize,-ystart,-ystopand -ysizeoptions. If start, stop as well as size options are given, andinconsistently, the stop option is ignored. The givensizes are clipped against the result of the transform.
-bgis used to specify the background pixel value,default = 0.
REFERENCE
Wayne Niblack. Digital Image Processing, p 131-150
RESTRICTIONS
Works on unsigned byte images only.
SEE ALSO
affine(1),
quadratic(1),
reorganize(1),
rotate(1),
shift_img(1),
transpose_img(1)
AUTHOR
Lennart Flem 1/3-91.
MODIFIED
Otto Milvang
EXAMPLES
ID
$Id: warp.c,v 1.28 1997/04/23 13:00:00 svein Exp $
Index
- NAME
- SYNTAX
- DESCRIPTION
- REFERENCE
- RESTRICTIONS
- SEE ALSO
- AUTHOR
- MODIFIED
- EXAMPLES
- ID
This document was created byman2html,using the manual pages.