ndarray_vision/processing/
mod.rs

1/// Implementation of a Canny Edge Detector and associated types
2pub mod canny;
3/// Image convolutions in 2D
4pub mod conv;
5/// Not convolution based image filters
6pub mod filter;
7/// Common convolution kernels and traits to aid in the building of kernels
8pub mod kernels;
9/// Sobel operator for edge detection
10pub mod sobel;
11/// Thresholding functions
12pub mod threshold;
13
14pub use canny::*;
15pub use conv::*;
16pub use filter::*;
17pub use kernels::*;
18pub use sobel::*;
19pub use threshold::*;
20
21/// Common error type for image processing algorithms
22#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
23pub enum Error {
24    /// Indicates that an error was caused by an image having an unexpected number
25    /// of channels. This could be caused by something such as an RGB image being
26    /// input to an algorithm that only works on greyscale images
27    ChannelDimensionMismatch,
28    /// Invalid dimensions to an algorithm - this includes rows and columns and
29    /// relationships between the two
30    InvalidDimensions,
31    /// An invalid parameter has been supplied to an algorithm.
32    InvalidParameter,
33    /// Numeric error such as an invalid conversion or issues in floating point
34    /// math. As `ndarray` and `ndarray-vision` rely on `num_traits` for a lot
35    /// of generic functionality this may indicate things such as failed typecasts
36    NumericError,
37}