[−][src]Struct image2::kernel::Kernel
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]
rows: usize,
cols: usize,
f: F
) -> Kernel
Create a new kernel and fill it by executing f
with each possible (row, col) pair
Trait Implementations
impl Filter for Kernel
[src]
fn compute_at<T: Type, C: Color, I: Image<T, C>>(
&self,
x: usize,
y: usize,
c: usize,
input: &[&I]
) -> f64
[src]
&self,
x: usize,
y: usize,
c: usize,
input: &[&I]
) -> f64
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]
&self,
start_x: usize,
start_y: usize,
width: usize,
height: usize,
output: &mut I,
input: &[&J]
)
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]
&self,
output: &mut I,
input: &[&J]
)
Evaluate filter in parallel
fn eval_in_place<T: Send + Type, C: Color, I: Sync + Send + Image<T, C>>(
&self,
image: &mut I
)
[src]
&self,
image: &mut I
)
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]
&self,
other: A,
f: F
) -> Join<Self, A, F>
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(&self) -> 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.
fn div(self, other: Kernel) -> Div
[src]
impl Rem<Kernel> for Kernel
[src]
type Output = Rem
The resulting type after applying the %
operator.
fn rem(self, other: Kernel) -> Rem
[src]
impl Add<Kernel> for Kernel
[src]
type Output = Add
The resulting type after applying the +
operator.
fn add(self, other: Kernel) -> Add
[src]
impl Sub<Kernel> for Kernel
[src]
type Output = Sub
The resulting type after applying the -
operator.
fn sub(self, other: Kernel) -> Sub
[src]
impl Mul<Kernel> for Kernel
[src]
type Output = Mul
The resulting type after applying the *
operator.
fn mul(self, other: Kernel) -> Mul
[src]
impl Serialize for Kernel
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Kernel
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
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]
T: Deserialize<'de>,