Most of RestoreTools is now bundled with IR tools.
Function to perform an erosion followed by a dilation morphological operation on binary and grayscale images.