资源描述:
《基于模糊理论的图像分割算法研究(四)论文》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、基于模糊理论的图像分割算法研究(四)论文6.4实验结论本文所讨论的基于遗传算法的图像分割算法,采用标准遗传算法作为计算流程,但对其中的选择算子进行了改变,用高级选择函数select代替了传统的单一选择算子,使得在每次选择运算后所得的父辈更为健壮,更好的保持了第一代父辈的表现型,使得分割更加精确。通过设计变异概率,使得每次迭代遗传运算后.freelageprocessinghandbook.NeationandContro1,1965,(8):338-35321LotfiA.Zadeh,Afuzzy-s
2、et-theoreticinterpretationoflinguistichedges,JournalofCyberic,.freelageEnhancementUsingFuzzySets.Electron.Lett.,198016(9):376-378.23S.K.PaI,R.:A.King,OnEdgeDetectionofR-RayImagesUsingFuzzySets.IEEETrans.Patt.AnalandMachineIntell.1983,PAMI-5(1):69-77.24O
3、tsuN.AThresholdSelectionMethodFromGrayLevelHistograms.IEEETransonSystManCyber,1979,SMC-9:62-66附录附录一灰度直方图双峰法分割源代码clear,closeallB=imread('2.jpg');%读入原始jpg格式图像figure(1);imshoshoap1=gray2ind(I1,255);%将灰度图像转化为索引图像figure(3),imhist(I1)%画出灰度直方图,以判断域值I1=double(I
4、1);%将unit8数组转化为double型数组Z=I1%将double型数组I1转存到Z中m,n=size(Z);fori=1:mforj=1:nifZ(i,j)240%灰度值大于域值时是白色Z(i,j)=256;endendendfigure(4)%画出分割后目标图像image(Z),title('分割后图像');colormap(map1);图像I图像格式转化及灰度直方图双峰法分割源代码clear,closeallB=imread('she.jpg');%读入原始jpg格式图像shefigure
5、(1);imshoshoap1=gray2ind(I1,255);%将灰度图像转化为索引图像figure(3),imhist(I1)%画出灰度直方图,以判断域值I1=double(I1);%将unit8数组转化为double型数组Z=I1%将double型数组I1转存到Z中m,n=size(Z);fori=1:mforj=1:nifZ(i,j)240%灰度值大于域值时是白色Z(i,j)=256;endendendfigure(4)%画出分割后目标图像image(Z),title('分割后图像');co
6、lormap(map1);图像II图像格式转化及灰度直方图双峰法分割源代码clear,closeallB=imread('she.jpg');%读入原始jpg格式图像月亮figure(1);imshoshoap1=gray2ind(I1,255);%将灰度图像转化为索引图像figure(3),imhist(I1)%画出灰度直方图,以判断域值I1=double(I1);%将unit8数组转化为double型数组Z=I1%将double型数组I1转存到Z中m,n=size(Z);fori=1:mforj=
7、1:nifZ(i,j)240%灰度值大于域值时是白色Z(i,j)=256;endendendfigure(4)%画出分割后目标图像image(Z),title('分割后图像');colormap(map1);附录二Crtbp函数源代码:(由谢菲尔德大学Andre-Createaninitialpopulation%%Thisfunctioncreatesabinarypopulationofgivensizeandstructure.%%Syntax:ChromLindBaseV=crtbp(Nind
8、,Lind,Base)%%InputParameters:%%Nind-Eitherascalarcontainingthenumberofindividuals%intheneberofindividualsandtheirlength.%%Lind-Ascalarcontainingthelengthoftheindividual%chromosomes.%%Base-Ascalarcontainingthebaseofthechromosome%e