[][src]Struct imageproc::filter::Kernel

pub struct Kernel<'a, K> { /* fields omitted */ }

A 2D kernel, used to filter images via convolution.

Methods

impl<'a, K: Num + Copy + 'a> Kernel<'a, K>[src]

pub fn new(data: &'a [K], width: u32, height: u32) -> Kernel<'a, K>[src]

Construct a kernel from a slice and its dimensions. The input slice is in row-major form.

pub fn filter<P, F, Q>(&self, image: &Image<P>, f: F) -> Image<Q> where
    P: Pixel + 'static,
    <P as Pixel>::Subpixel: ValueInto<K>,
    Q: Pixel + 'static,
    F: FnMut(&mut Q::Subpixel, K), 
[src]

Returns 2d correlation of an image. Intermediate calculations are performed at type K, and the results converted to pixel Q via f. Pads by continuity.

Auto Trait Implementations

impl<'a, K> Sync for Kernel<'a, K> where
    K: Sync

impl<'a, K> Send for Kernel<'a, K> where
    K: Sync

impl<'a, K> Unpin for Kernel<'a, K>

impl<'a, K> UnwindSafe for Kernel<'a, K> where
    K: RefUnwindSafe

impl<'a, K> RefUnwindSafe for Kernel<'a, K> where
    K: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T[src]

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
    Dst: ApproxFrom<Src, Scheme>,
    Scheme: ApproxScheme
[src]

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.

impl<T, Dst> ConvAsUtil<Dst> for T[src]

impl<Src, Dst> ValueInto<Dst> for Src where
    Dst: ValueFrom<Src>, 
[src]

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
    Scheme: ApproxScheme
[src]

type Err = NoError

The error type produced by a failed conversion.

impl<Src> ValueFrom<Src> for Src[src]

type Err = NoError

The error type produced by a failed conversion.

impl<T> ConvUtil for T[src]

impl<Src> TryFrom<Src> for Src[src]

type Err = NoError

The error type produced by a failed conversion.

impl<Src, Dst> TryInto<Dst> for Src where
    Dst: TryFrom<Src>, 
[src]

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.