Morpho filter reduce sharp
Hi everyone, How I can restore the sharp of a triangle after use morpho filter, My program as below: erode(imgThresholded, imgThresholded, getStructuringElement(MORPH_ELLIPSE, Size(size, size))); dilate(imgThresholded, imgThresholded, getStructuringElement(MORPH_ELLIPSE, Size(size, size))); //morphological closing (fill small holes in the foreground) dilate(imgThresholded, imgThresholded, getStructuringElement(MORPH_ELLIPSE, Size(size, size))); erode(imgThresholded, imgThresholded, getStructuringElement(MORPH_ELLIPSE, Size(size, size)));
The orgImg:
The Output after using Morpho
I just want to fill the holes without change the size and sharp of triangle. Can you suggest some method to solve my problem. Thank you!