资源简介
超分辨率重建SRCNN的GUI界面,打开即可使用,如果打开不了,检查有没有装对应版本的MCRInstaller.exe
代码片段和文件信息
% close all;
% clear all;
function [im_b psnr_bic ssimval_bic] = bicubic_demo_SRCNN_addConv(im ch)
psnr_bic = 0;
ssimval_bic = 0;
%% read ground truth image
%im = imread(‘Set5\butterfly_GT.bmp‘);
%im = imread(‘Set14\zebra.bmp‘);
%% set parameters
%up_scale = 3;
% model = ‘model\9-5-5(ImageNet)\x3.mat‘;
% up_scale = 3;
% model = ‘model\9-3-5(ImageNet)\x3.mat‘;
%up_scale = 3;
%model = ‘model\9-1-5(91 images)\x3.mat‘;
% up_scale = 2;
% model = ‘model\9-5-5(ImageNet)\x2.mat‘;
% up_scale = 4;
% model = ‘model\9-5-5(ImageNet)\x4.mat‘;
up_scale = 3;
%model = ‘model\x3v3_3800w.mat‘;
%% work on illuminance only
if size(im3)>1
im0 = rgb2ycbcr(im);
im = im0(: : ch);
end
im_gnd = modcrop(im up_scale);
im_gnd = single(im_gnd)/255;
%% bicubic interpolation
im_l = imresize(im_gnd 1/up_scale ‘bicubic‘);
im_b = imresize(im_l up_scale ‘bicubic‘);
%% SRCNN
%im_h = SRCNN_addConv(model im_b);
%% remove border
%im_h = shave(uint8(im_h * 255) [up_scale up_scale]);
im_gnd = shave(uint8(im_gnd * 255) [up_scale up_scale]);
im_b = shave(uint8(im_b * 255) [up_scale up_scale]);
if ch == 1
%% compute PSNR
psnr_bic = compute_psnr(im_gndim_b);
%psnr_srcnn = compute_psnr(im_gndim_h);
%% compute SSIM
[ssimval_bic ~] = ssim(im_gnd im_b);
%[ssimval_srcnn ~] = ssim(im_gnd im_h);
%% show results
%fprintf(‘PSNR for Bicubic Interpolation: %f dB\n‘ psnr_bic);
%fprintf(‘PSNR for SRCNN Reconstruction: %f dB\n‘ psnr_srcnn);
%fprintf(‘SSIM for Bicubic Interpolation: %f \n‘ ssimval_bic);
%fprintf(‘SSIM for SRCNN Reconstruction: %f \n‘ ssimval_srcnn);
end
% figure imshow(im_b); title(‘Bicubic Interpolation‘);
% figure imshow(im_h); title(‘SRCNN Reconstruction‘);
% imwrite(im_b [‘Bicubic Interpolation‘ ‘.bmp‘]);
% imwrite(im_h [‘SRCNN Reconstruction‘ ‘.bmp‘]);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1926 2018-04-27 16:57 SRCNN_Revise(GUI)\bicubic_demo_SRCNN_addConv.m
文件 314 2014-09-02 11:20 SRCNN_Revise(GUI)\compute_psnr.m
文件 1614 2018-04-27 16:58 SRCNN_Revise(GUI)\demo_SRCNN_addConv.m
文件 1980 2018-04-27 15:51 SRCNN_Revise(GUI)\demo_SRCNN_addConv.m_model
文件 279 2014-03-27 16:55 SRCNN_Revise(GUI)\modcrop.m
目录 0 2018-04-27 18:59 SRCNN_Revise(GUI)\model\
文件 35171 2018-04-13 13:20 SRCNN_Revise(GUI)\model\x3v3_3800w.mat
文件 110 2013-10-06 16:07 SRCNN_Revise(GUI)\shave.m
文件 4958709 2018-04-27 18:53 SRCNN_Revise(GUI)\showPic.exe
文件 53890 2018-04-27 18:37 SRCNN_Revise(GUI)\showPic.fig
文件 10171 2018-04-27 18:39 SRCNN_Revise(GUI)\showPic.m
文件 2296 2018-03-29 01:08 SRCNN_Revise(GUI)\SRCNN_addConv.m
文件 86716 2018-04-28 16:53 SRCNN_Revise(GUI)\样图.jpg
评论
共有 条评论