Skip to main content

Ellipse tools for Python

Project description

Ellipsinator

Tools for working with ellipses in Python.

Installation

Should be an easy pip install:

pip install ellipsinator

Usage

To fit an ellipse:

from ellipsinator import fit_ellipse_halir
c = fit_ellipse_halir(x, y)

from ellipsinator import fit_ellipse_fitzgibon
c = fit_ellipse_fitzgibon(x, y)

from ellipsinator import fast_guaranteed_ellipse_estimate
c = fast_guaranteed_ellipse_estimate(x, y)

You can also pass in the measured points as a complex number, x + 1j*y:

from ellipsinator import fit_ellipse_halir
c = fit_ellipse_halir(x)

Fitting multiple ellipses simultaneously is also possible with fit_ellipse_halir and fast_guaranteed_ellipse_estimate:

assert x.shape == (num_ellipses, num_pts)
assert y.shape == (num_ellipses, num_pts)
c1 = fit_ellipse_halir(x, y)
c2 = fast_guaranteed_ellipse_estimate(x, y)
assert c1.shape == (num_ellipses, 6)
assert c2.shape == (num_ellipses, 6)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ellipsinator-0.3.0.tar.gz (19.9 kB view hashes)

Uploaded Source

Built Distribution

ellipsinator-0.3.0-py2.py3-none-any.whl (26.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page