function varargout = NewGUI(varargin)
% NEWGUI M-file for NewGUI.fig
% NEWGUI, by itself, creates a new NEWGUI or raises the existing
% singleton*.
%
% H = NEWGUI returns the handle to a new NEWGUI or the handle to
% the existing singleton*.
%
% NEWGUI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in NEWGUI.M with the given input arguments.
%
% NEWGUI('Property','Value',...) creates a new NEWGUI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before NewGUI_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to NewGUI_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 NewGUI
% Last Modified by GUIDE v2.5 12-Dec-2007 14:28:07
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @NewGUI_OpeningFcn, ...
'gui_OutputFcn', @NewGUI_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin & isstr(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 NewGUI is made visible.
function NewGUI_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 NewGUI (see VARARGIN)
% Choose default command line output for NewGUI
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes NewGUI wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = NewGUI_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)
% 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)
%take alll the training image.
%take alll the training image.
im1=imread('group1/bfritza1.pgm');
im2=imread('group1/bfritza2.pgm');
im3=imread('group1/bfritza3.pgm');
%get the feature of image
r1=findfeature(im1);
r2=findfeature(im2);
r3=findfeature(im3);
%find the orientation histigram of image
h1=histc(r1,1:8);
h2=histc(r2,1:8);
h3=histc(r3,1:8);
%save the data
group1(1).im=im1;
group1(2).im=im2;
group1(3).im=im3;
group1(1).feature=r1;
group1(2).feature=r2;
group1(3).feature=r3;
group1(1).histal=h1;
group1(2).histal=h2;
group1(3).histal=h3;
setappdata(gcbf,'group1',group1);
%take group2 the training image.
im4=imread('group2/bfritzb1.pgm');
im5=imread('group2/bfritzb2.pgm');
im6=imread('group2/bfritzb3.pgm');
%get the feature of image
r4=findfeature(im4);
r5=findfeature(im5);
r6=findfeature(im6);
%find the orientation histigram of image
h4=histc(r4,1:8);
h5=histc(r5,1:8);
h6=histc(r6,1:8);
%save the data
group2(1).im=im4;
group2(2).im=im5;
group2(3).im=im6;
group2(1).feature=r4;
group2(2).feature=r5;
group2(3).feature=r6;
group2(1).histal=h4;
group2(2).histal=h5;
group2(3).histal=h6;
setappdata(gcbf,'group2',group2);
%take group3 the training image.
im7=imread('group3/bfritzc1.pgm');
im8=imread('group3/bfritzc2.pgm');
im9=imread('group3/bfritzc3.pgm');
%get the feature of image
r7=findfeature(im7);
r8=findfeature(im8);
r9=findfeature(im9);
%find the orientation histigram of image
h7=histc(r7,1:8);
h8=histc(r8,1:8);
h9=histc(r9,1:8);
%save the data
group3(1).im=im7;
group3(2).im=im8;
group3(3).im=im9;
group3(1).feature=r7;
group3(2).feature=r8;
group3(3).feature=r9;
group3(1).histal=h7;
group3(2).histal=h8;
group3(3).histal=h9;
setappdata(gcbf,'group3',group3);
%take group4 the training image.
im10=imread('group4/bfritzd1.pgm');
im11=imread('group4/bfritzd2.pgm');
im12=imread('group4/bfritzd3.pgm');
%get the feature of image
r10=findfeature(im10);
r11=findfeature(im11);
r12=findfeature(im12);
%find the orientation histigram of image
h10=histc(r10,1:8);
h11=histc(r11,1:8);
h12=histc(r12,1:8);
%save the data
group4(1).im=im10;
group4(2).im=im11;
group4(3).im=im12;
group4(1).feature=r10;
group4(2).feature=r11;
group4(3).feature=r12;
group4(1).histal=h10;
group4(2).histal=h11;
group4(3).histal=h12;
setappdata(gcbf,'group4',group4);
%take group5 the training image.
im13=imread('group5/bfritzg1.pgm');
im14=imread('group5/bfritzg2.pgm');
im15=imread('group5/bfritzg3.pgm');
%get the feature of image
r13=findfeature(im13);
r14=findfeature(im14);
r15=findfeature(im15);
%find the orientation histigram of image
h13=histc(r13,1:8);
h14=histc(r14,1:8);
h15=histc(r15,1:8);
%save the data
group5(1).im=im13;
group5(2).im=im14;
group5(3).im=im15;
group5(1).feature=r13;
group5(2).feature=r14;
group5(3).feature=r15;
group5(1).histal=h13;
group5(2).histal=h14;
group5(3).histal=h15;
setappdata(gcbf,'group5',group5);
%take group6 the training image.
im16=imread('group6/bfritzy1.pgm');
im17=imread('group6/bfritzy2.pgm');
im18=imread('group6/bfritzy3.pgm');
%get the feature of image
r16=findfeature(im16);
r17=findfeature(im17);
r18=findfeature(im18);
%find the orientation histigram of image
h16=histc(r16,1:8);
h17=histc(r17,1:8);
h18=histc(r18,1:8);
%save the data
group6(1).im=im16;
group6(2).im=im17;
group6(3).im=im18;
group6(1).feature=r16;
group6(2).feature=r17;
group6(3).feature=r18;
group6(1).histal=h16;
group6(2).histal=h17;
group6(3).histal=h18;
setappdata(gcbf,'group6',group6);
msgbox('The training is success.You can classify the new image now');
% figure;
% subplot(18,1,1);
% plot(h1);
% subplot(18,1,2);
% imshow(h2);
% subplot(18,1,3);
% plot(h3);
% subplot(18,1,4);
% plot(h4);
% subplot(18,1,5);
% plot(h5);
% subplot(18,1,6);
% plot(h6);
% subplot(18,1,7);
% plot(h7);
% subplot(18,1,8);
% plot(h8);
% subplot(18,1,9);
% plot(h9);
% subplot(18,1,10);
% plot(h10);
% subplot(18,1,11);
% plot(h11);
% subplot(18,1,12);
% plot(h12);
% subplot(18,1,13);
% plot(h13);
% subplot(18,1,14);
% plot(h14);
% subplot(18,1,15);
% plot(h15);
% subplot(18,1,16);
% plot(h16);
% subplot(18,1,17);
% plot(h17);
% subplot(18,1,18);
% plot(h18);
end
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% 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)
[filename,path]=uigetfile('*.pgm');
im1=imread(strcat(path,filename));
r1=findfeature(im1);
h1=histc(r1,1:8);
group{1}=getappdata(gcbf,'group1');
group{2}=getappdata(gcbf,'group2');
group{3}=getappdata(gcbf,'group3');
group{4}=getappdata(gcbf,'group4');
group{5}=getappdata(gcbf,'group5');
group{6}=getapp
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
matlab2.rar_gesture_gesture matlab_matlab 手势识别_手势_手势识别 (124个子文件)
NewGUI.asv 7KB
start.asv 6KB
myfftfilter.asv 936B
inertiaMatrix.asv 885B
findfeature.asv 830B
orientation1.asv 428B
histogram.asv 361B
findaix.asv 339B
divideSubSet.asv 300B
orientation.asv 295B
test1.asv 226B
toBin.asv 156B
computeMatrix.asv 144B
myFFT.asv 90B
start.fig 21KB
NewGUI.fig 21KB
NewGUI.m 8KB
start.m 6KB
training.m 2KB
findfeature.m 908B
inertiaMatrix.m 885B
divideSubSet.m 549B
orientation.m 522B
orientation1.m 436B
myfftfilter.m 411B
histogram.m 389B
orientation2.m 362B
findaix.m 337B
distance.m 305B
test1.m 257B
computeMatrix.m 245B
toBin.m 107B
myFFT.m 76B
bfritzy2.pgm 16KB
mkefaly2.pgm 16KB
ckaisea1.pgm 16KB
bfritza3.pgm 16KB
ckaisey1.pgm 16KB
bfritzb2.pgm 16KB
bfritzd3.pgm 16KB
bfritza1.pgm 16KB
bfritzg3.pgm 16KB
bfritzc1.pgm 16KB
bfritzb1.pgm 16KB
bfritzy3.pgm 16KB
mkefaly3.pgm 16KB
bfritzc3.pgm 16KB
mbeckea2.pgm 16KB
bfritzd2.pgm 16KB
bfritzy3.pgm 16KB
bfritzy1.pgm 16KB
bfritzc2.pgm 16KB
bfritzg1.pgm 16KB
bfritzd1.pgm 16KB
bfritza2.pgm 16KB
ckaisey3.pgm 16KB
ckaisey2.pgm 16KB
bfritzy2.pgm 16KB
mkefaly1.pgm 16KB
bfritzy1.pgm 16KB
bfritzb3.pgm 16KB
bfritza3.pgm 16KB
bfritza2.pgm 16KB
bfritzg2.pgm 16KB
ckaisea3.pgm 16KB
bfritzb2.pgm 16KB
bfritzd2.pgm 16KB
gbanavd3.pgm 16KB
ckaisea2.pgm 16KB
ckaised2.pgm 16KB
mbecked1.pgm 16KB
ckaisec3.pgm 16KB
ckaisec1.pgm 16KB
bfritzb1.pgm 16KB
ckaiseg1.pgm 16KB
ckaiseb1.pgm 16KB
ckaiseg2.pgm 16KB
bfritzg3.pgm 16KB
gbanavb1.pgm 16KB
mbeckeb3.pgm 16KB
mbeckeg3.pgm 16KB
mbeckec2.pgm 16KB
mbeckea1.pgm 16KB
ckaiseb2.pgm 16KB
bfritzg2.pgm 16KB
ckaised3.pgm 16KB
mbeckec1.pgm 16KB
ckaiseb3.pgm 16KB
bfritzc2.pgm 16KB
mbecked2.pgm 16KB
mbecked3.pgm 16KB
bfritza1.pgm 16KB
mbeckeb2.pgm 16KB
mbeckeb1.pgm 16KB
ckaiseg3.pgm 16KB
bfritzd3.pgm 16KB
bfritzd1.pgm 16KB
mbeckea3.pgm 16KB
bfritzb3.pgm 16KB
bfritzc1.pgm 16KB
共 124 条
- 1
- 2
资源评论
alvarocfc
- 粉丝: 105
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功