Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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:

image description

The Output after use Morpho

image description

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!

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:

image description

The Output after use using Morpho

image description

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!