regiongrow 脑.doc

  1. 1、本文档共5页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
regiongrow 脑

clc; clear; tic; %I=imread(d:\我的文档\MATLAB\test\人脸.jpg); I=imread(G:\标准图片\bmp1\ch2bet102.bmp); %figure,imshow(I,[]); %I=imfilter(I,fspecial(gaussian),replicate); Std1=imread(G:\标准图片\bmpwm\ch2bet_seg2102.bmp);%脑白质 Std2=imread(G:\标准图片\bmpgm\ch2bet_seg1102.bmp);%脑灰质 Std3=imread(G:\标准图片\bmpcsf\ch2bet_seg3102.bmp);%脑脊液 % figure % subplot(1,3,1),imshow(Std1,[]); % title(原图脑白质); % subplot(1,3,2),imshow(Std2,[]); % title(原图脑灰质); % subplot(1,3,3),imshow(Std3,[]); % title(原图脑脊液) Std1=im2bw(Std1,graythresh(Std1)); Std2=im2bw(Std2,graythresh(Std2)); Std3=im2bw(Std3,graythresh(Std3)); % [std1x,std1y]=size(Std1); % for stdx=1:std1x % for stdy=1:std1y % if(Std1(stdx,stdy)150) % Std1(stdx,stdy)=1; % else Std1(stdx,stdy)=0; % end % if(Std2(stdx,stdy)150) % Std2(stdx,stdy)=1; % else % Std2(stdx,stdy)=0; % end % if(Std3(stdx,stdy)60) % Std3(stdx,stdy)=1; % else % Std3(stdx,stdy)=0; % end % % end % end figure subplot(1,3,1),imshow(Std1,[]); title(二值化脑白质); subplot(1,3,2),imshow(Std2,[]); title(二值化脑灰质); subplot(1,3,3),imshow(Std3,[]); title(二值化脑脊液); %I=I(:,:,1); Image=I; [m,n,s]=size(I); TempImage=zeros(m,n); %subplot(2,1,1),imshow(I,[]); %figure,imshow(Std1,[]); %h1=imhist(Image);%h为列向量 %figure,plot(h1); %I=histeq(Image); h=imhist(I);%h为列向量 %figure,plot(h); %subplot(2,1,2),plot(h); h=h; deta=[]; halfwindow=10; for i=halfwindow+1:256-halfwindow summ=0; for window=1:halfwindow detah1=h(i-window)-h(i); detah2=h(i+window)-h(i); left=detah1/sqrt((halfwindow.^2+detah1.^2));%sin(a1) right=detah2/sqrt((halfwindow.^2+detah2.^2));%sin(a2) summ=summ+abs(left+right); %求和(|sin(a1)+sin(a2)|) end if(left=0right=0) s(i)=summ ; %s中存放没有排序的sum值,其下表i即为对应的灰度值,也即横坐标的值 deta(end+1)=s(i); end end s=[s,zeros(1,halfwindow)];%补全到256个值 b=sort(s,descend); k=[]; a=[]; %subplot(2,1,2),plot(h); h=

文档评论(0)

xcs88858 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档