资源简介

用形态学方法和区域增长法进行MRI脑肿瘤图像分割

资源截图

代码片段和文件信息

function seg_result=segmentation(original_image)

I=original_image;
M=max(I(:));
I=round(I.*255/M);
N=256;

for i=1:N
    for j=1:N
        if(I(ij)<=30) %灰度小于30的点统一认为是背景
           I(ij)=0;
        end
    end
end
I_ad=imadjust(I/255[0.1 0.5][0 1]1);%增强对比度
I_ad=I_ad*255;

%figureimshow(I_ad[])

colum=60;
[countindex]=imhist(I_ad/255colum);
tolBrain=size(find(I_ad));
brainTol=tolBrain(1);
thredcount=0;
brainRate=0.5;
i=2;
while (i         thredcount=thredcount+count(i);
         thred_h=index(i);
         i=i+1;
end
i=2;
while i         if count(i)~=0;         
         thred_l=index(i+1);  
         break;
         end
      i=i+1;
end

I_ro=roicolor(I_adthred_l*255th

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3072  2009-05-08 12:43  MRI_image_segmentation\segmentation.m

     文件      33141  2009-04-19 00:22  MRI_image_segmentation\s_case1.mat

     文件        209  2009-05-08 12:26  MRI_image_segmentation\test_segmentation_2.m

     文件    7412229  2009-04-19 00:22  MRI_image_segmentation\v_case1.mat

     目录          0  2010-12-11 20:16  MRI_image_segmentation

----------- ---------  ---------- -----  ----

              7448651                    5


评论

共有 条评论