How to identify and locate cells

5 次查看(过去 30 天)
AAS
AAS 2021-2-19
回答: yanqi liu 2021-2-20
I have processed the following image and need to identify the cells- location of cells and the count.
Once identified, I would like to fill the cells .
I=imcomplement(imflatfield(rgb2gray(imread('well1.png');
I-imgaussfilt(I,50);
imshow(I)
Because some are clumped, I did use the watershed algorithm but it did not work the way I liked. The image is below. I want the cell lining to be complete for all of them.
L = watershed(I);
Lrgb = label2rgb(L);
imshow(Lrgb)
imshow(imfuse(bw,Lrgb))
bw2 = ~bwareaopen(~bw, 10);
imshow(bw2)
D = -bwdist(~bw);
imshow(D,[])
Ld = watershed(D);
imshow(label2rgb(Ld))
Ld = watershed(D);
imshow(label2rgb(Ld))
bw2 = bw;
bw2(Ld == 0) = 0;
imshow(bw2)
mask = imextendedmin(D,2);
imshowpair(bw,mask,'blend')
D2 = imimposemin(D,mask);
Ld2 = watershed(D2);
bw3 = bw;
bw3(Ld2 == 0) = 0;
imshow(bw3)

回答(1 个)

yanqi liu
yanqi liu 2021-2-20

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by