📄 getgaborfeature.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -