Erosion, dilation, opening, closing, morphological gradient, tophat / whitehat, and blackhat explained with examples — In my last article, I wrote about some basic image processing in OpenCV. Today, we will advance a little bit and work on the morphological operations which are commonly used in image processing. Morphological operations are used to extract the region, edges, shapes, etc. What are Morphological Operations?