radial

NAME

radial - computes the radial distortion of an image file

SYNOPSIS

radial [-nx val] [-ny val] [-r val|--ratio val] [-t val|--tolerance val] [-d|--data] [-?|-h|--help] input_image

DESCRIPTION

radial computes the radial distortion of an image file. It returns the parameters as a list of arguments which can directly be used by unwarp(1) to correct the distortion. input_image should be the photograph of a rectangular grid pattern of disks (all of them should be visible). The main steps of the process are: (1) identification of edges in the image, (2) fitting circles to the edges, (3) finding the centre of the circle, (4) estimating the homography between the pattern and its image, (5) optimising the fit between grid coordinates and their projection adjusting the distortion. To maximise the chance of success, the contrast of the image needs to be high enough. The model of distortion assumes that 'un = c + L*(u-c)', where 'un' are the image coordinates of a pixel in the undistorted image, 'u' are its coordinates in the distorted images (step 3 above), 'c' is adjustable the centre of the image (2 parameters) and 'L' represents the radial distortion. 'L = k0 + k1*r + k2*r^2 + k3*r^3', where 'r' is the distance between the pixel and the centre of the image 'r =||u-c||', the ki are the parameters to estimate (with 'k0 =1-k1-k2-k3').

OPTIONS

-h,--help,-?

Returns the manual page

-nx INTEGER

INTEGER is the number of columns of circles in the grid pattern (default: 14).

-ny INTEGER

INTEGER is the number of rows of circles in the grid pattern (default: 10).

-r DOUBLE, --ratio DOUBLE

DOUBLE is the ratio between horizontal and vertical circle spacing

-t DOUBLE, --tolerance DOUBLE

DOUBLE is the accepted variation between circle radius (1-DOUBLE)*rmoy-(1+DOUBLE)*rmoy (default: 0.25)

-d,--data

return the distortions as 3D points.

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

unwarp(1), p_compute(1)

Pierre SMARS (tools, home page)