Crate rten_imageproc

source ·
Expand description

Provides 2D geometry and image processing functions.

This includes:


  • Iterator over coordinates of pixels that fill a polygon. See Polygon::fill_iter for notes on how this iterator determines which pixels are inside the polygon.
  • A bounded line segment defined by a start and end point.
  • Painter is a context for drawing into an image tensor.
  • A point defined by X and Y coordinates.
  • Polygon shape defined by a list of vertices.
  • A collection of polygons, where each polygon is defined by a slice of points.
  • Rectangle defined by left, top, right and bottom coordinates.
  • An oriented rectangle.



  • Trait for shapes which have a well-defined bounding rectangle.
  • Trait for types which can be used as coordinates of shapes.


  • Return the bounding rectangle of a collection of shapes.
  • Return the sorted subset of points from poly that form a convex hull containing poly.
  • Draw a non-antialiased line in an image.
  • Draw the outline of a non anti-aliased polygon in an image.
  • Fill all points inside rect with the value value.
  • Find the contours of connected components in the binary image mask.
  • Return the rotated rectangle with minimum area which contains points.
  • Return a simplified version of the polygon defined by points.
  • Return a simplified version of the polyline defined by points.

Type Aliases§