图像质量评价matlab源代码

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

%ObjectiveImageFusionPerformanceMeasurefunctionoutput=Qabf(strA,strB,strF)%strAandstrBisthesourceimagesandstrFisthefusionresult%modelparametersL=1;Tg=0.9994;kg=-15;Dg=0.5;Ta=0.9879;ka=-22;Da=0.8;%SobelOperatorh1=[121;000;-1-2-1];h2=[012;-101;-2-10];h3=[-101;-202;-101];%ifyistheresponsetoh1andxistheresponsetoh3;%thentheintensityissqrt(x^2+y^2)andorientationisarctan(y/x);pA=imread(strA);pA=double(pA);pB=imread(strB);pB=double(pB);pF=imread(strF);pF=double(pF);SAx=conv2(pA,h3,'same');SAy=conv2(pA,h1,'same');gA=sqrt(SAx.^2+SAy.^2);[M,N]=size(SAx);aA=zeros(M,N);fori=1:Mforj=1:Nif(SAx(i,j)==0)aA(i,j)=pi/2;elseaA(i,j)=atan(SAy(i,j)/SAx(i,j));endendendSBx=conv2(pB,h3,'same');SBy=conv2(pB,h1,'same');gB=sqrt(SBx.^2+SBy.^2);[M,N]=size(SBx);aB=zeros(M,N);fori=1:Mforj=1:Nif(SBx(i,j)==0)aB(i,j)=pi/2;elseaB(i,j)=atan(SBy(i,j)/SBx(i,j));endendendSFx=conv2(pF,h3,'same');SFy=conv2(pF,h1,'same');gF=sqrt(SFx.^2+SFy.^2);[M,N]=size(SAx);aF=zeros(M,N);fori=1:Mforj=1:Nif(SFx(i,j)==0)aF(i,j)=pi/2;elseaF(i,j)=atan(SFy(i,j)/SFx(i,j));endendend%therelativestrengthandorientationvalueofGAF,GBFandAAF,ABF;GAF=zeros(M,N);AAF=zeros(M,N);QgAF=zeros(M,N);QaAF=zeros(M,N);QAF=zeros(M,N);fori=1:Mforj=1:Nif(gA(i,j)gF(i,j))GAF(i,j)=gF(i,j)/gA(i,j);elseif(gA(i,j)==gF(i,j))GAF(i,j)=gF(i,j);elseGAF(i,j)=gA(i,j)/gF(i,j);endendAAF(i,j)=1-abs(aA(i,j)-aF(i,j))/(pi/2);QgAF(i,j)=Tg/(1+exp(kg*(GAF(i,j)-Dg)));QaAF(i,j)=Ta/(1+exp(ka*(AAF(i,j)-Da)));QAF(i,j)=QgAF(i,j)*QaAF(i,j);endendGBF=zeros(M,N);ABF=zeros(M,N);QgBF=zeros(M,N);QaBF=zeros(M,N);QBF=zeros(M,N);fori=1:Mforj=1:Nif(gB(i,j)gF(i,j))GBF(i,j)=gF(i,j)/gB(i,j);elseif(gB(i,j)==gF(i,j))GBF(i,j)=gF(i,j);elseGBF(i,j)=gB(i,j)/gF(i,j);endendABF(i,j)=1-abs(aB(i,j)-aF(i,j))/(pi/2);QgBF(i,j)=Tg/(1+exp(kg*(GBF(i,j)-Dg)));QaBF(i,j)=Ta/(1+exp(ka*(ABF(i,j)-Da)));QBF(i,j)=QgBF(i,j)*QaBF(i,j);endend%computetheQABFdeno=sum(sum(gA+gB));nume=sum(sum(QAF.*gA+QBF.*gB));output=nume/deno;

1 / 3
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功