pub fn grayscale_open(image: &GrayImage, mask: &Mask) -> GrayImage {
    grayscale_dilate(&grayscale_erode(image, mask), mask)
}
Grayscale erosion followed by grayscale dilation.

See the [`grayscale_dilate()`]
and [`grayscale_erode()`]
documentation for definitions of dilation and erosion.

/// # Examples
```
# extern crate image;
# #[macro_use]
# extern crate imageproc;
# fn main() {
use image::GrayImage;
use imageproc::morphology::{Mask, grayscale_open};

let image = gray_image!(
100,  99,  99,  99, 222,  99;
99,  99,  99, 222, 222, 222;
99,   7,  99,  99, 222,  99;
7,   7,   7,  99,  99,  99;
99,   7,  99,  99,  99,  99
);

// Isolated regions of foreground pixels are removed,
// while isolated zones of background are maintained
let image_opened = gray_image!(
99,  99,  99,  99,  99,  99;
99,  99,  99,  99,  99,  99;
7,   7,  99,  99,  99,  99;
7,   7,   7,  99,  99,  99;
7,   7,   7,  99,  99,  99
);
assert_pixels_eq!(grayscale_open(&image, &Mask::square(1)), image_opened);

// grayscale_open is idempotent - applying it a second time has no effect.
assert_pixels_eq!(grayscale_open(&image_opened, &Mask::square(1)), image_opened);
# }
```
src/morphology.rs