Skip to content

ImageRegion

Summary

Polygonal region of interest in image space.

Methods

contains

Signature: contains(point: Point2) -> bool

Return whether point lies inside region.

set_from_points

Signature: set_from_points(points: collections.abc.Sequence[Point2]) -> None

Additional overloads

  • set_from_points(polygons: collections.abc.Sequence[collections.abc.Sequence[Point2]]) -> None

Overloaded function.

to_mask_image

Signature: to_mask_image(size: ImageSize) -> ImageU8

Rasterize region into binary mask image.

Properties

polygon

Polygon vertices.