# This file is automatically generated by pyo3_stub_gen
# ruff: noqa: E501, F401, F403, F405
r"""
Hull computation from binary images.

Provides convex and concave (shrink-wrap) hull generation from boolean images, using contour tracing and Bézier gravity attraction. Coordinates are returned in image pixel space (y increases downward).
"""

import numpy
import raygeo
__all__ = [
    "get_concave_hull",
    "get_enclosing_hull",
    "get_hulls_from_image",
]

def get_concave_hull(boolean_image: numpy.ndarray, gravity: float = 0.1) -> raygeo.geo.Geometry | None:
    r"""
    Compute a concave (shrink-wrap) hull with Bézier gravity.
    
    :param boolean_image: 2D boolean array.
    :param gravity: Shrink-wrap factor 0.0-1.0. 0 gives convex hull.
    :returns: Concave hull as Geometry in pixel coords, or None.
    :complexity: O(w*h + n log n + n * g) time, O(n) space where w*h is the image size, n the number of contour points, and g the number of gravity iterations
    """

def get_enclosing_hull(boolean_image: numpy.ndarray) -> raygeo.geo.Geometry | None:
    r"""
    Compute a single convex hull enclosing all content.
    
    :param boolean_image: 2D boolean array.
    :returns: Convex hull as Geometry in pixel coords, or None.
    :complexity: O(w*h + n log n) time, O(n) space where w*h is the image size and n the number of contour points
    """

def get_hulls_from_image(boolean_image: numpy.ndarray) -> list[raygeo.geo.Geometry]:
    r"""
    Compute a separate convex hull for each distinct component.
    
    :param boolean_image: 2D boolean array.
    :returns: List of Geometry objects in pixel coords.
    :complexity: O(w*h + n log n) time, O(n) space where w*h is the image size and n the total number of contour points
    """

