资源简介
基于matlab的gabor滤波器的代码,代码较为简单,内含简单的注释
代码片段和文件信息
%function [opts] = Create_GaborF (ipts par)
%
%
% This function aims to create the argumented Gabor feature.
%
% input
% ipts. input data structure
% dat 3d image data matrix each dat(::i) is an (downsampled)
% image matrix.
% par. input parameter structure
% ds_w the downsample image‘s width in Gabor
% ds_h the downsample image‘s heigth in Gabor
% ke_w Gabor kernel‘s width
% ke_h Gabor kernel‘s heigth
% Kmax Gabor kernel‘s para default(pi/2)
% f Gabor kernel‘s para default(sqrt(2))
% sigma Gabor kernel‘s para default(pi or 1.5pi)
% Gabornum Gabor kernel‘s number
%
% output
% opts. output data structure
% gdat Gabor feature of training data each column is
% the argumented gabor feature vector of a sample
%--------------------------------------------------------------------------
% Note(Zhen Cui): every Gabor kernel spans a
% vector of ds_w*ds_h and then concatenated the
% Gabornum thus vector.
%--------------------------------------------------------------------------
%
% Copyright Mike YANG PolyU Hong Kong
% reference: LiuC.WechslerH.:Gabor Feature based Classification Using the Enhanced Fisher
% Linear Discriminant Model for Face Recognition IEEE IP 11 (2002)467–476.
%
function [opts] = Create_GaborF (ipts par)
if mod(par.ke_w2)~=1 | mod(par.ke_h2)~=1
error(‘The width and height of Gabor kernel should be odd number‘);
end
[ GaborReal GaborImg ] = MakeAllGaborKernal( par.ke_h par.ke_w par.Gabor_numpar.Kmax par.f par.sigma);
radius_w = floor(par.ke_w/2);
radius_h = floor(par.ke_h/2);
center_w = radius_w+1;
center_h = radius_h+1;
ker_ener = [];
% according the par.raT to select a suitable and accurate size of kernel window
for step = 1: (radius_w+radius_h)/2
ratio = 0;
for i = 1 :40
temp_r1 = sum(sum(abs(GaborReal(center_h-radius_h+step:center_h+radius_h-stepcenter_w-radius_w+step:center_w+radius_w-stepi))));
temp_r2 = sum(sum(abs(GaborReal(::i))));
temp_i1 = sum(sum(abs(GaborImg(center_h-radius_h+step:center_h+radius_h-stepcenter_w-radius_w+step:center_w+radius_w-stepi))));
temp_i2 = sum(sum(abs(GaborImg(::i))));
ratio = ratio + temp_r1/temp_r2/80 + temp_i1/temp_i2/80;
end
ker_ener = [ker_ener ratio];
if ratio < par.raT
step = step - 1;
break;
end
end
num = size(ipts.dat3);
for i = 1: num
tic
kel_GR = GaborReal(center_h-radius_h+step:center_h+radius_h-stepcenter_w-radius_w+step:center_w+rad
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3255 2011-08-20 10:55 Gabor Matlab\Create_GaborF.m
文件 738 2011-03-03 17:23 Gabor Matlab\Gaborforfolder.m
文件 989 2011-03-03 17:14 Gabor Matlab\Gaborsetting.m
文件 985 2011-08-20 19:19 Gabor Matlab\Gabor_T_Fast1.m
文件 13078 2011-08-19 19:41 Gabor Matlab\images\Crop1.bmp
文件 782 2010-07-09 10:09 Gabor Matlab\MakeAllGaborKernal.m
文件 1037 2010-07-08 22:16 Gabor Matlab\MakeGaborKernal.m
文件 174 2011-08-20 20:01 Gabor Matlab\Readme.txt
目录 0 2011-08-20 19:57 Gabor Matlab\images
目录 0 2011-08-20 19:57 Gabor Matlab
----------- --------- ---------- ----- ----
21038 10
- 上一篇:gamma校正matlab
- 下一篇:四元数法计算两个物体之间的相对位姿参数
相关资源
- gamma校正matlab
- 回馈整流MATLAB仿真
- matlab提取音频特征
- 数据预处理 剔除奇异点 matlab程序
- MATLAB+遗传算法+多车有容量约束VRP
- MATLAB遗传算法VRP
- 基于Matlab直线检测
- 灰色神经网络Matlab代码
- MATLAB课程设计——数字带通FIR滤波器
- Turbo码的编解码的Matlab及VC 源代码
- 通信原理中16QAM信号 MATLAB程序
- matlab实现JPEG
- 基于MATLAB的机器人避障程序
- 将图像放大或缩小的matlab代码
- 复杂网络中GN,FN网络的matlab实现
- IMM交互多模程序MATLAB
- MATLAB实现图像的Arnold置乱
- matlab实现的维特比译码
- 基于Gabor滤波指纹识别算法matlab完整程
- PTS matlab 代碼源
- matlab源程序 条状图的绘制
- 基于彩虹编码的伪彩色增强matlab代码
- MATLAB用遗传算法GA)车间调度
- 基于matlab的指纹识别系统(源码)
- 使用matlab对采样数据文本进行fft变换
- OFDM MATLAB源码
- 最小二乘估计MATLAB实现
- DCT系数直方图
- MATLAB视频转为图片
- kalman运动目标跟踪
评论
共有 条评论