Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to remove small line segments from contour?

Is there a way to remove small line segments from a contour?

For example,in this image,largest contour is specified by green color and it's approximation is specified by blue color:

image description

As contour is a set of Points,I guess we can do somethings to remove segments of contours that are in red circles.For example by detecting and removing small lines or small sub contours or another way.But I do not know how I can do it.Please remember I want to remove them after finding contour and not before that.Do you know how I can remove them?Or any idea?

How to remove small line segments from contour?

Is there a way to remove small line segments from a contour?

For example,in this image,largest contour is specified by green color and it's approximation is specified by blue color:

image description

As contour is a set of Points,I guess we can do somethings to remove segments of contours that are in red circles.For example by detecting and removing small lines or small sub contours or another way.But I do not know how I can do it.Please remember I want to remove them after finding contour and not before that.Do you know how I can remove them?Or any idea?