分水岭matlab仿真,正确使用Matlab分水岭算法对细胞进行分割

博主在应用分水岭算法进行细胞图像分割时遇到困难,发现算法将单一细胞分割成多个小单元。尝试了使用顶帽滤波、阈值处理和距离变换等方法,但结果仍不理想。尽管能够识别出部分细胞,但过度分割问题依然存在。博主寻求帮助,希望找到优化图像处理和分水岭算法的方法,以准确分割细胞图像。
摘要由CSDN通过智能技术生成

我've run into a ton of trouble trying to get the watershed algorithm properly working on my images. In the various tutorials online they always seem to use images that are just as complicated/fuzzy and so I'我不确定我的错误 . 我've already made a couple of spotty posts on this, but wanted to really clarify and ask generally. That said, I'm使用的图像如下:

1b301498-6979-4623-a5f2-2424aa5ec00b.jpg

但是,当我尝试应用其中一个分水岭算法时:

imshow(RGB,[]);

gray_img = rgb2gray(RGB);

tophat_filter = imtophat(gray_img, strel('disk', 10)); %Read into this

level = graythresh(tophat_filter);

BW = im2bw(tophat_filter,level);

imshow(BW)

BW = bwdist(BW) <= 3;

imshow(BW)

bgn_remove = bwareaopen(BW,8); %remove background noise

D = -bwdist(~bgn_remove); %Read into this

D(~BW) = -Inf;

L = watershed(D);

figure;

imshow(L,[]);

figure;

imshow(label2rgb(L))

clean_img = im2bw(L,0.001);

figure;

imshow(clean_img,[]);

它似乎永远不会起作用 . 无论出于何种原因,它确定每个单元格包含一堆较小的单元格:

764b60d8-7eaf-44b1-a269-e436d2f696c3.jpg

我试图通过使用 BW = bwdist(BW) <= 3; 聚集segmeneted组件来解决这个问题,以便图像不是碎片化的:

acc93c6d-9eb6-434b-a3f9-5f909f5d5a07.jpg

如第一张图片中所示,应该有3个细胞,虽然分水岭确实识别出左侧的两个不同的细胞 - 它的注册量超过应有的程度(即使在聚集后) . 在我尝试过的所有内容之后,我没有取得多大进展,所以任何帮助或建议都会非常感激 .

在完成整个分水岭程序后,我最终得到了最大值:

23d6186a-779c-46ff-aae6-730d04fc35c3.jpg

0830306f-7860-428c-bc69-87cda78d8e67.jpg

93394bfd-e25e-4839-bc1d-da90cfd55788.jpg

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值