⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fitness1.m

📁 利用matlab编写的求解融合后的图像的评价函数
💻 M
字号:
function [net]=gatrain(net,image11,image22)
     image1=imread('image11.gif');
     image2=imread('image22.gif');
     bounds=ones(121,1)*[0 1];
     initPop=initializega(121,bounds,'');
     [a,b]=size(initPop);
     
     [p,endPop,bPop,trace]=ga(bounds,'fitness1',[],initPop,[1e-6 1 1],'maxGenTerm',25,'normGeomSelect',[0.08],['arithXover'],[2],'nonUnifMutation',[2 25 3]);
     
     for i=1:121 
         x(i)=endPop(1,i); 
     end;
     for i=1:6
         for j=1:9
             net.LW{4,2}(i,j)=x(1,(i-1)*9+j);
         end;
     end;
     for i=1:6
         for j=1:9
             net.LW{4,3}(i,j)=x(1,54+(i-1)*9+j);
         end;
     end;
     for i=1:3
         net.LW{7,5}(1,i)=x(1,108+i);
     end;
     for i=1:3
         net.LW{7,6}(1,i)=x(1,111+i);
     end;
     for i=1:6
         net.b{4,1}(i,1)=x(1,114+i);
     end;
     net.b{7,1}=[x(121)];
     

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -