Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mckib2/ellipsinator
Fit ellipses.
https://github.com/mckib2/ellipsinator
Last synced: 3 months ago
JSON representation
Fit ellipses.
- Host: GitHub
- URL: https://github.com/mckib2/ellipsinator
- Owner: mckib2
- License: mit
- Created: 2020-08-09T21:11:27.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-25T17:08:51.000Z (about 1 year ago)
- Last Synced: 2024-04-26T09:20:51.055Z (9 months ago)
- Language: Python
- Size: 99.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Ellipsinator
============Tools for working with ellipses in Python.
Installation
============Should be an easy pip install:
.. code-block:: bash
pip install ellipsinator
Usage
=====To fit an ellipse:
.. code-block:: python
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`:.. code-block:: python
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`:.. code-block:: python
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)