资源简介
Algorithm Description
Recognizing objects from large image databases, histogram based methods have proved simplicity and usefulness in last decade. Initially, this idea was based on color histograms that were launched by swain [1]. This algorithm presents the first part of our proposed technique named as “Histogram processed Face Recognition” [2]
For training, grayscale images with 256 gray levels are used. Firstly, frequency of every gray-level is computed and stored in vectors for further processing. Secondly, mean of consecutive nine frequencies from the stored vectors is calculated and are stored in another vectors for later use in testing phase.
This mean vector is used for calculating the absolute differences among the mean of trained images and the test image. Finally the minimum difference found identifies the matched class with test image.
Recognition accuracy is of 99.75% (only one mis-match i.e. recognition fails on image number 4 of subject 17)
[1] M. J. Swain and D. H. Ballard, “Indexing via color histogram”, In Proceedings of third international conference on Computer Vision (ICCV), pages 390–393, Osaka, Japan, 1990.
[2] Fazl-e-Basit, Younus Javed and Usman Qayyum, "Face Recognition using processed histogram and phase only correlation ", 3rd IEEE International Conference on Emerging Technology pp. 238-242
代码片段和文件信息
function varargout = FR_Processed_histogram(varargin)
gui_Singleton = 1;
gui_State = struct(‘gui_Name‘ mfilename ...
‘gui_Singleton‘ gui_Singleton ...
‘gui_OpeningFcn‘ @FR_Processed_histogram_OpeningFcn ...
‘gui_OutputFcn‘ @FR_Processed_histogram_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
function FR_Processed_histogram_OpeningFcn(hobject eventdata handles varargin)
handles.output = hobject;
guidata(hobject handles);
global total_sub train_img sub_img max_hist_level bin_num form_bin_num;
total_sub = 40;
train_img = 200;
sub_img = 10;
max_hist_level = 256;
bin_num = 9;
form_bin_num = 29;
function varargout = FR_Processed_histogram_OutputFcn(hobject eventdata handles)
varargout{1} = handles.output;
%% 响应Training按钮
function train_button_Callback(hobject eventdata handles)
global train_processed_bin;
global total_sub train_img sub_img max_hist_level bin_num form_bin_num;
train_processed_bin(form_bin_numtrain_img) = 0;
K = 1;
train_hist_img = zeros(max_hist_level train_img);
for Z=1:1:total_sub % 共有40组图像
for X=1:2:sub_img %只是训练每组图像下的奇数图像
I = imread( strcat(‘ORL\S‘int2str(Z)‘\‘int2str(X)‘.bmp‘) );
[rows cols] = size(I);
for i=1:1:rows
for j=1:1:cols
if( I(ij) == 0 )
train_hist_img(max_hist_level K) = train_hist_img(max_hist_level K) + 1;
else
train_hist_img(I(ij) K) = train_hist_img(I(ij) K) + 1;
end
end
end
K = K + 1;
end
end
[r c] = size(train_hist_img);
sum = 0;
for i=1:1:c
K = 1;
for j=1:1:r
if( (mod(jbin_num)) == 0 )
sum = sum + train_hist_img(ji);
train_processed_bin(Ki) = sum/bin_num;
K = K + 1;
sum = 0;
else
sum = sum + train_hist_img(ji);
end
end
train_processed_bin(Ki) = sum/bin_num;
end
display (‘Training Done‘)
save ‘train‘ train_processed_bin;
%% 响应Testing按钮
function Testing_button_Callback(hobject eventdata handles)
global train_img max_hist_level bin_num form_bin_num;
global train_processed_bin;
global filename pathname I
load ‘train‘
test_hist_img(max_hist_level) = 0;
test_processed_bin(form_bin_num) = 0;
[rows cols] = size(I);
for i=1:1:rows
for j=1:1:cols
if( I(ij) == 0 )
test_hist_img(max_hist_level) = test_hist_img(max_hist_level) + 1;
else
test_hist_img(I(ij)) = test_hist_img(I(ij)) + 1;
end
end
end
[r c] = size(test_hist_img);
sum = 0;
K = 1;
%此处和Train中的不同为此处为只有一个图像
for j=1:1:c
if( (mod(jbin_num)) == 0 )
s
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2011-07-03 10:53 基于Matlab 直方图Histogram的人脸识别程序\
文件 25600 2011-03-31 16:57 基于Matlab 直方图Histogram的人脸识别程序\Face Recognition Algorithm Desc
文件 662310 2008-12-11 16:13 基于Matlab 直方图Histogram的人脸识别程序\Face_recognition_Histogram_processed_GUI.bmp
文件 4981 2011-03-31 19:28 基于Matlab 直方图Histogram的人脸识别程序\FR_Processed_histogram.asv
文件 8416 2011-03-31 19:25 基于Matlab 直方图Histogram的人脸识别程序\FR_Processed_histogram.fig
文件 5040 2011-03-31 19:31 基于Matlab 直方图Histogram的人脸识别程序\FR_Processed_histogram.m
目录 0 2011-06-17 18:45 基于Matlab 直方图Histogram的人脸识别程序\ORL\
目录 0 2011-06-17 18:44 基于Matlab 直方图Histogram的人脸识别程序\ORL\S1\
文件 2273 2011-06-17 18:35 基于Matlab 直方图Histogram的人脸识别程序\ORL\S1\1.jpg
文件 2395 2011-06-17 18:36 基于Matlab 直方图Histogram的人脸识别程序\ORL\S1\2.jpg
文件 2453 2011-06-17 18:39 基于Matlab 直方图Histogram的人脸识别程序\ORL\S1\3.jpg
文件 2394 2011-06-17 18:39 基于Matlab 直方图Histogram的人脸识别程序\ORL\S1\4.jpg
文件 7680 2011-06-17 18:44 基于Matlab 直方图Histogram的人脸识别程序\ORL\S1\Thumbs.db
目录 0 2011-06-17 18:44 基于Matlab 直方图Histogram的人脸识别程序\ORL\S2\
文件 2532 2011-06-17 18:39 基于Matlab 直方图Histogram的人脸识别程序\ORL\S2\1.jpg
文件 2583 2011-06-17 18:39 基于Matlab 直方图Histogram的人脸识别程序\ORL\S2\2.jpg
文件 2676 2011-06-17 18:39 基于Matlab 直方图Histogram的人脸识别程序\ORL\S2\3.jpg
文件 2788 2011-06-17 18:39 基于Matlab 直方图Histogram的人脸识别程序\ORL\S2\4.jpg
文件 2728 2011-06-17 18:39 基于Matlab 直方图Histogram的人脸识别程序\ORL\S2\5.jpg
文件 8192 2011-06-17 18:44 基于Matlab 直方图Histogram的人脸识别程序\ORL\S2\Thumbs.db
目录 0 2011-06-17 18:44 基于Matlab 直方图Histogram的人脸识别程序\ORL\S3\
文件 2784 2011-06-17 18:35 基于Matlab 直方图Histogram的人脸识别程序\ORL\S3\1.jpg
文件 2678 2011-06-17 18:35 基于Matlab 直方图Histogram的人脸识别程序\ORL\S3\2.jpg
文件 2585 2011-06-17 18:35 基于Matlab 直方图Histogram的人脸识别程序\ORL\S3\3.jpg
文件 7168 2011-06-17 18:44 基于Matlab 直方图Histogram的人脸识别程序\ORL\S3\Thumbs.db
目录 0 2011-06-17 18:45 基于Matlab 直方图Histogram的人脸识别程序\ORL\S4\
文件 2457 2011-06-17 18:35 基于Matlab 直方图Histogram的人脸识别程序\ORL\S4\1.jpg
文件 2446 2011-06-17 18:35 基于Matlab 直方图Histogram的人脸识别程序\ORL\S4\2.jpg
文件 2401 2011-06-17 18:35 基于Matlab 直方图Histogram的人脸识别程序\ORL\S4\3.jpg
文件 2598 2011-06-17 18:35 基于Matlab 直方图Histogram的人脸识别程序\ORL\S4\4.jpg
文件 7680 2011-06-17 18:45 基于Matlab 直方图Histogram的人脸识别程序\ORL\S4\Thumbs.db
............此处省略515个文件信息
相关资源
- MATLAB优化算法案例分析与应用-配书代
- matlab建蜂窝小区
- 浙大matlab课件
- MATLAB数字信号处理GUI设计
- Matlab使用说明书
- matlab-lssvm程序
-
锅炉simuli
nk仿真 - 《MATLAB在数学建模中的应用卓金武》
- 基于matlab gui的图像处理课程实验演示
- 男女声音分离的matlab代码
- k均值聚类算法的原理与matlab实现
- SIFT matlab实现源码
- 基于Matlab的车牌识别系统神经网络
- 模式分类第2版课后习题答案所有习题
- Matlab关于数字信号处理的常用函数集
- 一种简单的数字图像复制粘贴检测
- 最优化方法及其Matlab程序设计.pdf
- matlab智能算法30个案例分析第二版代码
- 基于matlab的三维地球模型
- Matlab编写多目标优化算法NSGA-Ⅱ的详解
- MATLAB2019A官方手册.pdf
- 自动驾驶matlab
- 利用MATLAB画简单的路线图
- 核密度估计matlab程序
- 全面详解LTE:MATLAB建模、仿真与实现
- MATLAB编程(第二版)-菜鸟入门教材
- 基于MATLAB实现图片透视效果矫正
- 机械振动系统的matlab模拟程序
- 7站定位,基于matlab声源定位
- 基于matlab的cdma通信系统的仿真
评论
共有 条评论