sharpening or cleaning this binary mask

8 vues (au cours des 30 derniers jours)
rsnandi
rsnandi le 31 Juil 2020
Commenté : Image Analyst le 7 Août 2020
Hi, Image Analyst.,Could you please help me in sharpening or cleaning this binary mask please which is attached here. I have tried alot and got this refinement only. please suggest something.
  2 commentaires
jonas
jonas le 31 Juil 2020
I am not image Analyst, but I'm guessing you will get a better answer if you describe your desired image. Personally I don't see a lot of noise in your image. Do you want smoother edges? Do you want to fill the small black areas inside the main blob?
rsnandi
rsnandi le 1 Août 2020
Thanks Jonas , yes I want to smoother edges and fill the black area inside the main blob. Morphological operations not doing good. They deform the main blobs. Please suggest something. Thanks

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 1 Août 2020
You could blur the image and threshold it.
windowWidth = 7; % Whatever - bigger gives more smoothing, experiment with different values.
kernel = ones(windowWidth, windowWidth) / windowWidth^2;
smoothBW = conv(single(bw), kernel, 'same') > 0.5;
Or you could use a savitzky Golay filter to smooth the boundaries and then use poly2mask on the smoothed boundaries. Demo attached.
Or you could use activecontour(). Demo attached.
  1 commentaire
Image Analyst
Image Analyst le 7 Août 2020
rsnandi, are you still there????

Connectez-vous pour commenter.

Catégories

En savoir plus sur Image Segmentation and Analysis dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by