资源简介
Gabor特征提取MATLAB函数
function gaborArray = gaborFilterBank(u,v,m,n)
function featureVector = gaborFeatures(img,gaborArray,d1,d2)
代码片段和文件信息
function featureVector = gaborFeatures(imggaborArrayd1d2)
% GABORFEATURES extracts the Gabor features of the image.
% It creates a column vector consisting of the image‘s Gabor features.
% The feature vectors are normalized to zero mean and unit variance.
%
%
% Inputs:
% img : Matrix of the input image
% gaborArray : Gabor filters bank created by the function gaborFilterBank
% d1 : The factor of downsampling along rows.
% d1 must be a factor of n if n is the number of rows in img.
% d2 : The factor of downsampling along columns.
% d2 must be a factor of m if m is the number of columns in img.
%
% Output:
% featureVector : A column vector with length (m*n*u*v)/(d1*d2).
% This vector is the Gabor feature vector of an
% m by n image. u is the number of scales and
% v is the number of orientations in ‘gaborArray‘.
%
%
% Sample use:
%
% img = imread(‘cameraman.tif‘);
% gaborArray = gaborFilterBank(583939); % Generates the Gabor filter bank
% featureVector = gaborFeatures(imggaborArray44); % Extracts Gabor feature vector ‘featureVector‘ from the image ‘img‘.
%
%
% Details can be found in:
%
% M. Haghighat S. Zonouz M. Abdel-Mottaleb “Identification Using
% Encrypted Biometrics“ Computer Analysis of Images and Patterns
% Springer Berlin Heidelberg pp. 440-448 2013.
%
%
% (C) Mohammad Haghighat University of Miami
% haghighat@ieee.org
% I WILL APPRECIATE IF YOU CITE OUR PAPER IN YOUR WORK.
if (nargin ~= 4) % Check correct number of arguments
error(‘Use correct number of input arguments!‘)
end
if size(img3) == 3 % Check if the input image is grayscale
img = rgb2gray(img);
end
img = double(img);
%% Filtering
% Filter input image by each Gabor filter
[uv] = size(gaborArray);
gaborResult = cell(uv);
for i = 1:u
for j = 1:v
gaborResult{ij} = conv2(imggaborArray{ij}‘same‘);
% J{uv} = filter2(G{uv}I);
end
end
%% Feature Extraction
% Extract feature vector from input image
[nm] = size(img);
s = (n*m)/(d1*d2);
l = s*u*v;
featureVector = zeros(l1);
c = 0;
for i = 1:u
for j = 1:v
c = c+1;
gaborAbs = abs(gaborResult{ij});
gaborAbs = downsample(gaborAbsd1);
gaborAbs = downsample(gaborAbs.‘d2);
gaborAbs = reshape(gaborAbs.‘[]1);
% Normalized to zero mean and unit variance. (if not applicable please comment this line)
gaborAbs = (gaborAbs-mean(gaborAbs))/std(gaborAbs1);
featureVector(((c-1)*s+1):(c*s)) = gaborAbs;
end
end
%% Show filtered images
% % Show real parts of Gabor-filtered images
% figure(‘Numbertitle‘‘Off‘‘Name‘‘Real parts of Gabor filters‘);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 97397 2014-11-12 18:06 Gabor\GaborArray.jpg
文件 3411 2014-11-12 18:06 Gabor\gaborFeatures.m
文件 2509 2014-11-12 18:06 Gabor\gaborFilterBank.m
目录 0 2015-03-23 20:42 Gabor
----------- --------- ---------- ----- ----
103317 4
- 上一篇:椭圆拟合matlab程序
- 下一篇:盲源分离JADE算法
相关资源
- Gabor原子的构造
- Gabor的matlab程序,Gabor滤波是一种不错
- 基于Gabor小波变换和人工神经网络的人
- Gabor小波变换
- 时频Gabor变换
- GaborGMRFLBP纹理特征提取方法_MATLAB
- matlab使用gabor变换和神经网络实现人脸
- gabormatlab
- 基于Gabor滤波指纹识别算法matlab完整程
- gabor特征提取matlab实现
- Gabor变换,MATLAB,边缘检测
- matlab 实现Gabor滤波器
- gabor滤波的matlab实现
- Gabor变换 MATLAB程序 根据理论自己编写
- Matlab的Gabor滤波器代码
- Gabor滤波特征提取方法 matlab程序
- 利用Gabor滤波器实现的MATLAB掌纹识别系
- gabor滤波matlab代码66459
- gabor+svm matlab程序,一共三个文件,两
- Gabor变换实现(CmatlabOpenCV)
- Gabor小波提取图像纹理特
- 人眼识别matlab
- pca agabor 人脸识别
- MATLAB中实现Gabor滤波器
- log gabor 滤波器matlab程序
- Gabor Gabor小波变换的matlab实现
- Gaborpca Gabor小波变换与PCA的人脸识别代
- Gabor Gabor滤波器
- gabor-pca 本程序是先用gabor小波变换对
- GaborTexture Gabor滤波器方法提取纹理特
评论
共有 条评论