sksurgerycalibration.algorithms.sphere_fitting module¶
Functions used by calibration the calibration routines
-
sksurgerycalibration.algorithms.sphere_fitting.
fit_sphere_least_squares
(coordinates, initial_parameters, bounds=((-inf, -inf, -inf, -inf), (inf, inf, inf, inf)))[source]¶ Uses scipy’s least squares optimisor to fit a sphere to a set of 3D Points
Parameters: - coordinates – (x,y,z) n x 3 array of point coordinates
- parameters (initial) – 1 x 4 array containing four initial values (centre, and radius)
Returns: x: an array containing the four fitted parameters
Returns: ier: int An integer flag. If it is equal to 1, 2, 3 or 4, the solution was found.