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

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_close};

let image = gray_image!(
50,  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 background pixels are removed,
// while isolated zones of foreground pixels are maintained
let image_closed = gray_image!(
99,  99,  99, 222, 222, 222;
99,  99,  99, 222, 222, 222;
99,  99,  99,  99, 222, 222;
99,  99,  99,  99,  99,  99;
99,  99,  99,  99,  99,  99
);
assert_pixels_eq!(grayscale_close(&image, &Mask::square(1)), image_closed);

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