function varargout = GUI(varargin)
% GUI MATLAB code for GUI.fig
% GUI, by itself, creates a new GUI or raises the existing
% singleton*.
%
% H = GUI returns the handle to a new GUI or the handle to
% the existing singleton*.
%
% GUI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in GUI.M with the given input arguments.
%
% GUI('Property','Value',...) creates a new GUI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before GUI_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to GUI_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 GUI
% Last Modified by GUIDE v2.5 05-Jan-2017 11:04:11
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @GUI_OpeningFcn, ...
'gui_OutputFcn', @GUI_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 GUI is made visible.
function GUI_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 GUI (see VARARGIN)
% Choose default command line output for GUI
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes GUI wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = GUI_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 pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
[filename,pathname]=uigetfile({'*.tif';'*.jpg';'*.bmp';'*.gif';'*.png'},'选择图片');
if isequal(filename,0)
disp('Users Selected Canceled');
else
global str1;
str1=[pathname filename];
str2=[pathname filename];
end
global im;
im = im2double(imread(str2));
axes(handles.axes2);%axes2是坐标轴的标示
imshow(im);
% --- Executes on button press in pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% [filename,pathname]=uigetfile({'*.jpg';'*.bmp';'*.gif';'*.png'},'选择图片');
% if isequal(filename,0)
% disp('Users Selected Canceled');
% else
pathname = uigetdir('..\') ;
pathname=[pathname '\'];
list=dir([pathname '*.jpg']);
global k;
k=length(list);
for i=1:k
str= strcat (pathname, list(i).name);
% a{i}=xlsread(str);
global a;
a{i}=str;
I = im2double(imread(str));
nlev=5;
Guass_zhixing;
nlev=5;
Laplacian_pyramid;
nlev=5;
TeZheng_zhixing;
end
% for i=1:k
% str1=['C:\Users\唐学远\Desktop\人脸超分辨\库\' a{i}];
% I = im2double(imread(str1));
% Guass_zhixing;
%
% end
% --- Executes on button press in pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton9.
function pushbutton9_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton9 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
axes(handles.axes3);
global im;
x=rgb2gray(im);
global y;
y=histeq(x);
imshow(y);
% PSNR1=Psnr(y,x);
%
% str=[PSNR1];
%
% set(handles.edit1,'string',str);
%显示原始图像直方图
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
axes(handles.axes3);
global im;
x=rgb2gray(im);
global y;
y=medfilt2(x,[1,1]) ;
imshow(y);
% --- Executes on button press in pushbutton10.
function pushbutton10_Callback(hObject, eventdata, handles)
t=waitbar(0,'正在计算库图片与待复原图片塔式父结构的欧氏距离.');
global k;
for i=1:k
waitbar(i/k)
c=0;
Op=0;
for m=28:37
for n=28:37
global a;
I = im2double(imread(a{i}));
S_2= tashifujiegou(I,4*m,4*n);
global y;
S_1= tashifujiegou_1(y,m,n);
Op=oushijuli(S_1,S_2);
c=Op+c;
end
end
C(i)=c;
end
close(t);
D=C;
E=D';
D=sortrows(E,1)';%将D按第一行从小到大排序。
t=waitbar(0,'正在搜索库图片与待复原图塔式父结构欧氏距离接近的图L1,L2,L3,L4');
for i=1:k
if C(i)==D(1)
l1=i;
end
end
for i=1:k
if C(i)==D(2)
l2=i;
end
end
for i=1:k
if C(i)==D(3)
l3=i;
end
end
for i=1:k
if C(i)==D(4)
l4=i;
end
end
fuyuan;
axes(handles.axes4);
close(t);
imshow(I);
h=dialog('name',' ','position',[525 300 300 70]);
uicontrol('parent',h,'style','text','string','恭喜你,复原成功!','position',[90 40 120 20],'fontsize',12);
uicontrol('parent',h,'style','pushbutton','position',...
[124 10 50 20],'string','确定','callback','delete(gcbf)');
% --- Executes on mouse press over axes background.
function axes2_ButtonDownFcn(hObject, eventdata, handles)
% hObject handle to axes2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handl
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
人脸超分辨.zip (69个子文件)
人脸超分辨
CIPATH.mat 62KB
dehaze - 副本_LR_1_LR_2.tif 11KB
dehaze - 副本_LR_2.tif 167KB
Untitled.m 399B
Laplacian_pyramid.m 1KB
dehaze - 副本_LR_1_LR_1_LR_2.tif 940B
dehaze - 副本_LR_1_LR_3.tif 11KB
Psnr.m 549B
TeZheng_zhixing.m 3KB
Guass_zhixing.m 1KB
dehaze - 副本_LR_3.tif 168KB
10_LR_3.tif 12KB
库
2.jpg 12KB
1.jpg 9KB
4.jpg 141KB
3.jpg 10KB
dehaze - 副本_LR_1.tif 168KB
generation.fig 13KB
10_LR_1.tif 12KB
dehaze - 副本_LR_1_LR_1_LR_1.tif 940B
dehaze - 副本_LR_4.tif 167KB
fuyuan.m 852B
10_LR_1_LR_4.tif 988B
gs图库
中光1.JPG 3.11MB
低光1.JPG 3.15MB
高光1.JPG 3.05MB
dehaze - 副本_LR_1_LR_1_LR_3.tif 940B
10_LR_1_LR_1.tif 988B
dehaze - 副本_LR_1_LR_4.tif 11KB
tashifujiegou.m 684B
dehaze - 副本_LR_1_LR_1.tif 11KB
GUI.m 12KB
10_LR_4.tif 12KB
gauss_pyramid.m 308B
tashifujiegou_2.m 670B
tashifujiegou_1.m 678B
待处理图像
014.jpg 2KB
10_LR_3.tif 12KB
10_LR_1.tif 12KB
10_LR_4.tif 12KB
10_LR_2.tif 12KB
GUI.fig 52KB
10_LR_1_LR_3.tif 986B
shift.m 2KB
mid_filter.m 572B
TeZheng2_pyramid.m 474B
10_LR_2.tif 12KB
dehaze - 副本_LR_1_LR_1_LR_4.tif 940B
CINAMES.mat 62KB
create_images.m 3KB
generation.m 10KB
lowpass.m 827B
10.jpg 11KB
TeZheng1_pyramid.m 477B
oushijuli.m 411B
10_LR_1_LR_2.tif 988B
图片库
2.jpg 10KB
11.jpg 9KB
13.jpg 8KB
8.jpg 10KB
6.jpg 10KB
1.jpg 10KB
12.jpg 10KB
4.jpg 10KB
5.jpg 10KB
9.jpg 10KB
10.jpg 8KB
7.jpg 8KB
3.jpg 9KB
共 69 条
- 1
资源评论
张华山
- 粉丝: 635
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功