필터 지우기
필터 지우기

Gabor Feature Vector Algorithm

조회 수: 1 (최근 30일)
Angga Lisdiyanto
Angga Lisdiyanto 2016년 1월 20일
댓글: Angga Lisdiyanto 2016년 1월 20일
I have found an algorithm for generate a feature vector of Gabor Filter from one of handwritting text recogntion paper like this sentence :
Subsequently, we divide the 64 × 64 representation into 8 × 8 feature regions, resulting in 64 regions. From each, we extract one value as an element in 512 feature vector (8 × 64).
So, the 64 x 64 is a normalized (resize) image, before convoluted with one of 8 gaborArray Gabor's banks. And the total_bank is 8. And the gaborMag is a convoluted image.
Is this Matlab code could solving an algorithm above?
total_bank = length(gaborArray);
for i = 1:total_bank
subplot(4,2,i)
hasil_gabor{i} = gaborMag(:,:,i); % Convolution between image with each bank Gabor
imshow(gaborMag(:,:,i),[]);
theta = gaborArray(i).Orientation;
lambda = gaborArray(i).Wavelength;
title(sprintf('Orientation=%d, Wavelength=%d',theta,lambda));
featureVector = [];
for a = 1:jumlah_bank
gaborAbs = sum(abs(gaborMag(:,i)), 2); % sum all matrix elements in each rows
gaborAbs = gaborAbs(:);
% Normalized to zero mean and unit variance.
gaborAbs = ((gaborAbs-mean(gaborAbs))/(4.*std(gaborAbs,1))) + 0.5; % feature vector equation from Moftah Elzobi et al
featureVector = [featureVector; gaborAbs];
end
end
From algorithm above, i get right featureVector = 512 (one column). But i am not sure.
Thanks in advance. :)
  댓글 수: 9
Angga Lisdiyanto
Angga Lisdiyanto 2016년 1월 20일
편집: Angga Lisdiyanto 2016년 1월 20일
So one feature vector is a cell with 8 x 8 matrix inside it?
And then normalizing it become a 1 element (for 64 x 64) with this equal?
Angga Lisdiyanto
Angga Lisdiyanto 2016년 1월 20일

댓글을 달려면 로그인하십시오.

답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by