ImageVerifierCode 换一换
格式:DOCX , 页数:38 ,大小:23.62KB ,
资源ID:4489983      下载积分:9 金币
验证码下载
登录下载
邮箱/手机:
验证码: 获取验证码
温馨提示:
支付成功后,系统会自动生成账号(用户名为邮箱或者手机号,密码是验证码),方便下次登录下载和查询订单;
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/4489983.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  
声明  |  会员权益     获赠5币     写作写作

1、填表:    下载求助     留言反馈    退款申请
2、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
3、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
4、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
5、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前自行私信或留言给上传者【丰****】。
6、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
7、本文档遇到问题,请及时私信或留言给本站上传会员【丰****】,需本站解决可联系【 微信客服】、【 QQ客服】,若有其他问题请点击或扫码反馈【 服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【 版权申诉】”(推荐),意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:4008-655-100;投诉/维权电话:4009-655-100。

注意事项

本文(基于模糊理论的图像分割算法研究(四).docx)为本站上传会员【丰****】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4008-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

基于模糊理论的图像分割算法研究(四).docx

1、基于模糊理论的图像分割算法研究(四)实验结论本文所讨论的基于遗传算法的图像分割算法,采用标准遗传算法作为计算流程,但对其中的选择算子进行了改变,用高级选择函数select代替了传统的单一选择算子,使得在每次选择运算后所得的父辈更为健壮,更好的保持了第一代父辈的表现型,使得分割更加精确。通过设计变异概率,使得每次迭代遗传运算后,子代的表现型略有改变,从而更以获得最优的表现型,减少了迭代寻优次数,降低了程序运行时间。同时考虑到过多迭代不利于降低程序运行时间,以及在寻优过程中的最佳值收敛问题,指定迭代次数为50次时即跳出整个程序,通过反编码求得最优阈值,并通过变量调用,直接应用于下面的分割程序,达到

2、了整个算法的自动完成。相对于灰度直方图双峰法,本方法对图像的先验信息要求不高,不需要像灰度直方图法那样,先通过获得图像的灰度直方图取得分割阈值后再对图像处理,整个程序的自动化程度高,且对于那些灰度直方图不呈双峰分布的图像,本算法程序一样可以处理,这就扩大了本算法程序的灵活性,从而更具有实际意义。而且,由于灰度直方图双峰法的阈值是通过人眼观察获得,其误差必然大于机器迭代运算所取得的最优阈值,而普通的阈值分割法,如ostu法,虽然实现了阈值的自动选择,但其运算时间与本算法相比偏长,实时性差于本算法。因此,在图像分割算法中,基于遗传算法的图像分割算法更优于其它传统的图像分割算法。通过上述讨论,以及两

3、种方法的处理结果图片的对比,基于遗传算法的最大类间方差法分割后图像与直方图双峰法分割后的图像像比,效果更明显,且无须事先测量图像的灰度直方图,更加灵活,更加精确。其相关试验结论列于下表基于遗传算法的图象分割实验结论总表:分割方法自动化程度阈值灰度直方图计算时间分割结果灰度直方图法无法自动完成基于遗传算法的Ostu法高阈值自动指定,阈值M=162,短于普通Ostu法普通Ostu法高阈值自动指定偏长参见参考文章25参 考 文 献1张兆礼,赵春晖,梅晓丹.现代图像处理技术及MAThAB实现.北京:人民邮电出版社,陈传波,金先级.数字图像处理M.北京:机械工业出版社,2004.夏德深,傅德胜等.现代图

4、象处理技术与应用M.南京:东南大学出版社,1997.章毓晋.图象工程(上册)图象处理和分析.北京:清华大学出版社,1999.王小平,曹立明.遗传算法理论、应用与软件实现.西安:西安交大出版社,2002.徐立中,数字图像的智能信息处理。北京:国防工业出版社,2001王耀南,李树涛,毛建旭,计算机图像处理与识别技术,北京:高等教育出版社,2001雷英杰,张善文,李绪武,周创明.MATLAB遗传算法工具箱及应用,西安:西安电子科技大学出版社何新贵.模糊知识处理的理论与计算,国防工业出版社,199910徐建华.图像处理与分析,北京:科学出版,1992.11阮秋琦.数字图象处理学,电子工业出版社,200

5、112王博等.图像平滑与边缘检测的模糊向量描述,小型微型计算机统,Vol. 20(3), 199913吴谨,李娟,刘成云,基于最大熵的灰度阈值选取方法,武汉科技大学学报(自然科学版),Vol. 27, No. 1, Mar, 200414李鉴庆,左坤隆,图像阈值选取的一种快速算法.计算机与现代化,2001年第6期15魏宝刚,鲁东明,潘云鹤等.多颜色空间上的互式图像分割J.计算机学报,2001, 24 (7):770-77516杜亚勤,基于模糊集的图像边缘检测技术研究:硕士学位论文.西安:西安工业学院,2004年4月17王保平,基于模糊技术的图像处理方法研究博士学位论文,西安:西安电子科技大学,

6、2004, 918杜亚娟,潘泉,周德龙等,图像多级灰度非线性模糊增强算法研究,数据采集与处19Russ J C, The image processing handbook. New York:CRC Press,199420L ASetsJ.Information and Contro1,1965, (8):338-35321Lotfi ,A fuzzy-set-theoretic interpretation of linguistic hedges, Journal of Cybernetic, 1972, 64(2):4-3422S. K. Pal, R. A. King. Image

7、 Enhancement Using Fuzzy Sets. Electron. Let t.,1980 16 (9):376-378.23S. K. PaI, R. :A. King, On Edge Detection of R-Ray Images Using Fuzzy Sets. IEEEAnal and ,PAMI-5 (1):69-77.24Otsu N. A Threshold Selection Method From Gray Level Histograms. IEEE Trans on Syst Man Cybernet, 1979, SMC-9:62-66附 录 附录

8、 一灰度直方图双峰法分割源代码clear, close allB=imread(); %读入原始jpg格式图像figure(1);imshow(B),title(原始jpg格式图像);I1=rgb2gray(B); %将原图像转化为灰度图象figure(2);imshow(I1),title(灰度格式图像);I1,map1=gray2ind(I1,255); %将灰度图像转化为索引图像figure(3), imhist(I1) %画出灰度直方图,以判断域值I1=double(I1); %将unit8数组转化为double型数组Z=I1 %将double型数组I1转存到Z中m, n=size(Z

9、);for i=1:m for j=1:n if Z(i,j)240 %灰度值大于域值时是白色 Z(i,j)=256; end end endfigure(4) %画出分割后目标图像image(Z),title(分割后图像);colormap(map1);图像I图像格式转化及灰度直方图双峰法分割源代码clear, close allB=imread(); %读入原始jpg格式图像shefigure(1);imshow(B),title(原始jpg格式图像);I1=rgb2gray(B); %将原图像转化为灰度图象figure(2);imshow(I1),title(灰度格式图像);I1,map

10、1=gray2ind(I1,255); %将灰度图像转化为索引图像figure(3), imhist(I1) %画出灰度直方图,以判断域值I1=double(I1); %将unit8数组转化为double型数组Z=I1 %将double型数组I1转存到Z中m, n=size(Z);for i=1:m for j=1:n if Z(i,j)240 %灰度值大于域值时是白色 Z(i,j)=256; end end endfigure(4) %画出分割后目标图像image(Z),title(分割后图像);colormap(map1);图像II图像格式转化及灰度直方图双峰法分割源代码clear, cl

11、ose allB=imread(); %读入原始jpg格式图像月亮figure(1);imshow(B),title(原始jpg格式图像);I1=rgb2gray(B); %将原图像转化为灰度图象figure(2);imshow(I1),title(灰度格式图像);I1,map1=gray2ind(I1,255); %将灰度图像转化为索引图像figure(3), imhist(I1) %画出灰度直方图,以判断域值I1=double(I1); %将unit8数组转化为double型数组Z=I1 %将double型数组I1转存到Z中m, n=size(Z);for i=1:m for j=1:n

12、if Z(i,j)240 %灰度值大于域值时是白色 Z(i,j)=256; end end endfigure(4) %画出分割后目标图像image(Z),title(分割后图像);colormap(map1);附录 二Crtbp 函数源代码:%- Create an initial population% This function creates a binary population of given size and structure.% Syntax: Chrom Lind BaseV = crtbp(Nind, Lind, Base)% Input Parameters:% Ni

13、nd - Either a scalar containing the number of individuals% in the new population or a row vector of length two% containing the number of individuals and their length.% Lind - A scalar containing the length of the individual% chromosomes.% Base - A scalar containing the base of the chromosome% elemen

14、ts or a row vector containing the base(s)% of the loci of the chromosomes.% Output Parameters:% Chrom - A matrix containing the random valued chromosomes% row wise.% Lind - A scalar containing the length of the chromosome.% BaseV - A row vector containing the base of the% chromosome loci.% Author: A

15、ndrew Chipperfield% Date: 19-Jan-94function Chrom, Lind, BaseV = crtbp(Nind, Lind, Base)nargs = nargin ;% Check parameter consistencyif nargs = 1, mN, nN = size(Nind) ; endif nargs = 2, mL, nL = size(Lind) ; endif nargs = 3, mB, nB = size(Base) ; endif nN = 2 if (nargs = 1) Lind = Nind(2) ; Nind = N

16、ind(1) ; BaseV = crtbase(Lind) ; elseif (nargs = 2 & nL = 1) BaseV = crtbase(Nind(2),Lind) ; Lind = Nind(2) ; Nind = Nind(1) ; elseif (nargs = 2 & nL1) if Lind = length(Lind), error(Lind and Base disagree); end BaseV = Lind ; Lind = Nind(2) ; Nind = Nind(1) ; end elseif nN = 1 if nargs = 2 if nL = 1

17、, BaseV = crtbase(Lind) ; else, BaseV = Lind ; Lind = nL ; end elseif nargs = 3 if nB = 1, BaseV = crtbase(Lind,Base) ; elseif nB = Lind, error(Lind and Base disagree) ; else BaseV = Base ; end end else error(Input parameters inconsistent) ; end% Create a structure of random chromosomes in row wise

18、order, dimensions% Nind by Lind. The base of each chromosomes loci is given by the value% of the corresponding element of the row vector base.Chrom = floor(rand(Nind,Lind).*BaseV(ones(Nind,1),:) ;% End of file附录 三Bs2rv函数源代码:%- Binary string to real vector% This function decodes binary chromosomes in

19、to vectors of reals. The% chromosomes are seen as the concatenation of binary strings of given% length, and decoded into real numbers in a specified interval using% either standard binary or Gray decoding.% Syntax: Phen = bs2rv(Chrom,FieldD)% Input parameters:% Chrom - Matrix containing the chromoso

20、mes of the current% population. Each line corresponds to one% individuals concatenated binary string% representation. Leftmost bits are MSb and% rightmost are LSb.% FieldD - Matrix describing the length and how to decode% each substring in the chromosome. It has the% following structure:% len; (num)

21、% lb; (num)% ub; (num)% code; (0=binary | 1=gray)% scale; (0=arithmetic | 1=logarithmic)% lbin; (0=excluded | 1=included)% ubin; (0=excluded | 1=included)% where% len - row vector containing the length of% each substring in Chrom. sum(len)% should equal the individual length.% lb,% ub - Lower and up

22、per bounds for each% variable.% code - binary row vector indicating how each% substring is to be decoded.% scale - binary row vector indicating where to% use arithmetic and/or logarithmic% scaling.% lbin,% ubin - binary row vectors indicating whether% or not to include each bound in the% representat

23、ion range% Output parameter:% Phen - Real matrix containing the population phenotypes.% Author: Carlos Fonseca, Updated: Andrew Chipperfield% Date: 08/06/93, Date: 26-Jan-94function Phen = bs2rv(Chrom,FieldD)% Identify the population size (Nind)% and the chromosome length (Lind)Nind,Lind = size(Chro

24、m);% Identify the number of decision variables (Nvar)seven,Nvar = size(FieldD);if seven = 7 error(FieldD must have 7 rows.); end% Get substring propertieslen = FieldD(1,:);lb = FieldD(2,:);ub = FieldD(3,:);code = (FieldD(4,:);scale = (FieldD(5,:);lin = (FieldD(6,:);uin = (FieldD(7,:);% Check substri

25、ng properties for consistencyif sum(len) = Lind, error(Data in FieldD must agree with chromosome length); endif all(lb(scale).*ub(scale)0) error(Log-scaled variables must not include 0 in their range); end% Decode chromosomesPhen = zeros(Nind,Nvar);lf = cumsum(len);li = cumsum(1 len);Prec = .5 . len

26、;logsgn = sign(lb(scale);lb(scale) = log( abs(lb(scale) );ub(scale) = log( abs(ub(scale) );delta = ub - lb;Prec = .5 . len;num = (lin) .* Prec;den = (lin + uin - 1) .* Prec;for i = 1:Nvar, idx = li(i):lf(i); if code(i) % Gray decoding Chrom(:,idx)=rem(cumsum(Chrom(:,idx),2); end Phen(:,i) = Chrom(:,

27、idx) * (.5).(1:len(i) ; Phen(:,i) = lb(i) + delta(i) * (Phen(:,i) + num(i) ./ (1 - den(i); endexpand = ones(Nind,1);if any(scale) Phen(:,scale) = logsgn(expand,:) .* exp(Phen(:,scale); end附录 四适应度函数target源代码function f=target(T,M) %适应度函数,T为待处理图像,M为域值序列U, V=size(T);W=, , length(M);f=zeros(W,1);for k=1:

28、W I=0;s1=0;J=0;s2=0; %统计目标图像和背景图像的像素数及像素之和 for i=1:U for j=1:V if T(i,j)=M(k) s1=s1+T(i,j);I=I+1; end if T(i,j)M(k) s2=s2+T(i,j);J=J+1; end end end if I=0, p1=0; else p1=s1/I; end if J=0, p2=0; else p2=s2/J; end f(k)=I*J*(p1-p2)*(p1-p2)/(256*256); end附录 五选择函数Select源代码:%(universal SELECTion)% This fu

29、nction performs universal selection. The function handles% multiple populations and calls the low level selection function% for the actual selection process.% Syntax: SelCh = select(SEL_F, Chrom, FitnV, GGAP, SUBPOP)% Input parameters:% SEL_F - Name of the selection function% Chrom - Matrix containi

30、ng the individuals (parents) of the current% population. Each row corresponds to one individual.% FitnV - Column vector containing the fitness values of the% individuals in the population.% GGAP - (optional) Rate of individuals to be selected% if omittedis assumed% SUBPOP - (optional) Number of subp

31、opulations% if omitted 1 subpopulation is assumed% Output parameters:% SelCh - Matrix containing the selected individuals.% Author: Hartmut Pohlheim% History:file createdfunction SelCh = select(SEL_F, Chrom, FitnV, GGAP, SUBPOP);% Check parameter consistency if nargin3, error(Not enough input parame

32、ter); end % Identify the population size (Nind) NindCh,Nvar = size(Chrom); NindF,VarF = size(FitnV); if NindCh = NindF, error(Chrom and FitnV disagree); end if VarF = 1, error(FitnV must be a column vector); end if nargin5, SUBPOP = 1; end if nargin4, if isempty(SUBPOP), SUBPOP = 1; elseif isnan(SUB

33、POP), SUBPOP = 1; elseif length(SUBPOP) = 1, error(SUBPOP must be a scalar); end end if (NindCh/SUBPOP) = fix(NindCh/SUBPOP), error(Chrom and SUBPOP disagree); end Nind = NindCh/SUBPOP; % Compute number of individuals per subpopulation if nargin4, GGAP = 1; end if nargin3, if isempty(GGAP), GGAP = 1

34、; elseif isnan(GGAP), GGAP = 1; elseif length(GGAP) = 1, error(GGAP must be a scalar); elseif (GGAP0), error(GGAP must be a scalar bigger than 0); end end % Compute number of new individuals (to select) NSel=max(floor(Nind*GGAP+.5),2); % Select individuals from population SelCh = ; for irun = 1:SUBP

35、OP, FitnVSub = FitnV(irun-1)*Nind+1:irun*Nind); ChrIx=feval(SEL_F, FitnVSub, NSel)+(irun-1)*Nind; SelCh=SelCh; Chrom(ChrIx,:); end % End of function附录 六交叉函数recombin的源代码:%(RECOMBINation high-level function)% This function performs recombination between pairs of individuals% and returns the new indivi

36、duals after mating. The function handles% multiple populations and calls the low-level recombination function% for the actual recombination process.% Syntax: NewChrom = recombin(REC_F, OldChrom, RecOpt, SUBPOP)% Input parameters:% REC_F - String containing the name of the recombination or% crossover

37、 function% Chrom - Matrix containing the chromosomes of the old% population. Each line corresponds to one individual% RecOpt - (optional) Scalar containing the probability of% recombination/crossover occurring between pairs% of individuals.% if omitted or NaN, 1 is assumed% SUBPOP - (optional) Numbe

38、r of subpopulations% if omitted or NaN, 1 subpopulation is assumed% Output parameter:% NewChrom - Matrix containing the chromosomes of the population% after recombination in the same format as OldChrom.% Author: Hartmut Pohlheim% History:file createdfunction NewChrom = recombin(REC_F, Chrom, RecOpt,

39、 SUBPOP);% Check parameter consistency if nargin2, error(Not enough input parameter); end % Identify the population size (Nind) Nind,Nvar = size(Chrom); if nargin4, SUBPOP = 1; end if nargin3, if isempty(SUBPOP), SUBPOP = 1; elseif isnan(SUBPOP), SUBPOP = 1; elseif length(SUBPOP) = 1, error(SUBPOP m

40、ust be a scalar); end end if (Nind/SUBPOP) = fix(Nind/SUBPOP), error(Chrom and SUBPOP disagree); end Nind = Nind/SUBPOP; % Compute number of individuals per subpopulation if nargin3, RecOpt = ; end if nargin2, if isempty(RecOpt), RecOpt = ; elseif isnan(RecOpt), RecOpt = ; elseif length(RecOpt) = 1,

41、 error(RecOpt must be a scalar); elseif (RecOpt0 | RecOpt1), error(RecOpt must be a scalar in 0, 1); end end % Select individuals of one subpopulation and call low level function NewChrom = ; for irun = 1:SUBPOP, ChromSub = Chrom(irun-1)*Nind+1:irun*Nind,:); NewChromSub = feval(REC_F, ChromSub, RecO

42、pt); NewChrom=NewChrom; NewChromSub; end % End of function附录 七变异函数mut源代码 :% This function takes the representation of the current population,% mutates each element with given probability and returns the resulting% population.% Syntax: NewChrom = mut(OldChrom,Pm,BaseV)% Input parameters:% OldChrom -

43、A matrix containing the chromosomes of the% current population. Each row corresponds to% an individuals string representation.% Pm - Mutation probability (scalar). Default value% of Pm = /Lind, where Lind is the chromosome% length is assumed if omitted.% BaseV - Optional row vector of the same lengt

44、h as the% chromosome structure defining the base of the% individual elements of the chromosome. Binary% representation is assumed if omitted.% Output parameter:% NewChrom - A Matrix containing a mutated version of% OldChrom.% Author: Andrew Chipperfield% Date: 25-Jan-94function NewChrom = mut(OldChr

45、om,Pm,BaseV)% get population size (Nind) and chromosome length (Lind)Nind, Lind = size(OldChrom) ;% check input parametersif nargin2, Pm = /Lind ; endif isnan(Pm), Pm = /Lind; endif (nargin3), BaseV = crtbase(Lind); endif (isnan(BaseV), BaseV = crtbase(Lind); endif (isempty(BaseV), BaseV = crtbase(Lind); endif (nargin = 3) & (Lind = length(BaseV) error(OldChrom and BaseV are

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服