% SuperResolution: SuperResolution evaluation software
% Copyright (C) 2011 S. Villena, M. Vega, D. Babacan, J. Mateos,
% R. Molina and A. K. Katsaggelos
%
% If you use this software to evaluate any of the methods, please cite
% the corresponding papers (see manual).
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
function varargout = SuperResolutionv1(varargin)
% SUPERRESOLUTIONV1 M-file for SuperResolutionv1.fig
% SUPERRESOLUTIONV1, by itself, creates a new SUPERRESOLUTIONV1 or raises the existing
% singleton*.
%
% H = SUPERRESOLUTIONV1 returns the handle to a new SUPERRESOLUTIONV1 or the handle to
% the existing singleton*.
%
% SUPERRESOLUTIONV1('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in SUPERRESOLUTIONV1.M with the given input arguments.
%
% SUPERRESOLUTIONV1('Property','Value',...) creates a new SUPERRESOLUTIONV1 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before SuperResolutionv1_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to SuperResolutionv1_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help SuperResolutionv1
% Last Modified by GUIDE v2.5 03-Mar-2015 09:58:36
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @SuperResolutionv1_OpeningFcn, ...
'gui_OutputFcn', @SuperResolutionv1_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before SuperResolutionv1 is made visible.
function SuperResolutionv1_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to SuperResolutionv1 (see VARARGIN)
[s,mess,messid] = mkdir('tempSR');
handles.LRi = 0;
handles.opt.xtrue = 0;
handles.opt.L = 0;
handles.opt.sx_true = zeros(1,4);
handles.opt.sy_true = zeros(1,4);
handles.opt.theta_true_grad = zeros(1,4);
handles.opt.LR_exe = 0;
h=zeros(9);
h(5,5)=1;
save('tempSR/h_aux.mat','h');
addpath('functions');
% Choose default command line output for SuperResolutionv1
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes SuperResolutionv1 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = SuperResolutionv1_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in pushbutton_OHRI_SM.
function pushbutton_OHRI_SM_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton_OHRI_SM (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[f_name,n_route,index]=uigetfile({'*.jpg;*.gif;*.tif;*.png'},'Open HR image...');
handles.opt.Color = 0;
if index == 1
set(handles.text_Magnification_Factor,'Enable','On');
set(handles.edit_Magnification,'Enable','On');
set(handles.popupmenu_Warp,'Enable','On');
%% Initial values
data = get(handles.uitable_warp,'Data');
set(handles.uitable_warp,'ColumnEditable',logical(zeros(1,length(data))));
handle.opt.menu_warp = 1;
set(handles.text_NLR,'Enable','On');
set(handles.edit_NLR,'Enable','On');
set(handles.text_Magnification_Factor,'Enable','On');
set(handles.edit_Magnification,'Enable','On');
set(handles.popupmenu_feat,'Enable','Off');
set(handles.uitable_warp,'Enable','Off');
set(handles.edit_Magnification,'String','2');
set(handles.edit_NLR,'String','4');
handles.opt.res = 2;
handles.opt.L= 4;
filter =2;
set(handles.popupmenu_Blur,'Value',2);
set(handles.text_size_h,'Visible','On');
set(handles.edit_size_h,'Visible','On');
set(handles.text_varh,'Visible','Off');
set(handles.edit_varh,'Visible','Off');
set(handles.text_size_h,'String','Mask size (odd #):');
set(handles.edit_Noise,'String','30');
set(handles.edit_Noise,'Enable','on');
set(handles.edit_NLR,'Enable','on');
set(handles.edit_Magnification,'Enable','on');
set(handles.edit_size_h,'String','3');
set(handles.edit_size_h,'Enable','on');
set(handles.popupmenu_Blur,'Enable','on');
set(handles.popupmenu_Warp,'Enable','on');
set(handles.radiobutton_var,'Enable','On');
set(handles.radiobutton_SNR,'Enable','On');
handles.opt.SNR = 30;
set(handles.pushbutton_LRG,'Enable','On');
%%
imainfo = imfinfo([n_route f_name]);
colorT = imainfo(1,1).ColorType;
if strcmp(colorT,'indexed')
[HRi,map] = imread([n_route f_name]);
HRi = ind2rgb(HRi,map);
else
HRi = imread([n_route f_name]);
end
%Image restriction to gray scale
if not(strcmp(colorT,'grayscale'))
handles.opt.Color=1;
HRiColor = HRi;
HRi = rgb2gray(HRi);
end
%--- Test if HRi is scuare
[nf,nc]=size(HRi);
set(handles.sizeHRsimuled,'Visible','On');
set(handles.nfHRsimuled,'String',nf);
set(handles.ncHRsimuled,'String',nc);
set(handles.nfHRsimuled,'Visible','On');
set(handles.ncHRsimuled,'Visible','On');
%--- End Test ---
axes(handles.HRimage_SM);
[handles.opt.M,handles.opt.N] = size(HRi);
if handles.opt.Color == 1
imshow(HRiColor);
else
imshow(HRi);
end
handles.opt.xtrue = double(HRi(:));
handles.opt.HRi = double(HRi);
if handles.opt.Color == 1
handles.opt.xtrueColor =double(HRiColor(:));
handles.opt.HRiColor = HRiColor;
end
else
warndlg('No HR image selected')
end
%%%% Initial value of parameters handles.opt
handles.opt.L = 4;
handles.opt.res = 2;
handles.output = hObject;
guidata(hObject, handles);
% --- Executes on button press in pushbutton_OLRI.
function pushbutton_OLRI_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton_OLRI (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUI
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
图像超分辨重建matlab代码界面处理 (114个子文件)
.directory 71B
SuperResolutionv1.fig 36KB
FilterManagement.fig 5KB
MatrixReader.fig 4KB
Filter.fig 3KB
lena256 Or.jpg 22KB
SuperResolutionv1.m 96KB
solvex_var.m 21KB
solvex_varL4SAR.m 21KB
solvex_varTVSAR.m 20KB
solvex_varL4.m 20KB
solvex_sumpriorSRVarPGMIX.m 19KB
FilterManagement.m 15KB
pcgmod.m 10KB
MatrixReader.m 8KB
Filter.m 7KB
LKvar.m 5KB
ColorBuilt.m 3KB
warp_matrix_bilinear.m 2KB
warp_matrix_bilinearold.m 2KB
LoadParametersSR.m 2KB
circconvmatx2.m 2KB
dwnsmpl_matrix.m 1KB
create_data.m 1KB
shift_matrix.m 1KB
BicubicSR.m 1KB
restoreSARmio.m 1KB
unwrapLR.m 1KB
get_avg_img.m 1KB
cent_nucleus2fft.m 792B
Tcent_nucleus2fft.m 750B
fusionarColor.m 593B
circulant.m 584B
loadimage_mat.m 498B
imagecov.m 463B
parimagecov.m 458B
fatmosfblur.m 356B
opttemp.mat 783KB
car_yc.mat 506KB
noe_16.mat 384KB
toy_16.mat 380KB
noe_12.mat 288KB
toy_12.mat 285KB
car8_yc.mat 201KB
car5_yc.mat 126KB
noe_4.mat 97KB
toy_4.mat 96KB
car3_yc.mat 76KB
p2_FilterList.mat 444B
P12_FilterList.mat 443B
P1_FilterList.mat 438B
FN5_FilterList.mat 438B
FN4_FilterList.mat 406B
DxDySAR_FilterList.mat 396B
NF.mat 355B
h_deconvblind.mat 245B
Dxx.mat 199B
SAR.mat 196B
mean.mat 193B
prewitX.mat 193B
Dy.mat 192B
TV.mat 191B
Dxy.mat 191B
Dx.mat 191B
prewitY.mat 190B
Dyx.mat 190B
lena252_Original.png 151KB
lena252Original.png 150KB
lena258Original.png 150KB
lena.png 148KB
lenalarga.png 127KB
kodim15.png 118KB
kodim09R.png 116KB
kodim23R.png 108KB
kodim20.png 100KB
lena258Original.png 43KB
lena258_1.png 42KB
lena252_1.png 42KB
lena256Or.png 37KB
kodim23R_Y.png 35KB
lena252__2.png 12KB
lena252__1.png 12KB
lena252__4.png 12KB
lena252__3.png 12KB
cra5302.png 12KB
crb5301.png 12KB
craelaine.png 11KB
cra7105.png 11KB
cra5301.png 11KB
crahouse.png 10KB
crbhouse.png 10KB
lenag120.png 9KB
cr5210.png 9KB
EIAcen120.png 8KB
crb5210.png 8KB
cartam3Original.png 4KB
cartaOriginal.png 4KB
cartap.png 4KB
lena258_2.png 3KB
lena258_4.png 3KB
共 114 条
- 1
- 2
echozishen
- 粉丝: 6
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论5