Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Weird result from MorphologyEx

Hi guys,

I am trying to use MorphologyEx to open the white area in ful horizontal way. Please see the image attached. But in the result, the white is not fully opened horizontally.

kernel = np.ones((50,2),np.uint8) cv.morphologyEx(img, cv.MORPH_CLOSE, kernel) //MORPH_OPEN also doesn't give me what I want

image description

What is wrong in my code?

Weird result from MorphologyEx

Hi guys,

I am trying to use MorphologyEx to open the white area in ful horizontal way. Please see the image attached. But in the result, the white is not fully opened horizontally.

kernel = np.ones((50,2),np.uint8) cv.morphologyEx(img, cv.MORPH_CLOSE, kernel) //MORPH_OPEN also doesn't give me what I want

image description

What is wrong in my code?

image description

The above code is not my exact code tho. I am using OpenCVSharp now.

My OpenCVSharp code is: Cv.MorphologyEx( image, image, temp, new IplConvKernel( 50, 2, 1, 1, ElementShape.Ellipse ), MorphologyOperation.Close );

Please help!