Image Segmentation - Watershed Algorithm
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Rebecca Schley
le 11 Avr 2021
Modifié(e) : Rebecca Schley
le 11 Avr 2021
I have followed the very helpful instructions on Steve Eddin's blog post concerning image segmentation of cells using the watershed algorithm. I have one piece to fine tune in my own image that I am working on. There are small sections in the cluster of cells in the top right corner where the algorithm produces segments for what should be the background. Can anyone suggest any strategies for resolving this? I am providing my code, the input image and my annotated output image showing the sections I would like to relegate to the background region.
Input image (b&w), output image (rgb); arrows point to sections I am trying to address.:

function A = getArea(I)
level = graythresh(I);
bw = imbinarize(I,level);
bw3 = imopen(bw,ones(5,5));
bw4 = bwareaopen(bw3,40);
mask_em = imextendedmax(I,30);
I_c = imcomplement(I);
I_mod = imimposemin(I_c, ~bw4 | mask_em);
L = watershed(I_mod);
imshow(label2rgb(L));
end
0 commentaires
Réponse acceptée
Image Analyst
le 11 Avr 2021
You could either filter them out by shape or area, or you could check the range (max - min) and get rid of any blobs that do not have the wide enough gray scale range, meaning that the blob has no dark and white regions inside it.
0 commentaires
Plus de réponses (0)
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!