This module performs a series of morphological operations on a binary image or grayscale image, resulting in an image of the same type.