8 breaking releases

new 0.11.0 Jul 5, 2024
0.9.0 May 16, 2024
0.6.0 Mar 31, 2024
0.1.0 Dec 31, 2023

#368 in Images

Download history 130/week @ 2024-03-13 180/week @ 2024-03-20 662/week @ 2024-03-27 320/week @ 2024-04-03 252/week @ 2024-04-10 56/week @ 2024-04-17 270/week @ 2024-04-24 177/week @ 2024-05-01 116/week @ 2024-05-08 500/week @ 2024-05-15 332/week @ 2024-05-22 202/week @ 2024-05-29 115/week @ 2024-06-05 131/week @ 2024-06-12 110/week @ 2024-06-19 113/week @ 2024-06-26

491 downloads per month
Used in 3 crates (2 directly)

MIT/Apache

430KB
9K 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

~245KB