Crate imageproc

Crate imageproc 

Source
Expand description

§imageproc

crates.io doc-badge License Dependency status

An image processing library, based on the image library.

API documentation

§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 functions
  • text: enables text drawing
  • fft: enables phash and other functions that depends on the rustfft crate

§Optional Features

  • display-window: enables sdl2
  • sdl2: enables the displaying of images (using imageproc::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.