To provide tophat morphological operation
img_ret=cv_tophat(image,kernel_type,kernel_size)
It is the Input Image (grayscale/rgb)
It accepts Integer/Float as Input 1->MORPH_RECT 2-> MORPH_ELLIPSE 3-> MORPH_CROSS
It accepts a list as input specifying the size of Kernel needed: example [5,5]
Returned Image after tophat operation
Performs tophat operation
Tophat gives the difference between input image and Opening of the image.Morphological transformations are some simple operations based on the image shape. It is normally performed on binary images. Two basic morphological operators are Erosion and Dilation. Then its variant forms like Opening, Closing, Gradient etc also comes into play