unwarp

NAME

unwarp - corrects the radial distorsion of an image file (JPG, TIFF, PNG)

SYNOPSIS

unwarp [OPTIONS] INPUT_IMAGE OUTPUT_IMAGE

DESCRIPTION

unwarp remaps points with pixel coordinate (x,y) on the original image to points (xn,yn) of the new image. (xn, yn) = (xc, yc) + f*[(x, y) - (xc, yc)], where f = k0+k1*r+...+kn*r^n, r = sqrt([x-xc]^2 + [y-yc]^2)/d and k0 is chosen in order that f(r_max) = r_max. By default, d=1. but, if option -s is chosen, d is equal to half the diagonal of the image (in pixels).

OPTIONS

-h,--help,-?

Returns the manual page

-k1 REAL

linear term of the transformation

-k2 REAL

quadratic term of the transformation

-k3 REAL

cubic term of the transformation

-s,--scaled

the value r used to compute f is normalised, using d, the half the diagonal of the image in pixel.

-xc INTEGER

x coordinate of the centre of deformation (default: centre of the image)

-yc INTEGER

y coordinate of the centre of deformation (default: centre of the image)

-r,--reference-points

reads image coordinates of points of the image from the standard input and returns their transformed coordinates. The first line contains the number of points, each next line contains the u v coordinates of a point.

AUTHORS

Written by Pierre Smars (first version: 2008)

BUGS

Reports of bugs or problems should be submitted via electronic mail to <smars@yuntech.edu.tw>.

COPYRIGHT

Copyright (C) 2015 Pierre Smars. License GPLv2 <http://www.gnu.org/licenses/gpl-2.0.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

SEE ALSO

radial(1)

Pierre SMARS (tools, home page)