当前位置:网站首页>[chapter 07 face QR code recognition based on principal component analysis matlab deep learning practical case]
[chapter 07 face QR code recognition based on principal component analysis matlab deep learning practical case]
2022-06-22 01:54:00 【Haibao 7】

Face two-dimensional code recognition based on principal component analysis MATLAB In depth learning practical cases
Face database 
Download a full set of documents link –> Portal 
Download the full source code of this article [ link –> Portal ]
The analysis is as follows :
Master file
function varargout = MainForm(varargin)
% MAINFORM MATLAB code for MainForm.fig
% MAINFORM, by itself, creates a new MAINFORM or raises the existing
% singleton*.
%
% H = MAINFORM returns the handle to a new MAINFORM or the handle to
% the existing singleton*.
%
% MAINFORM('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in MAINFORM.M with the given input arguments.
%
% MAINFORM('Property','Value',...) creates a new MAINFORM or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before MainForm_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to MainForm_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 MainForm
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @MainForm_OpeningFcn, ...
'gui_OutputFcn', @MainForm_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 MainForm is made visible.
function MainForm_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 MainForm (see VARARGIN)
% Choose default command line output for MainForm
handles.output = hObject;
clc;
set(handles.axes1, 'XTick', [], 'YTick', [], ...
'XTickLabel', '', 'YTickLabel', '', 'Color', [0.7020 0.7804 1.0000], 'Box', 'On',...
'xlim', [-1 1], 'ylim', [-1 1]);
set(handles.axes2, 'XTick', [], 'YTick', [], ...
'XTickLabel', '', 'YTickLabel', '', 'Color', [0.7020 0.7804 1.0000], 'Box', 'On',...
'xlim', [-1 1], 'ylim', [-1 1]);
set(handles.axes3, 'XTick', [], 'YTick', [], ...
'XTickLabel', '', 'YTickLabel', '', 'Color', [0.7020 0.7804 1.0000], 'Box', 'On',...
'xlim', [-1 1], 'ylim', [-1 1]);
handles.Ims = 0;
handles.c = 0;
handles.Im = 0;
handles.f = 0;
handles.Img = 0;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes MainForm wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = MainForm_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;
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
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- 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)
filePath = OpenImageFile();
if filePath == 0
return;
end
Img = imread(filePath);
if ndims(Img) == 3
Img = rgb2gray(Img);
end
sz = size(Img);
sz0 = [112 92];
if ~isequal(sz, sz0);
Img = imresize(Img, sz0, 'bilinear');
end
% wh = 600;
% if sz(1) > wh
% rate = wh/sz(1);
% Img = imresize(Img, rate, 'bilinear');
% end
% Show
imshow(Img, [], 'Parent', handles.axes1);
handles.Img = Img;
handles.sz = size(Img);
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)
if isequal(handles.Img, 0)
return;
end
f = GetFaceVector(handles.Img);
f = f(1:round(length(f)*0.9));
handles.f = f;
guidata(hObject, handles);
msgbox(' Dimension reduction succeeded !', ' Prompt information ');
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% 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)
if isequal(handles.f, 0)
return;
end
Im = QrGen(handles.f);
% Show
imshow(Im, [], 'Parent', handles.axes2);
handles.Im = Im;
guidata(hObject, handles);
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if isequal(handles.Im, 0)
return;
end
c = QrDen(handles.Im);
set(handles.edit1, 'String', c);
handles.c = c;
guidata(hObject, handles);
% --- 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)
if isequal(handles.c, 0)
return;
end
Ims = FaceRec(handles.c, handles.sz);
% Show
imshow(Ims, [], 'Parent', handles.axes3);
handles.Ims = Ims;
guidata(hObject, handles);
% --- 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)
% Clean up the workspace
axes(handles.axes1); cla reset;
axes(handles.axes2); cla reset;
axes(handles.axes3); cla reset;
set(handles.axes1, 'XTick', [], 'YTick', [], ...
'XTickLabel', '', 'YTickLabel', '', 'Color', [0.7020 0.7804 1.0000], 'Box', 'On');
set(handles.axes2, 'XTick', [], 'YTick', [], ...
'XTickLabel', '', 'YTickLabel', '', 'Color', [0.7020 0.7804 1.0000], 'Box', 'On');
set(handles.axes3, 'XTick', [], 'YTick', [], ...
'XTickLabel', '', 'YTickLabel', '', 'Color', [0.7020 0.7804 1.0000], 'Box', 'On');
set(handles.edit1, 'String', '');
% --- 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)
choice = questdlg(' Are you sure you want to exit the system ?', ...
' sign out ', ...
' determine ',' Cancel ',' Cancel ');
switch choice
case ' determine '
close;
case ' Cancel '
return;
end
The application effect is as shown in the figure 


边栏推荐
- The way to build the efficiency platform of didi project
- Is there a browser ranking suitable for Amazon cross-border E-commerce
- The 8th "Internet +" competition - Bi ran, an outstanding architect of Baidu, interprets the proposition of industrial circuit
- GAMES-101-个人总结归纳-Shading
- 【第 13 章 基于霍夫曼图像压缩重建--Matlab深度学习实战图像处理应用】
- Mysql数据库轻松学06—数据分析师常用:数据查询语言DQL之单表查询
- “早安、午安、晚安” Game Jam
- heidisql 插入数据老是出错,怎么办
- Apache ActiveMQ Artemis简介
- 第 25 章 基于小波变换的数字水印技术
猜你喜欢

Seeking an anti association detection tool, online detection of browser fingerprint

digital signal processing

Riscv cache

heidisql 插入数据老是出错,怎么办

LeetCode+ 46 - 50

ShardingSphere-proxy-5.0.0分布式哈希取模分片实现(四)

Shardingsphere-proxy-5.0.0 implementation of distributed hash modulo fragmentation (4)

acwing 836. Merge sets (merge sets)

Benchmarking copilot, the first in China: natural language one click generation method level code aixcoder XL is coming

【第 13 章 基于霍夫曼图像压缩重建--Matlab深度学习实战图像处理应用】
随机推荐
GAMES-101-个人总结归纳-Shading
【随笔】昨天研究了一天 RN 生态的 Expo 的确牛逼,从开发构建到部署一条龙,很好使。
2021 csp-j1 csp-s1 first round preliminary round related questions and videos
【第 15 章 基于小波的图像压缩技术深度学习机器学习的图像处理应用matlab.】
如何获取自由和财富
Google multi user anti Association tool
flutter系列之:flutter中的IndexedStack
Expenditure budget and adjustment records and use records output use progress construction process records
LeetCode 41 - 45 动态规划专题
Packet capturing tool: Fiddler, a necessary skill for Software Test Engineer
MBA-day24 最值问题
LocalDateTime格式化时间
Audio and video learning route and learning materials recommendation
英特尔发展史概述
第 25 章 基于小波变换的数字水印技术
IE浏览器自动跳转edge怎么恢复
抓包工具:Fiddler,软件测试工程师必备技能
【虚幻引擎UE】打包报错出现!FindPin错误的解决办法
第 08 章 基于知识库的手写体数字识别MATLAB深度学习应用实战
第 18 章 基于GUI搭建通用视频处理工具matlab应用GUI实现