[][src]Struct image2::kernel::Kernel

pub struct Kernel { /* fields omitted */ }

Kernels defines a 2-dimensional convolution filter

Methods

impl Kernel[src]

pub fn new(rows: usize, cols: usize) -> Kernel[src]

Create a new kernel with the given number of rows and columns

pub fn square(x: usize) -> Kernel[src]

Create a new, square kernel

pub fn normalize(&mut self)[src]

Ensures the sum of the kernel is <= 1

pub fn create<F: Fn(usize, usize) -> f64>(
    rows: usize,
    cols: usize,
    f: F
) -> Kernel
[src]

Create a new kernel and fill it by executing f with each possible (row, col) pair

Trait Implementations

impl Filter for Kernel[src]

fn eval_partial<T: Type, C: Color, U: Type, D: Color, I: Image<T, C>, J: Image<U, D>>(
    &self,
    start_x: usize,
    start_y: usize,
    width: usize,
    height: usize,
    output: &mut I,
    input: &[&J]
)
[src]

Evaluate a filter on part of an image

fn eval<T: Send + Type, C: Color, U: Type, D: Color, I: Sync + Send + Image<T, C>, J: Sync + Image<U, D>>(
    &self,
    output: &mut I,
    input: &[&J]
)
[src]

Evaluate filter in parallel

fn eval_in_place<T: Send + Type, C: Color, I: Sync + Send + Image<T, C>>(
    &self,
    image: &mut I
)
[src]

Evaluate filter in parallel in place

fn join<A: Filter, F: Fn(f64, f64) -> f64>(
    &self,
    other: A,
    f: F
) -> Join<Self, A, F>
[src]

fn and_then<F: Fn(f64) -> f64>(&self, f: F) -> AndThen<Self, F>[src]

impl From<Vec<Vec<f64>>> for Kernel[src]

impl<'a> From<&'a [&'a [f64]]> for Kernel[src]

impl From<[[f64; 2]; 2]> for Kernel[src]

impl From<[[f64; 3]; 3]> for Kernel[src]

impl From<[[f64; 4]; 4]> for Kernel[src]

impl From<[[f64; 5]; 5]> for Kernel[src]

impl From<[[f64; 6]; 6]> for Kernel[src]

impl From<[[f64; 7]; 7]> for Kernel[src]

impl From<[[f64; 8]; 8]> for Kernel[src]

impl From<[[f64; 9]; 9]> for Kernel[src]

impl From<[[f64; 10]; 10]> for Kernel[src]

impl From<[[f64; 11]; 11]> for Kernel[src]

impl From<[[f64; 12]; 12]> for Kernel[src]

impl From<[[f64; 13]; 13]> for Kernel[src]

impl From<[[f64; 14]; 14]> for Kernel[src]

impl From<[[f64; 15]; 15]> for Kernel[src]

impl From<[[f64; 16]; 16]> for Kernel[src]

impl From<[[f64; 17]; 17]> for Kernel[src]

impl From<[[f64; 18]; 18]> for Kernel[src]

impl From<[[f64; 19]; 19]> for Kernel[src]

impl From<[[f64; 20]; 20]> for Kernel[src]

impl PartialEq<Kernel> for Kernel[src]

impl Clone for Kernel[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Kernel[src]

impl Div<Kernel> for Kernel[src]

type Output = Div

The resulting type after applying the / operator.

impl Rem<Kernel> for Kernel[src]

type Output = Rem

The resulting type after applying the % operator.

impl Add<Kernel> for Kernel[src]

type Output = Add

The resulting type after applying the + operator.

impl Sub<Kernel> for Kernel[src]

type Output = Sub

The resulting type after applying the - operator.

impl Mul<Kernel> for Kernel[src]

type Output = Mul

The resulting type after applying the * operator.

impl Serialize for Kernel[src]

impl<'de> Deserialize<'de> for Kernel[src]

Auto Trait Implementations

impl Send for Kernel

impl Unpin for Kernel

impl Sync for Kernel

impl UnwindSafe for Kernel

impl RefUnwindSafe for Kernel

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

fn adapt_into(self) -> D[src]

Convert the source color to the destination color using the bradford method by default Read more

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]