We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f229d59 commit 245df40Copy full SHA for 245df40
src/processing/conv.rs
@@ -6,6 +6,23 @@ use num_traits::{Num, NumAssignOps};
6
use std::marker::PhantomData;
7
use std::marker::Sized;
8
9
+pub struct NoPadding;
10
+pub struct ZeroPadding;
11
+pub struct ExtendPadding;
12
+
13
+pub trait ImagePadder where Self: Sized + Copy {
14
+ type Data;
15
16
+ fn pad(&self, pad_size: (usize, usize)) -> Self;
17
+}
18
19
20
+impl<T> ImagePadder<T> for NoPadding {
21
+ fn pad(&self, pad_size: (usize, usize)) -> Self {
22
+ *self
23
+ }
24
25
26
/// Perform image convolutions
27
pub trait ConvolutionExt
28
where
0 commit comments