6 releases (breaking)

new 0.8.0 Apr 29, 2024
0.7.0 Apr 12, 2024
0.6.0 Mar 31, 2024
0.4.0 Feb 8, 2024
0.1.0 Dec 31, 2023

#320 in Images

Download history 146/week @ 2024-01-07 37/week @ 2024-01-14 57/week @ 2024-01-21 34/week @ 2024-01-28 57/week @ 2024-02-04 61/week @ 2024-02-11 109/week @ 2024-02-18 184/week @ 2024-02-25 172/week @ 2024-03-03 115/week @ 2024-03-10 186/week @ 2024-03-17 301/week @ 2024-03-24 705/week @ 2024-03-31 212/week @ 2024-04-07 111/week @ 2024-04-14 39/week @ 2024-04-21

1,135 downloads per month
Used in 3 crates (2 directly)

MIT/Apache

355KB
7.5K SLoC

rten-imageproc

Library for pre and post-processing image data stored in matrices. It includes functionality for:

  • Finding contours of objects in segmentation masks
  • Working with axis-aligned and oriented bounding boxes / rectangles
  • Simplifying polygons
  • Simple drawing of shapes

The genesis of this library was a need in the ocrs OCR engine for a Rust implementation of a subset of the geometry and image processing functionality provided by libraries like OpenCV and Shapely in Python.


lib.rs:

Provides 2D geometry and image processing functions.

This includes:

  • 2D vectors and related math
  • 2D shapes and associated algorithms: [Point], [Line], [Rect], [RotatedRect], [Polygon]
  • Rudimentary drawing functions
  • Algorithms for finding the contours of connected components in an image ([find_contours])
  • Algorithms for simplifying polygons and finding various kinds of shape that contain a polygon: [simplify_polygon], [min_area_rect], [convex_hull]

Dependencies