Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2008-12-02
年龄: 45
帖子: 3
声望力: 0 ![]() |
![]()
I=imread('22.bmp');
[x,y]=size(I); BW = bwperim(I); P1=0; P2=0; Ny=0; for i=1:x for j=1:y if (BW(i,j)>0) P2=j; if ((P2-P1)==1) Ny=Ny+1; end P1=P2; end end end P1=0; P2=0; Nx=0; for j=1:y for i=1:x if (BW(i,j)>0) P2=i; if ((P2-P1)==1) Nx=Nx+1; end P1-P2; end end end SN=sum(sum(BW)); Nd=SN-Nx-Ny; H=max(sum(I)); W=max(sum(I')); L=sqrt(2)*Nd+Nx+Ny; A=bwarea(I); C=4*pi*A/(L*L); R=A/(H*W); E=min(H,W)/max(H,W); Ath1=10000; Ath2=50000; Cth=0.5; Rth=0.5; Eth=0.8; if ((A>=Ath1)&&(A<Ath2)) if ((C>=Cth)&&(R<=Rth)&&(E>Eth)) Cancer_Right=1 end else if (A>=Ath2) Cancer_Right=2 else Cancer_Right=0 end end figure(1); imshow(I); figure(2); imshow(BW); 这个程序是检测痰里癌细胞用的 想请高手 帮我解释一下 另外用于识别癌细胞的阈值 Ath1=10000; Ath2=50000; Cth=0.5; Rth=0.5; Eth=0.8; 是如何得到的 万分的感谢 |
![]() |
![]() |
|
|
![]() |
||||
主题 | 主题作者 | 版面 | 回复 | 最后发表 |
[求助]如何将Simulink模型的仿真时间设置为30分钟 | 我爱仿真 | MATLAB论坛 | 3 | 2010-05-21 21:04 |
Matlab声音合成和滤波的问题【附代码-自己写的】 | xmuer | MATLAB论坛 | 4 | 2008-12-17 08:58 |
[求助]请问matlab里面有自适应数据平滑算法嘛? | ultrafrost | MATLAB论坛 | 0 | 2008-11-23 16:49 |
GM(1,1) | lvlianggan | MATLAB论坛 | 2 | 2008-11-07 22:52 |
Studying the World's Most Complex Dynamic Systems | TechnicalArticles | MATLAB技术文章 | 0 | 2008-08-29 00:40 |