clc
clear
close all
%% dataset:
for image=1:33
image
Iref=dicomread(['RIDER dataset/ref/1 (',num2str(image),').dcm']);
Igt=dicomread(['RIDER dataset/GT/1 (',num2str(image),').dcm']);
fim=(double(Iref)/(max(max(double(Iref)))));
GT=logical(Igt);
maxwin=0;
for i=30:5:size(GT,1)-100
for j=30:5:size(GT,2)-100
window=GT(i:i+90,j:j+90);
if sum(sum(window))>maxwin
maxwin=sum(sum(window));
bestwin=window;
besti=i;
bestj=j;
end
end
end
GT=bestwin;
fim=fim(besti:besti+90,bestj:bestj+90);
subplot(1,4,1)
imshow(GT);
title('Ground Truth');
%% fcm
[bwfim,level]=threshold1(fim);
%% kmeans
[bwfim2,level2]=threshold2(fim);
%% Cuckoo + Kmeans
[bwfim3,level3]=threshold3(fim);
%%
result=(bwfim);
nResult=sum(sum(result==1));
nGT=sum(sum(GT==1));
nUNI=0;
for i=1:numel(GT)
if result(i)==1 && GT(i)==1
nUNI=nUNI+1;
end
end
Q_fcm= nUNI/nGT * nUNI/nResult;
subplot(1,4,2)
imshow(bwfim);
title(['FCM/ Q=',num2str(Q_fcm)]);
%%
result=(bwfim2);
nResult=sum(sum(result==1));
nGT=sum(sum(GT==1));
nUNI=0;
for i=1:numel(GT)
if result(i)==1 && GT(i)==1
nUNI=nUNI+1;
end
end
Q_km= nUNI/nGT * nUNI/nResult;
subplot(1,4,3)
imshow(bwfim2);
title(['Kmeans/ Q=',num2str(Q_km)]);
%%
result=bwfim3;
nResult=sum(sum(result==1));
nGT=sum(sum(GT==1));
nUNI=0;
for i=1:numel(GT)
if result(i)==1 && GT(i)==1
nUNI=nUNI+1;
end
end
Qc= nUNI/nGT * nUNI/nResult;
subplot(1,4,4)
imshow(bwfim3);
title(['Cuckoo/ Q=',num2str(Qc)]);
pause(0.1)
QQ=[Q_fcm,Q_km,Qc];
xlswrite('xl.xlsx',QQ,1,['A',num2str(image)])
end
没有合适的资源?快使用搜索试试~ 我知道了~
基于Kmean聚类实现乳腺肿瘤分割附matlab代码.zip
共74个文件
dcm:66个
m:6个
xlsx:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 3 下载量 153 浏览量
2022-10-26
21:09:01
上传
评论 1
收藏 2.08MB ZIP 举报
温馨提示
1.版本:matlab2019a,不会运行可私信 2.领域:【图像分割】 3.内容:基于Kmean聚类实现乳腺肿瘤分割附matlab代码 4.适合人群:本科,硕士等教研学习使用
资源推荐
资源详情
资源评论
收起资源包目录
【图像分割】基于Kmean聚类实现乳腺肿瘤分割附matlab代码.zip (74个子文件)
newcode.m 2KB
threshold1.m 348B
threshold2.m 200B
km.m 2KB
xl.xlsx 10KB
1.png 11KB
k_means.m 551B
threshold3.m 323B
RIDER dataset
ref
1 (7).dcm 163KB
1 (14).dcm 163KB
1 (6).dcm 163KB
1 (17).dcm 163KB
1 (9).dcm 163KB
1 (4).dcm 163KB
1 (11).dcm 163KB
1 (31).dcm 163KB
1 (3).dcm 163KB
1 (24).dcm 163KB
1 (22).dcm 163KB
1 (27).dcm 163KB
1 (33).dcm 163KB
1 (16).dcm 163KB
1 (5).dcm 163KB
1 (21).dcm 163KB
1 (28).dcm 163KB
1 (8).dcm 163KB
1 (29).dcm 163KB
1 (1).dcm 163KB
1 (23).dcm 163KB
1 (25).dcm 163KB
1 (10).dcm 163KB
1 (2).dcm 163KB
1 (18).dcm 163KB
1 (30).dcm 163KB
1 (12).dcm 163KB
1 (19).dcm 163KB
1 (13).dcm 163KB
1 (20).dcm 163KB
1 (26).dcm 163KB
1 (15).dcm 163KB
1 (32).dcm 163KB
GT
1 (7).dcm 163KB
1 (14).dcm 163KB
1 (6).dcm 163KB
1 (17).dcm 163KB
1 (9).dcm 163KB
1 (4).dcm 163KB
1 (11).dcm 163KB
1 (31).dcm 163KB
1 (3).dcm 163KB
1 (24).dcm 163KB
1 (22).dcm 163KB
1 (27).dcm 163KB
1 (33).dcm 163KB
1 (16).dcm 163KB
1 (5).dcm 163KB
1 (21).dcm 163KB
1 (28).dcm 163KB
1 (8).dcm 163KB
1 (29).dcm 163KB
1 (1).dcm 163KB
1 (23).dcm 163KB
1 (25).dcm 163KB
1 (10).dcm 163KB
1 (2).dcm 163KB
1 (18).dcm 163KB
1 (30).dcm 163KB
1 (12).dcm 163KB
1 (19).dcm 163KB
1 (13).dcm 163KB
1 (20).dcm 163KB
1 (26).dcm 163KB
1 (15).dcm 163KB
1 (32).dcm 163KB
共 74 条
- 1
资源评论
- 普通网友2023-02-21资源很受用,资源主总结的很全面,内容与描述一致,解决了我当下的问题。
- 翻斗花园张奶奶2024-04-23这个资源内容超赞,对我来说很有价值,很实用,感谢大佬分享~
- 2301_766474872023-03-03发现一个宝藏资源,资源有很高的参考价值,赶紧学起来~
天天Matlab科研工作室
- 粉丝: 2w+
- 资源: 7255
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功