fit_sphere

NAME

fit_sphere - fit a sphere to a point cloud.

SYNOPSIS

fit_sphere [-?|-h|--help] [-d INTEGER|--discretisation INTEGER] [-e INTEGER|--export INTEGER] [-t DOUBLE|--threshold DOUBLE]

DESCRIPTION

fit_sphere finds the sphere which better fits a given point cloud. If the option --threshold is used, outlier points are not included. In a first phase, an estimate of the shape is computed using the RANSAC algorithm. The minimum number of points necessary to define a sphere is 4. A sample of 4 point sets is randomly chosen from the point cloud. For each of them, a sphere shape is chosen. The best one is then kept (the one closest to a maximum of point). In a second phase, this estimate is refined, computing a least square estimate using the Levenberg-Marquardt algorithm. The input point cloud is read from the standard input and the result is returned to the standard output.

OPTIONS

-h,--help,-?

Returns the manual page.

-d INTEGER, --discretisation INTEGER

INTEGER is the number of points or triangles to export.

-e INTEGER, --export INTEGER

INTEGER is the type of data which is returned to the standard output: [0: general shape description (default), 1: points, 2: triangles, 4: inliers, 5: outliers]

-t DOUBLE, --threshold DOUBLE

Only points closer than DOUBLE are considered (default: no threshold).

-v,--verbose

Be verbose.

AUTHORS

Written by Pierre Smars (first version: 2009)

BUGS

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

COPYRIGHT

Copyright (C) 2012 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

fit_circle(1), fit_line(1), fit_plane(1), fit_quadric(1)

Pierre SMARS (tools, home page)