pub struct Kern {
pub typ: u32,
pub halo: i32,
pub n: i32,
pub w: [i16; 256],
pub h: [i32; 8],
}Expand description
a separable 1-D kernel (KERN)
Fields§
§typ: u32§halo: i32§n: i32§w: [i16; 256]§h: [i32; 8]Implementations§
Source§impl Kern
impl Kern
Sourcepub fn gauss(var12: i32) -> Kern
pub fn gauss(var12: i32) -> Kern
Gaussian with 12 sigma^2 = var12 (<= 0: identity) [fxc_kern_gauss] FIR (var12 <= 432): h = ceil(sqrt(0.75 var12)) (1..18), g_i = exp(-6 i^2 / var12), sum = g_0 + 2 g_1 + …, q_i = trunc(g_i (16384 / sum) + 0.5), the centre absorbs 16384 - (q_0 + 2 sum q_i). Boxes: wl = largest odd w with 3 w^2 <= var12 + 3, m = (2 num + den) / (2 den) (num = 3 wl^2 + 12 wl + 9 - var12, den = 4 wl + 4, m <= 3): m boxes of width wl, then 3 - m of wl + 2.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Kern
impl Freeze for Kern
impl RefUnwindSafe for Kern
impl Send for Kern
impl Sync for Kern
impl Unpin for Kern
impl UnsafeUnpin for Kern
impl UnwindSafe for Kern
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more