How to remove unwanted threshold expansion?

This is a threshold image in context. The part that is undesirable is a continuation from above; I hope that it will be deducible. If not, ask. I want the almost circular part to remain after removing the extension in context. How can I do it? I would suggest someone a morphological operation. Can someone please extend this and perhaps provide an example?

thanks

enter image description here

Here is another example:

enter image description here

+7
python opencv
source share
3 answers

Best practice would be, since you only need shapes that look like a circle. Try using a curve fitting with a Kalman filter. Hope this will definitely solve the problem in a more efficient way. the circular equation will try to pull (correct) the points toward the center, and Kalman will help you effectively track the curve.

+5
source share

Your image is like a piece of a flat plane 3D image of your image . OTSU is not always a good idea. Turn it off and select the manual threshold (75).

0
source share
from scipy import misc from skimage.morphology import erosion data = misc.imread('gycl1.jpg') eroded = erosion(data, disk(25) 

enter image description here

Is that what you meant? I use a morphological erosion operator with disk size (to maintain cyclic function).

0
source share

All Articles