Expand description
§imageproc
An image processing library, based on the
image library.
§Goals
A performant, well-tested, well-documented library with a consistent API, suitable for use as the basis of computer vision applications or graphics editors.
§Non-goals
Maximum genericity over image storages or formats, or support for higher-dimensional images.
§Color Space
Functions in this library implicitly assume that pixels colors are
stored in a linear color space like RGB as opposed to a non-linear color
space such as sRGB.
If you are not familiar with gamma correction then this article contains an introduction and examples of color artefacts resulting from not using linear color spaces.
§Parallelism
This library provides both single-threaded and multi-threaded variations of several functions by using rayon.
Depending on image size and the amount of work performed per pixel the parallel versions may not always be faster - we recommend benchmarking for your specific use-case.
§Crate Features
§Default Features
rayon: enables multi-threaded versions of several functionstext: enables text drawingfft: enablesphashand other functions that depends on therustfftcrate
§Optional Features
display-window: enablessdl2sdl2: enables the displaying of images (usingimageproc::window) with sdl2
§How to contribute
See CONTRIBUTING.md.
Re-exports§
pub use image;
Modules§
- binary_
descriptors - Functions for generating and comparing compact binary patch descriptors.
- compose
- Functions for composing one or more images.
- contours
- Functions for finding border contours within binary images.
- contrast
- Functions for manipulating the contrast of images.
- corners
- Functions for detecting corners, also known as interest points.
- definitions
- Trait definitions and type aliases.
- distance_
transform - Functions for computing distance transforms - the distance of each pixel in an image from the nearest pixel of interest.
- doc_
macros - Macros used for generating documentation
- drawing
- Helpers for drawing basic shapes on images.
- edges
- Functions for detecting edges in images.
- filter
- Functions for filtering images.
- geometric_
transformations - Geometric transformations of images. This includes rotations, translation, and general projective transformations.
- geometry
- Computational geometry functions, for example finding convex hulls.
- gradients
- Functions for computing gradients of image intensities.
- haar
- Functions for creating and evaluating Haar-like features.
- hog
- HoG features and helpers for visualizing them.
- hough
- Line detection via the Hough transform.
- image_
hash - Perceptual hashing algorithms for images.
- integral_
image - Functions for computing integral images and running sums of rows and columns.
- kernel
- The kernel type for filter operations
- local_
binary_ patterns - Functions for computing local binary patterns.
- map
- Functions for mapping pixels and subpixels of images.
- math
- Assorted mathematical helper functions.
- morphology
- Functions for computing morphological operators.
- noise
- Functions for adding synthetic noise to images.
- pixelops
- Pixel manipulations.
- point
- A 2d point type.
- rect
- Basic manipulation of rectangles.
- region_
labelling - Functions for finding and labelling connected components of an image.
- seam_
carving - An implementation of seam carving. Currently in a pretty rough state. See examples/seam_carving.rs for an example.
- stats
- Statistical properties of images.
- suppress
- Functions for suppressing non-maximal values.
- template_
matching - Functions for performing template matching.
- union_
find - An implementation of disjoint set forests for union find.
- utils
- Utils for testing and debugging.
Macros§
- assert_
dimensions_ match - Panics if image dimensions do not match.
- assert_
pixels_ eq - Panics if any pixels differ between the two input images.
- assert_
pixels_ eq_ within - Panics if any pixels differ between the two images by more than the given tolerance in a single channel.
- gray_
image - Helper for defining greyscale images.
- rgb_
image - Helper for defining RGB images.
- rgba_
image - Helper for defining RGBA images.