getgaborfeature.m
来自「Gabor filter for face recognition or oth」· M 代码 · 共 21 行
M
21 行
function y=getgaborfeature(x,G)
% extract the gabor features from the single image
% x : single image
% G : gabor filters
Image_temp=[];
I=x;
temp = cell(5,8);
temp2 = cell(5,8);
% figure;
for i=1:5
for j=1:8
temp{i,j}=mat2gray(conv2(I,G{i,j},'same'));% convolution
temp2{i,j}=imresize(abs(temp{i,j}),0.25);% down sample using the 'imresize' function
[mmm,nnn]=size(temp2{i,j});
temp3=reshape(temp2{i,j},1,mmm*nnn);
Image_temp=[Image_temp,temp3];%row/column stack
% subplot(5,8,(i-1)*8+j);
% imshow(temp2{i,j},[]);
end;
end;
y=Image_temp;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?