image segmentation in a fluorescent image
Afficher commentaires plus anciens
This is the code that I put together to count the cells in the attached image, it seems to be on a right track till I reach Overlay1, after this, I can't get a good segmentation. The selected cells in 'overlay1'are the through cells and the non-selected one are bleed-through from another channel (which I dont want to count). I would appreciate your help on this.
clc
clear all;
%I = imread('http://blogs.mathworks.com/images/steve/60/nuclei.png');
I_cropped =imread('JeramTest2-1.png');
%I_cropped = I(400:900, 465:965);
imshow(I_cropped)
I_eq = adapthisteq(I_cropped);
imshow(I_eq)
bw = im2bw(I_eq, graythresh(I_eq));
imshow(bw)
bw2 = imfill(bw,'holes');
bw3 = imopen(bw2, ones(5,5));
bw4 = bwareaopen(bw3, 5);
bw4_perim = bwperim(bw4);
overlay1 = imoverlay(I_eq, bw4_perim, [.3 1 .3]);
imshow(overlay1)
this is not very helpful
mask_em = imextendedmax(I_eq, 20);
imshow(mask_em)
mask_em = imclose(mask_em, ones(1,2));
mask_em = imfill(mask_em, 'holes');
mask_em = bwareaopen(mask_em, 4);
overlay2 = imoverlay(I_eq, bw4_perim | mask_em, [.3 1 .3]);
imshow(overlay2)
I_eq_c = imcomplement(I_eq);
I_mod = imimposemin(I_eq_c, ~bw4);% | mask_em);
L = watershed(I_eq_c);
imshow(label2rgb(L))
L2 = watershed(L);
imshow(label2rgb(L2))
bw5_perim = bwperim(L);
overlay3 = imoverlay(I_eq, bw5_perim, [.3 1 .3]);
end
imshow(overlay3)
Réponse acceptée
Plus de réponses (1)
Peyman Obeidy
le 22 Sep 2016
0 votes
Catégories
En savoir plus sur Quantization, Projection, and Pruning dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
