资源描述:
《超分辨图像重建(附程序).docx》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、clearall;closeall;I1=imread('C:UsersSteveDesktop图像重建qie.jpg');h=ones(4,4)/16;I2=imfilter(I1,h);figure(1);imshow(I1),title('原始图像');figure(2);imshow(I2),title('低分辨率的图像');%用双线性插值方法获得插值图像Y1[Y1,map]=imresize(I2,0.5,'bilinear');[Y2,map]=imresize(I2,0.5
2、);[c,s]=wavedec2(Y1,2,'haar');sizey1=size(Y1);Xa1=appcoef2(c,s,'haar',1);Xh1=detcoef2('h',c,s,1);Xv1=detcoef2('v',c,s,1);Xd1=detcoef2('d',c,s,1);ded1=[Xa1,Xh1,Xv1,Xd1];nbcol=size(map,1);[c,s]=wavedec2(Y2,2,'haar');sizey2=size(Y2);Xa2=appcoef2(c,s,'haa
3、r',1);Xh2=detcoef2('h',c,s,1);Xv2=detcoef2('v',c,s,1);Xd2=detcoef2('d',c,s,1);ded1=[Xa2,Xh2,Xv2,Xd2];nbcol=size(map,1);Y=idwt2(Xa2,Xh2,Xv2,Xd2,'haar');nbcol=size(map,1);figure(3);imshow(Y),title('获得的超分辨率图像');