pyrot.eye_modelling.ellipsoid_fit#

Attributes#

Functions#

ellipsoid_fit(→ tuple[numpy.ndarray, numpy.ndarray, ...)

Fit an ellipsoid/sphere/paraboloid/hyperboloid to a set of xyz data points.

Module Contents#

pyrot.eye_modelling.ellipsoid_fit.logger#
pyrot.eye_modelling.ellipsoid_fit.ellipsoid_fit(markers_in_eye: list[list[float]], eye_shape: str) tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray, float]#

Fit an ellipsoid/sphere/paraboloid/hyperboloid to a set of xyz data points.

Parameters#

markers_in_eyelist of [x, y, z]

Cartesian data, list of three n x 1 vectors.

eye_shapestr

Shape to fit: - ‘sphere’ fits a sphere - ‘ellipsoid’ fits an ellipsoid with its axes aligned along [x, y, z] axes - ‘EYEPLAN’ fits an ellipsoid with x- and z- radii equal

Returns#

centerndarray

Ellipsoid or other conic center coordinates [xc, yc, zc].

radiindarray

Ellipsoid or other conic radii [a, b, c].

evecsndarray

The radii directions as columns of the 3x3 matrix.

Raises#

NotImplementedError

If an unsupported eye shape is provided.

Notes#

It does not find exactly the best fitting ellipse (see van Vught et al.).