function varargout = untitled(varargin)
% UNTITLED M-file for untitled.fig
% UNTITLED, by itself, creates a new UNTITLED or raises the existing
% singleton*.
%
% H = UNTITLED returns the handle to a new UNTITLED or the handle to
% the existing singleton*.
%
% UNTITLED('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in UNTITLED.M with the given input arguments.
%
% UNTITLED('Property','Value',...) creates a new UNTITLED or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before untitled_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to untitled_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
% Copyright 2002-2003 The MathWorks, Inc.
% Edit the above text to modify the response to help untitled
% Last Modified by GUIDE v2.5 09-May-2013 12:45:43
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @untitled_OpeningFcn, ...
'gui_OutputFcn', @untitled_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 untitled is made visible.
function untitled_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 untitled (see VARARGIN)
% Choose default command line output for untitled
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes untitled wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = untitled_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)
[fname, pname, index] = uigetfile({ '*.bmp'}, '');%
str3 = [pname fname];
%%fprintf('%s',fname)
axes(handles.axes1);
imshow(str3);
handles.img = str3 %㊣迆
handles.fname1=fname %㊣迆
guidata(hObject, handles);%邦㊣迆
% --- 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)
img1 = handles.img; %img1img1℅‾
fname=handles.fname1;
%%fprintf('%s',fname)
m=imread(img1);
img_edge1=edge(m,'Sobel');%420*420 logical
%img_edge1=edge(m,'roberts');%420*420 logical
%img_edge1=edge(m,'log');%420*420 logical
%img_edge1=edge(m,'candy');%420*420 logical
% img_edge1=edge(m,'zerocross');%420*420 logical
axes(handles.axes2);
imshow(img_edge1);
%%str=sprintf('gbdcbcb: %d',c);
S2=str2double(get(handles.edit2,'String'));
%%str='酘源';
%set(handles.edit1,'string',str);
if strm(fname,'1_1.bmp')==0
M1=1;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'1_2.bmp')==0
M1=2;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'1_3.bmp')==0
M1=3;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'1_4.bmp')==0
M1=4;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'1_5.bmp')==0
M1=5;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'2_1.bmp')==0
M1=6;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'2_2.bmp')==0
M1=7;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'2_3.bmp')==0
M1=8;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'2_4.bmp')==0
M1=9;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'2_5.bmp')==0
M1=10;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'3_1.bmp')==0
M1=11;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'3_2.bmp')==0
M1=12;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'3_3.bmp')==0
M1=13;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'3_4.bmp')==0
M1=14;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'3_5.bmp')==0
M1=15;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'4_1.bmp')==0
M1=16;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'4_2.bmp')==0
M1=17;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'4_3.bmp')==0
M1=18;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'4_4.bmp')==0
M1=19;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'4_5.bmp')==0
M1=20;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'5_1.bmp')==0
M1=21;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'5_2.bmp')==0
M1=22;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'5_3.bmp')==0
M1=23;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'5_4.bmp')==0
M1=24;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'5_5.bmp')==0
M1=25;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'6_1.bmp')==0
M1=26;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'6_2.bmp')==0
M1=27;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'6_3.bmp')==0
M1=28;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'6_4.bmp')==0
M1=29;
identify=lvqnew(S2,M1);
set(handles.edit1,'string',identify);
elseif strm(fname,'6_5.bmp')==0
M1=30;
LVQ神经网络算法判定人脸朝向_LVQ神经网络_人脸朝向_matlab
版权申诉
5星 · 超过95%的资源 125 浏览量
2022-04-14
21:53:49
上传
评论
收藏 129KB RAR 举报
阿里matlab建模师
- 粉丝: 3300
- 资源: 2784
最新资源
- 本科毕业设计基于C# wpf人脸识别的考勤系统的设计与实现源码.zip
- 基于Ruoyi+uniapp实现学生考勤系统 学生考勤源码+项目说明.zip
- feae6bc968ca68a099455d8b8a8dea35
- 基于Pytorch训练CIRAR10上分类算法.zip
- Pytorch-pytorch深度学习教程之Tensorboard.zip
- 基于C++和Python开发yolov8-face作为人脸检测器dlib作为人脸识别器的人脸考勤系统源码+项目说明.zip
- Pytorch-pytorch深度学习教程之变分自动编码器.zip
- Pytorch-pytorch深度学习教程之神经风格迁移.zip
- Pytorch-pytorch深度学习教程之深度残差网络.zip
- Pytorch-pytorch深度学习教程之循环神经网络.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈