[][src]Trait ndarray_vision::processing::kernels::KernelBuilder

pub trait KernelBuilder<T> {
    type Params;
    fn build<D>(shape: D) -> Result<Array3<T>, Error>
    where
        D: Copy + IntoDimension<Dim = Ix3>
; fn build_with_params<D>(
        shape: D,
        _p: Self::Params
    ) -> Result<Array3<T>, Error>
    where
        D: Copy + IntoDimension<Dim = Ix3>
, { ... } }

Builds a convolutioon kernel given a shape and optional parameters

Associated Types

type Params

Parameters used in construction of the kernel

Loading content...

Required methods

fn build<D>(shape: D) -> Result<Array3<T>, Error> where
    D: Copy + IntoDimension<Dim = Ix3>, 

Build a kernel with a given dimension given sensible defaults for any parameters

Loading content...

Provided methods

fn build_with_params<D>(shape: D, _p: Self::Params) -> Result<Array3<T>, Error> where
    D: Copy + IntoDimension<Dim = Ix3>, 

For kernels with optional parameters use build with params otherwise appropriate default parameters will be chosen

Loading content...

Implementors

impl<T> KernelBuilder<T> for BoxLinearFilter where
    T: Float + Num + NumAssignOps + FromPrimitive
[src]

type Params = bool

If false the kernel will not be normalised - this means that pixel bounds may be exceeded and overflow may occur

impl<T> KernelBuilder<T> for GaussianFilter where
    T: Copy + Clone + FromPrimitive + Num
[src]

type Params = [f64; 2]

The parameter for the Gaussian filter is the horizontal and vertical covariances to form the covariance matrix.

This example is not tested
[ Params[0], 0]
[ 0, Params[1]]
Loading content...