pub fn erode(image: &GrayImage, norm: Norm, k: u8) -> GrayImage {
    let mut out = image.clone();
    erode_mut(&mut out, norm, k);
    out
}
Sets all pixels within distance `k` of a background pixel to black.

A pixel is treated as belonging to the foreground if it has non-zero intensity.

# Examples
```
# extern crate image;
# #[macro_use]
# extern crate imageproc;
# fn main() {
use image::GrayImage;
use imageproc::morphology::erode;
use imageproc::distance_transform::Norm;

let image = gray_image!(
0,   0,   0,   0,   0,   0,   0,   0,  0;
0, 255, 255, 255, 255, 255, 255, 255,  0;
0, 255, 255, 255, 255, 255, 255, 255,  0;
0, 255, 255, 255, 255, 255, 255, 255,  0;
0, 255, 255, 255,   0, 255, 255, 255,  0;
0, 255, 255, 255, 255, 255, 255, 255,  0;
0, 255, 255, 255, 255, 255, 255, 255,  0;
0, 255, 255, 255, 255, 255, 255, 255,  0;
0,   0,   0,   0,   0,   0,   0,   0,  0
);

// L1 norm - the outermost foreground pixels are eroded,
// as well as those horizontally and vertically adjacent
// to the centre background pixel.
let l1_eroded = gray_image!(
0,   0,   0,   0,   0,   0,   0,   0,  0;
0,   0,   0,   0,   0,   0,   0,   0,  0;
0,   0, 255, 255, 255, 255, 255,   0,  0;
0,   0, 255, 255,   0, 255, 255,   0,  0;
0,   0, 255,   0,   0,   0, 255,   0,  0;
0,   0, 255, 255,   0, 255, 255,   0,  0;
0,   0, 255, 255, 255, 255, 255,   0,  0;
0,   0,   0,   0,   0,   0,   0,   0,  0;
0,   0,   0,   0,   0,   0,   0,   0,  0
);

assert_pixels_eq!(erode(&image, Norm::L1, 1), l1_eroded);

// L2 norm
//
// When computing distances using the L2 norm we take the ceiling of the true values.
// This means that using the L2 norm gives the same results as the L1 norm for `k <= 2`.
let l2_eroded = gray_image!(
0,   0,   0,   0,   0,   0,   0,   0,  0;
0,   0,   0,   0,   0,   0,   0,   0,  0;
0,   0, 255, 255, 255, 255, 255,   0,  0;
0,   0, 255, 255,   0, 255, 255,   0,  0;
0,   0, 255,   0,   0,   0, 255,   0,  0;
0,   0, 255, 255,   0, 255, 255,   0,  0;
0,   0, 255, 255, 255, 255, 255,   0,  0;
0,   0,   0,   0,   0,   0,   0,   0,  0;
0,   0,   0,   0,   0,   0,   0,   0,  0
);

assert_pixels_eq!(erode(&image, Norm::L2, 1), l2_eroded);

// LInf norm - all pixels eroded using the L1 norm are eroded,
// as well as the pixels diagonally adjacent to the centre pixel.
let linf_eroded = gray_image!(
0,   0,   0,   0,   0,   0,   0,   0,  0;
0,   0,   0,   0,   0,   0,   0,   0,  0;
0,   0, 255, 255, 255, 255, 255,   0,  0;
0,   0, 255,   0,   0,   0, 255,   0,  0;
0,   0, 255,   0,   0,   0, 255,   0,  0;
0,   0, 255,   0,   0,   0, 255,   0,  0;
0,   0, 255, 255, 255, 255, 255,   0,  0;
0,   0,   0,   0,   0,   0,   0,   0,  0;
0,   0,   0,   0,   0,   0,   0,   0,  0
);

assert_pixels_eq!(erode(&image, Norm::LInf, 1), linf_eroded);
# }
```
src/morphology.rs