eccentricity
cellseg_gsontools.geometry.eccentricity(polygon, **kwargs)
¶
Compute the eccentricity of a polygon.
Note
Eccentricity (sometimes ellipticity) measures how far the object is from an ellipse. It is defined as the ratio of the length of the minor axis to the length of the major axis of an object. The closer the object is to an ellipse, the closer the eccentricity is to 1 - Wirth
Eccentricity: $$ \sqrt{1 - \frac{\text{minor axis}^2}{\text{major axis}^2}} $$
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon |
Polygon
|
Input shapely polygon object. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The eccentricity value of a polygon between 0-1. |