当前位置:网站首页>[face recognition] face recognition based on histogram histogram with matlab code
[face recognition] face recognition based on histogram histogram with matlab code
2022-07-19 03:01:00 【Matlab scientific research studio】
1 Content introduction
Face recognition algorithms mainly include Eigenfaces Algorithm 、Fisherfaces Algorithm and LBPHfaces Algorithm .Eigenfaces The algorithm reduces the dimension of the high-dimensional face image and maps it to the low dimensional feature face subspace , Realize facial feature acquisition , The algorithm has many characteristic data 、 High recognition accuracy .Fisherfaces The algorithm achieves the maximum interclass dispersion and the minimum intraclass dispersion in low dimensional space , Calculate the corresponding characteristics of different data sets .LBPHfaces The algorithm adopts the description method of local eigenvalues , By extracting local details of the image to describe its texture features .
The design of this paper selects Eigenfaces Algorithm . Although the algorithm has a high recognition rate , But it is sensitive to light factors , Therefore, the existence of illumination factors leads to the system has a high error recognition rate and rejection rate . In this paper, the illumination cone method is used to compensate the illumination of the image .
Illumination cone is a convex cone formed by the superposition of images in different light source directions . Illumination cone method is based on photometric stereo vision method , The premise of use is that the sample is an ideal scattering model , The object surface can be observed in all field directions under fixed light . The idea of the algorithm is to use the illumination cone to generate new image samples when constructing the feature face .
First , Load image samples for training , The image samples are converted into matrix vector form and a matrix representing the direction of the light source . secondly , Calculate the reflectance of the light source and the surface normal vector according to the shadow of the face surface of a single light source , From this information, we can get the estimated value of 3D face reconstruction image and light source direction . Last , By changing the direction of the light source , Calculate the composite image under different light sources . By enriching the image light source information of the characteristic face , To reduce the interference of light on the face recognition system in the construction of feature faces .
2 Simulation code
<span style="color:#333333"><span style="background-color:rgba(0, 0, 0, 0.03)"><code><span style="color:#ca7d37">function</span> varargout = FR_Processed_histogram(varargin)</code><code>gui_Singleton = <span style="color:#0e9ce5">1</span>;</code><code>gui_State = struct(<span style="color:#dd1144">'gui_Name'</span>, mfilename, ...</code><code> <span style="color:#dd1144">'gui_Singleton'</span>, gui_Singleton, ...</code><code> <span style="color:#dd1144">'gui_OpeningFcn'</span>, @FR_Processed_histogram_OpeningFcn, ...</code><code> <span style="color:#dd1144">'gui_OutputFcn'</span>, @FR_Processed_histogram_OutputFcn, ...</code><code> <span style="color:#dd1144">'gui_LayoutFcn'</span>, [] , ...</code><code> <span style="color:#dd1144">'gui_Callback'</span>, []);</code><code><span style="color:#ca7d37">if</span> nargin && ischar(varargin{<span style="color:#0e9ce5">1</span>})</code><code> gui_State.gui_Callback = str2func(varargin{<span style="color:#0e9ce5">1</span>});</code><code><span style="color:#ca7d37">end</span></code><code></code><code>i</code><code> axes (handles.axes3)</code><code> %image no: <span style="color:#0e9ce5">5</span> is shown <span style="color:#ca7d37">for</span> visualization purpose</code><code> imshow(imread(strcat(<span style="color:#dd1144">'ORL\S'</span>,num2str(M),<span style="color:#dd1144">'\5.bmp'</span>)))</code><code> msgbox ( <span style="color:#dd1144">'Correctly Recognized'</span>);</code><code><span style="color:#ca7d37">else</span></code><code> display ([ <span style="color:#dd1144">'Error==> Testing Image of Subject >>'</span> num2str(subjectindex) <span style="color:#dd1144">' matches with the image of subject >> '</span> num2str(M)])</code><code> axes (handles.axes3)</code><code> %image no: <span style="color:#0e9ce5">5</span> is shown <span style="color:#ca7d37">for</span> visualization purpose</code><code> imshow(imread(STRCAT(<span style="color:#dd1144">'ORL\S'</span>,num2str(M),<span style="color:#dd1144">'\5.bmp'</span>)))</code><code> msgbox ( <span style="color:#dd1144">'Incorrectly Recognized'</span>);</code><code><span style="color:#ca7d37">end</span></code><code>display(<span style="color:#dd1144">'Testing Done'</span>)</code><code>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</code><code><span style="color:#ca7d37">function</span> box_Callback(hObject, eventdata, handles)</code><code>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</code><code><span style="color:#ca7d37">function</span> box_CreateFcn(hObject, eventdata, handles)</code><code><span style="color:#ca7d37">if</span> ispc && isequal(get(hObject,<span style="color:#dd1144">'BackgroundColor'</span>), get(<span style="color:#0e9ce5">0</span>,<span style="color:#dd1144">'defaultUicontrolBackgroundColor'</span>))</code><code> set(hObject,<span style="color:#dd1144">'BackgroundColor'</span>,<span style="color:#dd1144">'white'</span>);</code><code><span style="color:#ca7d37">end</span></code><code>%% Respond to Input Image Button </code><code><span style="color:#ca7d37">function</span> Input_Image_button_Callback(hObject, eventdata, handles)</code><code>global filename pathname I</code><code>[filename, pathname] = uigetfile(<span style="color:#dd1144">'*.bmp'</span>, <span style="color:#dd1144">'Test Image'</span>);</code><code>axes(handles.axes1)</code><code>imgpath=strcat(pathname,filename);</code><code>I = imread(imgpath);</code><code>imshow(I)</code><code>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</code><code><span style="color:#ca7d37">function</span> axes3_CreateFcn(hObject, eventdata, handles)</code><code></code></span></span>3 Running results

4 reference
[1] Nie Qianqian , Qin Runze , Gao Yuxin , etc. . Design and implementation of face recognition system based on histogram equalization [J]. Internet of things technology , 2018, 8(7):3.
[2] Yang Huixian , Tang Jinxin , Tao Xia , etc. . Face recognition algorithm based on Weber gradient direction histogram [J]. Computer engineering and Application , 2017, 53(15):6.
About bloggers : Good at intelligent optimization algorithms 、 Neural networks predict 、 signal processing 、 Cellular automata 、 The image processing 、 Path planning 、 UAV and other fields Matlab Simulation , relevant matlab Code problems can be exchanged by private letter .
Some theories cite network literature , If there is infringement, contact the blogger to delete .
边栏推荐
- Detailed explanation of case when usage of SQL
- [NoSQL] redis master-slave, sentinel, cluster
- 【MySQL】数据查询操作(select语句)
- RHCE Study Guide Chapter 5 VIM editor
- MySQL日志管理和完全备份增量备份与恢复
- 人脸检测几种方法
- 【单片机仿真】(十一)指令系统逻辑运算指令 — 逻辑与指令ANL、逻辑或指令ORL
- Yum warehouse service and PXE automatic deployment system
- Rsync remote synchronization (incremental backup)
- OSPF comprehensive experiment
猜你喜欢

Binary installation kubernetes 1.23.2

Elk log analysis system

LETV has more than 400 employees? Living a fairy life without a boss, the official responded

当你在Linux系统中编译安装MySQL数据库卡住了怎么办?

DDD 超越 MVC了吗

从MySQL架构看一条SQL语句是如何执行的?

人脸关键点检测
![[NoSQL] redis master-slave, sentinel, cluster](/img/69/37b80398617040984b006d3d7b71b9.png)
[NoSQL] redis master-slave, sentinel, cluster

【MySQL】MHA高可用

MySQL storage engine details
随机推荐
05-中央处理器
工具及方法 - Excel插件XLTools
Understand network namespaces
[PHP] tp6 multi table connection query
while 循环
PyTorch最佳实践和代码模板
微信小程序--Taro框架实际开发中的问题汇总
【单片机仿真】(二十一)DB(Define Byte)— 定义字节
4年开发二面美团最终败给:volatile关键字作用和原理这道面试题
RHCE ansible first operation
Rhce8 Study Guide Chapter 6 archiving and compression
【NoSQL】redis高可用和持久化
要开源节流
【单片机仿真】(八)指令系统 — 数据传送指令
SQL之CASE WHEN用法详解
Nat comprehensive experiment
【单片机仿真】(七)寻址方式 — 位寻址
3、AsyncTool框架原理源码解析
Oracle查询时间段内所有日期
樂視還有400多比特員工?過著沒有老板的神仙日子 官方出來回應了...