function varargout = xiaobo_pinjie(varargin)
% XIAOBO_PINJIE MATLAB code for xiaobo_pinjie.fig
% XIAOBO_PINJIE, by itself, creates a new XIAOBO_PINJIE or raises the existing
% singleton*.
%
% H = XIAOBO_PINJIE returns the handle to a new XIAOBO_PINJIE or the handle to
% the existing singleton*.
%
% XIAOBO_PINJIE('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in XIAOBO_PINJIE.M with the given input arguments.
%
% XIAOBO_PINJIE('Property','Value',...) creates a new XIAOBO_PINJIE or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before xiaobo_pinjie_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to xiaobo_pinjie_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 xiaobo_pinjie
% Last Modified by GUIDE v2.5 24-Jan-2016 12:48:20
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @xiaobo_pinjie_OpeningFcn, ...
'gui_OutputFcn', @xiaobo_pinjie_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 xiaobo_pinjie is made visible.
function xiaobo_pinjie_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 xiaobo_pinjie (see VARARGIN)
% Choose default command line output for xiaobo_pinjie
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes xiaobo_pinjie wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = xiaobo_pinjie_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)
[name,path]=uigetfile({'*.jpg';'*.bmp';'gif'},'载入图像一');
if isequal(name,0)|isequal(path,0)
errordlg('没有选中文件噢','出错');
return;
else
f=imread([path,name]); %获取位置
axes(handles.axes1);%axes表示获取位置,这里选取的位置为axes1;
imshow(f); %显示图像
title('图像一');
guidata(hObject,handles) %更新结构体;
end
if(size(f,3)==3)
Y=rgb2gray(f);
% Y1=rgb2gray(g);
end
Y=double(Y);%矩阵数据类型不匹配,将数据类型进行转换后再运算。imread读入的图像是uint8数据类型
%Y1=double(Y1);
[m,n]=size(Y);
%~~~~~~~~~~~~~用Harr小波分析取概貌~~~~~~~~~~~~~~~~~~~
e=1/(2^(1/2));
Ld=e*[1,1]';
Hd=e*[-1,1]';
%~~~~~~第一幅图的小波变换
y=xbbh(Y,m,n,Ld,Ld);
Y01=xbbh(Y,m,n,Ld,Hd);
Y10=xbbh(Y,m,n,Hd,Ld);
Y11=xbbh(Y,m,n,Hd,Hd);
%~~~~~~第二幅图的小波变换
%y1=xbbh(Y1,m,n,Ld,Ld);
%y01=xbbh(Y1,m,n,Ld,Hd);
%y10=xbbh(Y1,m,n,Hd,Ld);
%y11=xbbh(Y1,m,n,Hd,Hd);
% [m,n]=size(y);
pho1=[y,Y01;Y10,Y11];
%pho2=[y1,y01;y10,y11];
axes(handles.axes2)
imshow(uint8(pho1));
title('图像一的小波分解');
save('y'); %保存变量
%figure(2)
%imshow(uint8(pho2));%imshow时要加上uint8转化成无符号8位整型才能显示
%xlabel('图像二的小波分解');
% hObject handle to pushbutton1 (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 pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
[name,path]=uigetfile({'*.jpg';'*.bmp';'gif'},'载入图像二');
if isequal(name,0)|isequal(path,0)
errordlg('没有选中文件噢','出错');
return;
else
g=imread([path,name]); %获取位置
axes(handles.axes3);%axes表示获取位置,这里选取的位置为axes1;
imshow(g); %显示图像
title('图像二');
save('g'); %保存变量
guidata(hObject,handles) %更新结构体;
end
if(size(g,3)==3)
%Y=rgb2gray(f);
Y1=rgb2gray(g);
end
%Y=double(Y);%矩阵数据类型不匹配,将数据类型进行转换后再运算。imread读入的图像是uint8数据类型
Y1=double(Y1);
[m,n]=size(Y1);
%~~~~~~~~~~~~~用Harr小波分析取概貌~~~~~~~~~~~~~~~~~~~
e=1/(2^(1/2));
Ld=e*[1,1]';
Hd=e*[-1,1]';
%~~~~~~第一幅图的小波变换
%y=xbbh(Y,m,n,Ld,Ld);
%Y01=xbbh(Y,m,n,Ld,Hd);
%Y10=xbbh(Y,m,n,Hd,Ld);
%Y11=xbbh(Y,m,n,Hd,Hd);
%~~~~~~第二幅图的小波变换
y1=xbbh(Y1,m,n,Ld,Ld);
y01=xbbh(Y1,m,n,Ld,Hd);
y10=xbbh(Y1,m,n,Hd,Ld);
y11=xbbh(Y1,m,n,Hd,Hd);
% [m,n]=size(y);
%pho1=[y,Y01;Y10,Y11];
pho2=[y1,y01;y10,y11];
axes(handles.axes4)
imshow(uint8(pho2));
title('图像二的小波分解');
save('y1'); %保存变量
% hObject handle to pushbutton2 (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)
web www.wobishe.com
load('y');load('y1');
%~~~~~~~~~调用图像匹配函数寻找图像匹配点~~~~~~~~~~~
[p1,N1]=pipei(y,y1);
%~~~~~~~~~~~~~~~~拼接~~~~~~~~~~~~~~~~~~~~~
msgbox('具体联系Q609553134')
% 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)
% --------------------------------------------------------------------
function Untitled_1_Callback(hObject, eventdata, handles)
% 截图
SnapImage();
% hObject handle to Untitled_1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
毕业小助手
- 粉丝: 2762
- 资源: 5583
最新资源
- 自考02197概率论与数理统计(二)试卷及答案解释2016-2021
- java毕设项目之游戏分享网站lw(完整前后端+说明文档+mysql).zip
- java毕设项目之ssm助学贷款+jsp(完整前后端+说明文档+mysql+lw).zip
- IBM Instana应用性能监视.pptx
- webview+H5来实现的android短视频(短剧)音视频播放依赖控件资源
- 黑马最新Hive存储压缩与优化课程总结
- 商城系统项目源代码全套技术资料.zip
- 番茄图像目标检测数据【已标注,约4,300张数据,YOLO 标注格式】
- 校园生活相关项目源代码全套技术资料.zip
- C语言上机实验_1.pptx
- 基于遗传算法求解TSP问题的研究 50个样本点
- 基于XGBoost的振动数据预警模型与参数优化技术-构建一个基于XGBoost的振动信息数据集预警模型 首先引入算法实现动态阈值设置,然后进行参数优化
- sublimeText 4
- 西红柿叶片缺陷分类数据集【已标注,约500张数据】
- 自考00023《高等数学(工本)》试题及答案及复习资料
- 智能点阵笔项目源代码全套技术资料.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈