pub fn blur<const N: usize>(
    height: usize,
    width: usize,
    kernel: [usize; N],
    raw: Vec<u8>,
) -> (Vec<u8>, usize, usize) {
    let middle = kernel.len() / 2;
    let raw = horz_gauss_blur(height, width, middle, kernel, &raw);
    let raw = rotate_90_clockwise(height, width, raw);
    let (width, height) = (height, width);
    let raw = horz_gauss_blur(height, width, middle, kernel, &raw);
    let raw = rotate_90_counterclockwise(height, width, raw);
    let (width, height) = (height, width);
    (raw, width, height)
}
/// Blurs image consisting of a Vec<u8> of RGB values.
/// Good kernels:
/// ```text
/// [27, 201, 27]
/// [1, 14, 62, 102, 62, 14, 1]
/// [1, 2, 7, 17, 31, 45, 51, 45, 31, 17, 7, 2, 1]
/// [2, 5, 9, 14, 21, 27, 32, 34, 32, 27, 21, 14, 9, 5, 2]
/// [1, 1, 2, 3, 6, 8, 12, 15, 19, 23, 25, 26, 25, 23, 19, 15, 12, 8, 6, 3, 2, 1, 1]
/// ```
Blurs image consisting of a Vec of RGB values.
Blurs image consisting of a Vec of RGB values .
pub fn blur<const N: usize>(
    height: usize,
    width: usize,
    kernel: [usize; N],
    raw: Vec<u8>,
) -> (Vec<u8>, usize, usize) {
    let middle = kernel.len() / 2;
    let raw = horz_gauss_blur(height, width, middle, kernel, &raw);
    let raw = rotate_90_clockwise(height, width, raw);
    let (width, height) = (height, width);
    let raw = horz_gauss_blur(height, width, middle, kernel, &raw);
    let raw = rotate_90_counterclockwise(height, width, raw);
    let (width, height) = (height, width);
    (raw, width, height)
}
pub fn blur < const N : usize > ( height : usize , width : usize , kernel : [ usize ; N ] , raw : Vec < u8 > , ) -> ( Vec < u8 > , usize , usize ) { let middle = kernel . len ( ) / 2 ; let raw = horz_gauss_blur ( height , width , middle , kernel , & raw ) ; let raw = rotate_90_clockwise ( height , width , raw ) ; let ( width , height ) = ( height , width ) ; let raw = horz_gauss_blur ( height , width , middle , kernel , & raw ) ; let raw = rotate_90_counterclockwise ( height , width , raw ) ; let ( width , height ) = ( height , width ) ; ( raw , width , height ) }
Blurs image consisting of a Vec<u8> of RGB values.
Blurs image consisting of a Vec<u8 > of RGB values .
height
usize
width
usize
kernel
[usize; N]
raw
Vec<u8>
height
usize
width
usize
kernel
[usize; N]
raw
Vec<u8>