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)
Built Distribution
Close
Hashes for ellipsinator-0.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad49e2635b15b8bd521562c8bfb9ce1da5f24b508a8e2c91c96398321e23a68f |
|
MD5 | 92b864835176f83ac4c7ed862f3b9c44 |
|
BLAKE2b-256 | 5e57283ffc6fdb244a5c8ab571211046cb80246f763fe378c062a9904a1fbb32 |