sksurgeryspherefittingtest2.algorithms.sphere_fitting module

Module for fitting a sphere to a list of 3D points

sksurgeryspherefittingtest2.algorithms.sphere_fitting.fit_sphere_least_squares(x_values, y_values, z_values, initial_parameters)[source]

Uses scipy’s least squares optimisor to fit a sphere to a set of 3D Points

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.

Param:

(x,y,z) three arrays of equal length containing the x, y, and z coordinates.

Param:

an array containing four initial values (centre, and radius)