Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is there a way I can remove these unwanted parts in a grayscale image?

Hello, I am a beginner in OpenCV and I am trying to segment an image. I got it by getting the largest contour in the canny image and then I used the x, y, w, h of the boundingRect() to the original image then I turn the ROI into grayscale but the problem is other images resulted having these unwanted parts (the ones in green lines) touch the ROI.


image with noise

How can I remove those kind of noises?

Here is the image:

image description