File Exchange

image thumbnail

Gabor Feature Extraction

version 1.7 (87.9 KB) by

This program generates a custom Gabor filter bank; and extracts the image features using them.

269 Downloads

Updated

The first function named "gaborFilterBank.m" generates a custom-sized Gabor filter bank. It creates a u by v cell array, whose elements are m by n matrices; each matrix being a 2-D Gabor filter. The second function named "gaborFeatures.m" extracts the Gabor features of an input image. It creates a column vector, consisting of the Gabor features of the input image. The feature vectors are normalized to zero mean and unit variance. At the end of each file there is a Show section that plots the filters and shows the filtered images. These are only for illustration purpose, and you can comment them as you wish.


More details can be found in:

M. Haghighat, S. Zonouz, M. Abdel-Mottaleb, "CloudID: Trustworthy cloud-based and cross-enterprise biometric identification," Expert Systems with Applications, vol. 42, no. 21, pp. 7905-7916, 2015.
http://dx.doi.org/10.1016/j.eswa.2015.06.025


(C) Mohammad Haghighat, University of Miami
haghighat@ieee.org
PLEASE CITE THE ABOVE PAPER IF YOU USE THIS CODE.

Comments and Ratings (227)

ANITA MINZ

Sir, could you please send me your full -MATLAB code and paper of feature extraction using gabor filters to my email id: 94minz.anita@gmail.com.

Sir,Please send the paper on "riadanik009@gmail.com"

zafran khan

Hello Sir
Sir i am trying to modify this Gabor filter for feature extraction of modulated signal.Can you please help me in this regard.
i intend to extract scale, shift and modulation parameter of the modulated signal.based on these feature ill use any classifier for automatic modulation classification. I need you email to share my problem with you.

As Has

As Has (view profile)

thanks dr. Mohammed for your answer . i used u & v _ 2*2 (4 filters ) what are this filter mean ?? are i extracted 256 features . are this features have a name like ( entropy , homogeneity , contrast in co-ccourance matrix)

As Has:

Please note that the length of the feature vector is : (number_of_pixels * number_of_filters) / (d1 * d2).
You should not increase the downsampling factors (d1 & d2) much. Otherwise, you will lose all the information in the image. I suggest you reduce the number of filters by reducing the u & v in gaborFilterbank. You don't have to have 40 filters (5x8) in the gaborArray.

As Has

As Has (view profile)

As Has

As Has (view profile)

sir plz my image size is [256 x 256] when i use d1=d2=4 it gives me a huge features vector about 365789 which difficult to store in xls file. i handled this problem by increasing the value of d to be 128
my questions are :-
1- if i increase the value of d again to be 256 is it true??
2- i know you will answer " decrease the size of image " but i want it to be the same in all my features extraction method or it doesn't effect ? i don't know what is the correct

Please send the code and the paper on andrerb_1992@hotmail.com

Ishita Mittal

Please send the code and the paper on ishita1508@gmail.com

andre ribeiro

Gabor Filter is similar to Fisher Vector ?

Taimoor

Im a student and working on lung segmentation.
please send the research paper and whole code at 13mseektanweer@seecs.edu.pk/

Yuzhen Lu

Error using downsample
Too many input arguments.
gaborAbs = downsample(gaborAbs,d1);

Could you please send me your matlab code and paper of feature extraction using gabor to my email id warda.boutegrab@gmail.com i want to apply for my mri images.

Hello sir i am a research scholor in img processing i want gabor code and your paper to review and citation pl send me
premchandermunimanda@gmail.com

premchander
Research scholor

dear sir how to call the functions in the main code please
this my e-mail please send me the paper and full code if you can please
moahaimen@gmail.com
thank you sir

Tejas Patil

can i know how to compare gabor feature extracted for testing

nilima ahmed

Could you please mail me your matlab code and paper of feature extraction using gabor filters to my email id:
efflorescence901@gmail.com

Nikhil Bhole

Sir , I am working on undergraduate project [Topic: Face identification using Gabor Ordinal Measures].I'm unable to code the MLDF filter .Can you help us .If you have code for face identification system using any of gabor methods.
Please mail me to nikhil.bhole13@vit.edu
Thanking you

betty

betty (view profile)

hy, at the first i want to thank you for this code, in my case i need to do classification so i need to load database of image and i dont no how can i do it. if you don't remind please send me how in email thanks ibtissamalsaidi@gmail.com

DongDong

How to use this code for classfiction.should I get a feactureVector or get the fuse image,after applied gabor to a image I want to do modular PCA for the image,so will I get the fuse image,can you tuitor me how to use this code? thank you.please email to 13512233595@163.com

gan san

Bolan

Bolan (view profile)

darryl tan

hi sir, can u show loop for images and records the featurevector in dataset?

darryl tan

Ranjana

Greetings Sir!It would be great if you help me in finding a solution for this problem Sir.How to apply classification for the obtained feature vector matrix?
Thanks in advance:)

MKUMARAN

Nicolas Yu

Nicolas Yu (view profile)

camelotZH

Sheetal Sutar

ali ahmed

very nice really ,thanks so much sir

Mike Reno

Kavitha S

Good

XIXI HEHE

good

Thulfiqar Hussein:

Thank you for the comment, but it is not a bug.
If you don't put the multiplication sign, *, between the value and i, Matlab will assume the i to be the imaginary unit (1*i vs 1i). Here, 1i is equal to 1*sqrt(-1).

I think you have some unnoticed bug in the
gFilter(x,y) = (fu^2/(pi*gama*eta))*exp(-((alpha^2)*(xprime^2)+(beta^2)*(yprime^2)))*exp(1i*2*pi*fu*xprime);

specifically in the exp(1i*2*pi*fu*xprime); the value of i is supposed to be sqrt(-1) but in the code it will take the value of i of the loop

Best regards

fred bnm

the output is feature vector in size 163841*1. how to using this vector training classifier???

Ye Sheng:

I just sent you a copy of the paper. You can also download it from:
http://dx.doi.org/10.1016/j.eswa.2015.06.025

ye sheng

ye sheng

ye sheng

ye sheng

ye sheng

Thanks for ur code!Could u please send your paper of feature extraction using gabor filters?
id:m18616672842_1@163.com
This paper will be served as the reference for my course report.Thanks

ye sheng

Thanks for ur code!Could u please send your paper of feature extraction using gabor filters?
id:m18616672842_1@163.com
This paper will be served as the reference for my course report.Thanks

ye sheng

Abhinav Rai

Malee

Malee (view profile)

chahla touati

You can download the code using the "Download Zip" button above, or from GitHub:
https://github.com/mhaghighat/gabor

Hello Mr. Mohammad ,
Could u please mail me ur matlab code for feature extraction ?
my e-mail is abdulrahman.mkaies@gmail.com
Thank u in advance,

I am final year cse student.
Currently I am doing project is called "COPY MOVE IMAGE FORGERY DETECTION".Now I am last stage of final viva.Please send me the code for my project.
my email id is saravanakumay95@gmail.com

mubthashira m

Could you please mail me your matlab code and paper of feature extraction using gabor filters to my email id:
mubthashira786@gmail.com
i am actually working on hand gesture recognition using gabor filter ,pca and svm and i need to know how to extract features using gabor filters .. please if you send me a simple explanation of the code and i kindely appreciate your effort ..Thanks

Could you please mail me your matlab code and paper of feature extraction using gabor filters to my email id:
shabnam76varsha@gmail.com
i am actually working on face recognition using artificial neural network and i need to know how to extract features using gabor filters .. please if you send me a simple explanation of the code and i kindely appreciate your effort ..Thanks

sahil

sahil (view profile)

Could you please mail me the code and paper of the same? My ID is sahilfaxwala@gmail.com

Hi Mohammad,
Could you please send me your matlab code and paper of feature extraction using gabor filters to my email id:
Fa_buharoon@hotmail.com
i am actually working in emotion recognition and i need to know how to extract features using gabor filters .. please if you send me a simple explanation of the code and i kindely appreciate your effort ..Thanks

Muhsina:

These values are just empirical and used by most researchers. You can refer to these two papers:

[1] L. Wiskott, J.M. Fellous, N. Kruger, C. Von der Malsburg, Face recognition by elastic bunch graph matching, IEEE Transactions on Pattern Analysis and Machine Intelligence 19 (7) (1997) 775–779.

[2] C.J. Liu, H. Wechsler, Gabor feature based classification using the enhanced Fisher linear discriminant model for face recognition, IEEE Transactions on Image Processing 11 (4) (2002) 467–476.

muhsina k

muhsina k

Thanks for this code!I went through your paper "CloudID: Trustworthy cloud-based and cross-enterprise biometric" and found the matlab code you had provided in matlab file exchange.

I just want to know why you have chosen fmax = 0.25; gama = sqrt(2); eta = sqrt(2) in the source code you had provided. Expecting a reply at the earliest
Regards,
Muhsina

dong yun

Hi,Mohammad Haghighat,thanks your source code.Currently, I am deeply puzzled with the different expressions of gabor filters.I also noticed the expression in your paper,which is different from others. Can you tell me some difference between their expressions and how they affect the filter result? for example ,why only fu existed in your expression ,not including fv? besides ,in the expression exp(j*2*pi*fu*x+phi),why not the corresponding item y does not exist ,and fv?(fu denotes the frequency in the x direction ,fv denotes the frequency in the y direction ).I hope you can help me ,thanks in advance .
 

Hi John,

Could you please justify why you think the high-frequency components along the boundary is favorable?

John Corring

Thanks for this code!

Don't you think that on ln. 61 of gaborFeatures.m that

gaborResult{i,j} = imfilter(img, gaborArray{i,j}, 'symmetric');

is preferable to

gaborResult{i,j} = imfilter(img, gaborArray{i,j});?

At least in my version of MATLAB (2012) the default behavior is zero padding, which yields high frequency components along the boundary.

Arous Merièm

Arous Merièm

Thanks for this code. Could you please explain if and how can we use it for IRM images (file .hdr)

forbes_zhong

Hi,Mohammad,I am currently using the gaborFeatures function to extract Gabor feature from image blocks,the block size are 12*12,13*13,14*14,15*15,16*16,I don't know how to set the parameters in your functions,
function gaborArray = gaborFilterBank(u,v,m,n)
function featureVector = gaborFeatures(img,gaborArray,d1,d2)
can you give me some suggestions?thanks

forbes_zhong

Fred Kaggwa

Hello Mohammad, thanks for this great thought. i am working on part of my phd research about multiple enrollment and i want to try and see if correlation techniques e.g gabor filter, perform better than minutiae techniques in terms of speed, memory consumption and recognition accuracy (when using multiple enrollment). And how can i directly match the two gabor filters?
please send me the code and full paper for reference. fred.kaggwa@gmail.com
thanks in advance

Aseem Chawla

Please forward the code to me sir!
email: aseemchawla35@gmail.com
thanks a ton!

Zhu Haichao

very Good

Tom5008 John

eeer

hello, can you send me code??

moody136@gmail.com

Hi Akshay,

Yes, you can directly compare the Gabor feature vectors. However, if you want a better performance and a higher accuracy, you'd better use a dimensionality reduction technique to reduce the dimensionality of the feature vectors and to make them more discriminative.
I used General Discriminant Analysis (GDA) whose code is also uploaded here:
http://www.mathworks.com/matlabcentral/fileexchange/52594

You can find more details about it in the paper mentioned in the description:
http://dx.doi.org/10.1016/j.eswa.2015.06.025

AKSHAY MANKAR

hello Mohammad Haghighat

first of all thanks for the code and second
can I directly compare the vector calculated from gaborfeatures for the authentication and recognition

thanks .I Use it.

can u send me code on sandeepmbm@gmail.com
thanks
i m a student and will refer u in my research paper

Li XUE

Li XUE (view profile)

Hi
can you sending this code file fore me?
e-mail : shelleywo@163.com

Steve

Steve (view profile)

Thanks for the paper.

Sunday Are

Sir, pls also send the mathematical model or form of both the gabor filter banks and gabor feature vectors codes. My email is still sunahlygold@yahoo.com

Sunday Are

Hi sir, my research is on face recognition using gabor filters. Can u send me ur paper for reference purpose? My email id is sunahlygold@yahoo.com, thanks in advance.

Joe Ramahi

I'm getting the error saying "undefined function or variable 'U'." How would I define this??
Thank You

Hi, are you can use this code for image enhancement?

Hi
can you sending this file fore me?
e-mail : afshin.shoeibi@gmail.com
Islamic gonabad azad university

Pedram:

You should make sure that the downsampling factors (d1 and d2) must be factors of the size of the input image.

Pedram

Pedram (view profile)

Ho Mohammad ,thanks for your code.my image is gray but I got an error;
In an assignment A(I) = B, the number of elements in B and
I must be the same.

mntaser:

I myself have not worked in that area, but you can check this paper:

Jianwei Yang, Lifeng Liu, Tianzi Jiang, and Yong Fan. "A modified Gabor filter design method for fingerprint image enhancement." Pattern Recognition Letters 24, no. 12 (2003): 1805-1817.

mntaser salem

hi mohammed
can i used this filter to enhance fingerprint image?and how?

mntaser salem

hi mohammed
can i used this filter to enhance fingerprint image?and how?

aniseija

Hi Mohammad,

I want to make the results of this Gabor " featureVector " for classification but the vector size is very large. Please help me how to reduce the feature vector. Besides, I also notice that in your paper these steps are performed.
1. Dimensionality Reduction
2. Feature Quantization using K D tree.
3. Crete Predicate.
4. Generate Token.
5. But here only second step i.e Gabor features extraction code is available, rest of steps not available in your code. Could you please send these codes to my email it will help me a lot.
Here is my email.
eijaazman92@gmail.com

Ebenhaezer

Hi Mohammad, could you send me your paper that you mentioned above? My email is ebenwy@gmail.com
I'm working on fingerprint encryption

Aniseija:

338 is not divisible by 4. You should either resize your image to a size that is divisible by 4 (336x276), or use another downsampling factor, e.g., d1 = 2.

aniseija

Good day, Sir! I am currently using the gaborFeatures function. I always get this error: A(I) = X: X must have the same size as I (pointing to this line: featureVector(((c-1)*s+1):(c*s)) = gaborAbs;). My image size is <338x276 uint8>. I am using d1 and d2 = 4 and i always get error.
i am very appreciate if you can tell me what a suitable value for my downsampling factor using the image size <338x276 uint8>.Thank you!

So Sth

So Sth (view profile)

Paulina Gawin

Hello Sir, could you send me your paper mentioned above? My email address is paulina.gawin@hotmail.com Thanks!

imtiyaz ahmad

Hi Mohammad,
Could you please send me your matlab code and paper of feature extraction using gabor filters to my email id: imtiyazahmed230@gmail.com.
I am working on age estimation. So, it will be useful.

imtiyaz ahmad

Hi Mohammad,
Could you please send me your matlab code and paper of feature extraction using gabor filters to my email id: imtiyazahmed230@gmail.com.
I am working on age estimation. So, it will be useful.

sir,please send me your paper

my email is : auronsanjr@gmail.com

please, can you send me your paper "Identification Using Encrypted Biometrics"?
my email: i.badarneh@students.psut.edu.jo

aniseija

sir,could you please send your paper and matlab code.I am working on face detection system using gabor filter.my email is eijaazman92@gmail.com
thanks

Pervez Bhan

Hello Mohammad , Could you please send your paper and matlab code. my email is pervezbhan219@yahoo.com
Best regards
Bhan

bluer Xing

Hi Mohammad,I am doing something about character recognition,your work is so helpful for it, Can you please send me your paper to my email bluer411945935@gmail.com?
Thanks

PhingPhing

qu

qu (view profile)

May I ask you some questions? If I use the program to recognize the texture of tongue,how to change the parameters,such as fmax,gama,eta,is there any rule to choose the value of parameters?Thank you!

Charles

Hi Mohammad, nice work. Can you please send me your paper to my email chmabox@gmail.com?
Thanks.

Hello sir, could you please send me your paper with the matlab code . I am working on gabor filter. My email id is batoolallami8@gmail.com,
thanks

Hello Mohammad, could you please send me your paper with the matlab code as i am interested in working on gabor filter. My email id is asmaa.touil@gmail.com,
thanks

amina amm

Hi Mohammad,

In your paper these steps are performed.

Dimensionality Reduction
Feature Quantization using K D tree.
Crete Predicate.
Generate Token.
But here only second step i.e Gabor features extraction code is available, rest of steps not available in your code.
Please send these code to my email.

amm.amina85@gmail.com
Thanks
Akshay Gore

NCTU

NCTU (view profile)

Could you send me the paper "Identification Using Encrypted Biometrics," pls. Thanks a lot!
joannahsu82@hotmail.com

Thank you for your comments and interest.
I just sent you the paper.

hemavathi N

Hello Sir, can you please send me your paper for reference.
My email id is hema15sg@gmail.com
Regards
Hema

Naser

Naser (view profile)

Hello Mohammad , Could you please send your paper and matlab code. my email is naser46912@gmail.com
Best regards
Naser

Annatoma Arif

Hi, could you please send me your paper along with the matlab code as i am interested in working on gabor filter. My email id is annatoma_arif@yahoo.com

Hello Mohammad , Could you please send your matlab code ? cz im working on project about gabor .. my email : khokhodhannie@gmail.com

Purvi Shetty

sir could you please send me the above sited paper to purvishetty24@gmail.com
sir do i need to make any changes for palm print recognition

Sir,please send me matlab code of feature extraction using gabor wavelet and also send ur paper of how to extract the feature from an image on my email avibiradar10@gmail.com

Hi, Mohammad sir, could you please send your paper to my mail id eucassiojr@gmail.com

A B

A B (view profile)

Please send me your paper to basma_ammour@yahoo.com

Praveen

Hi, Mohammad sir, could you please send your paper to my mail id gbpraveen8@gmail.com

after applying gabor feature extraction to my image. i get feature vectors, how to get energy, and other features from the feature vectors.

ait mohamed linda:

Your image size is small, and the size 11 is a prime number. So, it is better to set the downsampling factors to be 1 (d1=d2=1).
You should also adjust the filter size according to your image size, don't just use the default size of 39.

Good day, Sir! I am using the gaborFeatures function. I always get this error: A(I) = X: X must have the same size as I (pointing to this line: featureVector(((c-1)*s+1):(c*s)) = gaborAbs;). My image size is small 11*11
please help me

Praveen

sir could you please send the paper to gbpraveen8@gmail.com

shawn lin

Hi, Mohammad ! Would you please send your paper to me? My email address is shawn.shuai.lin@gmail.com. Many thanks!

Mohamed

Could you please send me your paper "Identification Using Encrypted Biometrics,"
My email is: m7md.khairy@gmail.com

Silas

Silas (view profile)

Please send me your paper to silasnjeru@gmail.com

Umme:

Thank you for the 5-star vote. I just sent you the paper.

Shailesh:

Can you please email me a sample image that you use?

Umme

Umme (view profile)

Could you please,send me your paper to my email ? yoko_shii@hotmail.com

Umme

Umme (view profile)

Shailesh

Hello sir, i implemented your code on my text word image but i am getting all zeors in feature vector output. please help me...

Thomas Tan

Dear Sir, I facing the problem while i input the img = imread('101_1.tif');(101_1.tif is the image that i input) it will runs all the loop over and over again. such as real part and magnitude windows pop up continuously.

Lim

Lim (view profile)

Farshad

mobeen net

Thank you very much for your work. Could you send your paper to this address amir_elek87@yahoo.com I really appreciate your help.

Nina:

Your image size is not a factor of 4, neither 146 nor 234. You should either resize the image or use other downsampling factors.

Good day, Sir! I am currently using the gaborFeatures function. I always get this error: A(I) = X: X must have the same size as I (pointing to this line: featureVector(((c-1)*s+1):(c*s)) = gaborAbs;). My image size is 146x234. Does that have anything in relation to the error I get? I am using d1 and d2 = 4.Thank you!

By the way, I am using d1 and d2 = 4. Your reply will be very helpful. Thank you!

Shanmugam:

m & n define the size of filter and cannot be set to 1.

Hi, I am shanmugam, I am using your code for image quality assessment. I am not able to understand the usage of m and n ?
Can they be set equal to 1 , All i want is for the code to return a u*v column vector for each pixel in the image ! Thank you.

qu

qu (view profile)

qu

qu (view profile)

Hillol:

d1 and d2 does not have any effect on computational complexity, but m & n have direct relation. You may want to deduce m and n if you are not interested in high frequency features in your images.

Sherko:

To the best of my knowledge, there is no relationship between the size of the image and the filter bank. The number of scales and orientations are arbitrary and mostly dependent on your application and image content and if you are interested in high frequency features or not.

Mehran Kh

HILLOL

HILLOL (view profile)

Hello Haghighat, I am using your code for scene identification purpose. Here I have around 100 240x320 images, each of the images are divided into 60x60 patches and I need to extract features from each of these patches. So computation time has become very high. Please tell me how to adjust d1,d2,m and n to reduce time as well as length of feature vector? And it would be great if you could send me your paper. my email address:
hillolchakrabarty40@gmail.com

Sherko

Sherko (view profile)

Dear Haghighat , thanks so much for quick reply. I'm new in gabor filter, My question is that if there is any relation between filter bank and Image size? i.e What is the best way to specify the number of scales and orientations? by trial and error or any thing else?

thank you

Sherko:

Selecting the downsampling factor is a trade-off problem, and it mostly depends on you input image and the application. For example, if you have a finely detailed image, you cannot choose a large downsampling factor, because you may loose information. But on the other hand, a smaller downsampling factor leads to a larger feature vector, which is not good either.

But for sure, (d1 & d2 ) = 64,60 or (d1 & d2) = 32,30 for an image of size 128x120 is too much! I would rather using a lower downsampling factor, like 4, and then apply a dimensionality reduction approach to reduce the feature vector size.

Thank you for your comment. I sent you the paper.

Sherko

Sherko (view profile)

Dear Mr. Haghighat, my image size is 128x120 when the factors for (d1 & d2 ) = 64,60 then we have 160 features , if (d1 & d2)=32,30 then the number of features will be 640 and so on. My question is that which factor is best? largest,lowest ...,etc. How the factor affect on the recognition process?

Thank you

Sherko

Sherko (view profile)

Please,Could you send me your paper to my email ?sherko.rahman@gmail.com

Thuvanan

Could you please send me your paper to my email
Thuvanan.bo@up.ac.th

Thuvanan

Ahammed and Popy:

Thank you for the 5-star votes. I sent you the paper.

popy meilina

Could you please send me your paper to my email popy.meilina@gmail.com

thank you

Ahammed

Hi, Thanks for the program. Can you please email me your paper to shahidpk74@gmail.com .

Hamid:

You can extract it from "gaborResult".

Hamid OUANAN

Thank you very much for your work. i have just an question: in your work you have just used the Magnitude of Gahbor features (feautrevector). how i can recover phase if i need ??
Thanks for advances

Hamid OUANAN

You can use the Matlab Toolbox for Dimensionality Reduction available at:

http://homepage.tudelft.nl/19j49/Matlab_Toolbox_for_Dimensionality_Reduction.html

Husdi

Husdi (view profile)

sarv

we had the same problem

sarv

sarv (view profile)

Thanks,I want to use the result of feature vector in classification but the result is too large, how can I solve this problem?

Husdi

Husdi (view profile)

I have read the papers that you suggest "Identification Using Encrypted Biometrics," . ' and there explained that " The feature vector is still very large even after downsampling. Therefore, we will
need to use dimensionality reduction methods [5].For dimensionality reduction, we use general discriminant analysis (GDA)" , how the sample GDA source code in matlab?

Husdi

Husdi (view profile)

I want to make the results of this Gabor " featureVector " for classification but vectornya very large size and computation time becomes very long .. , please help me how to use the results of Gabor feature vector size is not too big ?

Sarv:

You choose downsampling factor of 4 but 4 is not a factor of 374 (your image size).

sarv

sarv (view profile)

Hi, Thanks for your code. I test your code for 'Cameraman.tif' that work properly. But when I test it by my image this error happened.
My image is 374*388 unit8, I run
img = imread('101_1.tif');
if ndims(img) == 3;img=rgb2gray(img);end
gaborArray = gaborFilterBank(5,8,39,39);
featureVector =gaborFeatures(img,gaborArray,4,4);

The error is:

In an assignment A(I) = B, the number of elements in B and I must be the same.
(line86)featureVector(((c-1)*s+1):(c*s)) = gaborAbs;

if I comment this line the output is 0

Could you please help me?


qu:

m*n is the filter size, which is usually smaller than the image.

qu

qu (view profile)

Is there someone who can tell me if the parameter m/n is the size of the image i want to process?

Vero

Vero (view profile)

Nice work. Could you please send me your paper to this address veronica.aramendia@gmail.com.
I really appreciate your help.

Yan:

Thanks for your comment and the 5-star vote. I just sent you the paper.

Indra:

Are you sure the complexity comes from the Gabor feature extraction step? Because for the size of image you mentioned, the feature extraction takes fraction of a second.

Indra

Indra (view profile)

Thank you for your work. I have question regarding implementation your work. I would like to extract features from my datasets (positive and negative) in order to detect head-shoulder of human body.

However, when I apply it takes so slow and long time in processing, especially during the detection while I am using scanning window detection for the detection part. How do I speed up the processing of gabor features extraction, if have image resolution 768x649 pixel size?

Thank you

Yan Xu

Yan Xu (view profile)

Thank you very much for your work. Could you send your paper to this address peterxu1991@gmail.com I really appreciate your help.

Husdi

Husdi (view profile)

Thank you very much..!

Adan:

Thank you for your 5-star vote.
I just sent you the paper.

adan jauhary

Could you send me your paper to my email.
thank you

Salman:

Thank you for your 5-star vote.
I just sent you the paper.

Salman

Salman (view profile)

Could you please send me your paper to my email salnamo@yahoo.com

Thank you.

Thank you so much

Diatri:

I just sent it to you.

I need to read your paper to understand this gabor feature extraction. Could you please send it to rakatacimoet@gmail.com? Thank you

Andre:

I just sent the paper to your e-mail.

Andre Lukito

Your paper available was actually limited access. Can I fully read your paper so that I can cite the paper? Could you please send it via email to andrelukitok@gmail.com. Thank you

Sumeet:

I just sent the paper to you.

SUMEET

SUMEET (view profile)

Can i have your above cited paper.I dont have access to download this paper.If possible please send it to my email-id.
stylisheng90@gmail.com

I will be very much thankful to you.

Hua

Hua (view profile)

good

Aini Najwa:

I just sent it to you by e-mail.
Sure, you can use it for signature verification. There are some papers that have used Gabor in this application.

Assalamualaikum Mohammad,
Please teach me how to get your file... I am a new user of MATLAB.Is the Gabor FE is suitable to a signature recognition system?
If someone already get this file, need your help to send to my email, aininajwa.azmi@gmail.com

Thanks so much

Andre:

The adjacent pixels in a image are highly correlated; so, we remove the information redundancy by downsampling the feature images. A low downsampling factor will not have a noticeable effect on the recognition accuracy; however, it increases the performance of the classifier.

Andre Lukito

hi Mohammad. anyway thanks for the code. I have some questions. What is the impact of downsampling(d1 & d2)? does it removing some samples of the extrated feature? and Is that good to be used to face recognition process? Thanks

slimane

please I need to use the Gabor filter for texture analysis and extract features on medical image, there's someone there who can help me
thank you

Nawaz:

Sure, you can use it. There are actually papers that have used Gabor for OCR.

Nawaz Pasha

Hi, can I use this code for Feature Extraction in Handwritten Optical Character Recognition ?

Alessandro:

The downsampling factors (d1 and d2) must be factors of the size of the image.

Alessandro

I have an error in line 80 of gaborFeatures

Error using downsample
Too many input arguments.

Error in gaborFeatures (line 80)
gaborAbs = downsample(gaborAbs,d1);

Kushol:

In order to see the results visually, you just need to uncomment the "Show filtered images" section in the bottom of gaborFeatures.m .

Kushol Manna

how can i ckeck, whether the result is appropriate or not ??

Kun

Kun (view profile)

Mehul Parikh

shaik farook

hello sir. i want to match two images whether they belongs to same person or not. this can be done by feature extraction. can you please help how to do this. how to extract features. steps or procedure or basic code please sir

a b:

The downsampling factors (d1 and d2) must be factors of the size of the image.

a b

a b (view profile)

Hi Mohammad
I have this problem
In an assignment A(I) = B, the number of elements in B
and I must be the same.

Error in gaborFeatures (line 86)
featureVector(((c-1)*s+1):(c*s)) = gaborAbs;

Error in testGabor (line 11)
featureVector = gaborFeatures(img,gaborArray,4,4); %
Extracts Gabor features

I test my image it is grayscale image tif

Maithri:

It works on every image on my computer. Maybe your images were RGB! I just took care of that problem. Please download the updated code.

Mohammad:

There is no recursive loops with any limitations in the code. Most probably the problem is with one of the internal functions of you Matlab. Do you know in which line of the code it happens?

Milton:

Getting a vector of zeros is very unlikely. Can you please send me the input image that you are using? Then, I may get what the problem is.

Maithri

It is working for only 'cameraman.tif' image.. Plzz tell what changes can be made so that we can extract features from other images??

Maithri

Thanks.. It works very well..

the system shows still this error :

Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N) to change the limitation.
I use set(0,'RecursionLimit',1000).still there is error.which part recursively run ?

the system shows still this error :

Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N) to change the limi

Thanks for your code mohammad. I run the code but it works same loop . endless .
I want to see feature vector to apply for similarity measurement.
please guide me how to solve the problem .

Milton

Milton (view profile)

Hi, thanks to the code , but when i use it to get features in some images i get a vector of zeros,do you mind there is any reason for that ?

Steve

Steve (view profile)

Thanks for the update.

Do you use a difference formula of gabor filter?

Mark:

You are totally right. I first wrote the "gaborFilterBank" code for 8 orientations, and it was still there ;-)
Thank you for letting me know.
I just updated the code.

Ashok:

You need to specify the input arguments. Please read the help and "sample use" provided in the codes.

Ashok BM

??? Error using ==> gaborFilterBank at 35
There should be four inputs.

??? Error using ==> gaborFeatures at 41
use correct number of input arguments

Mark Veillette

Mark Veillette (view profile)

Thanks for posting the code.
If I'm not mistaken, shouldn't line 55 in gaborFilterBank.m read

tetav = ((j-1)/v)*pi;

In my version it says

tetav = ((j-1)/8)*pi;

putria

putria (view profile)

how to use this feature vector, into knn?, because, your wavelet only output 1 kolumn...?

putria

putria (view profile)

thank's Mohammad, that's run, but why the results feature extraction so much?,

Putria:

If you read the short help added in the mfile, the downsampling factors (d1 and d2) must be factors of the size of the image.

putria

putria (view profile)

after try, img = rgb2gray(img); ,i get an another error,
In an assignment A(I) = B, the number of elements in B and
I must be the same.

Error in ==> gaborFeatures at 80
featureVector(((c-1)*s+1):(c*s)) = gaborAbs;

Error in ==> testing at 4
featureVector = gaborFeatures( (img),gaborArray,4,4); % Extracts Gabor features

Putria:

Be aware that your images are in grayscale, not RGB.
You may try: img = rgb2gray(img); before feeding it into gaborFeatures.

Akshay:

This is only the code for Gabor Feature Extraction step.

putria

putria (view profile)

putria

putria (view profile)

after run,your reply. i get an error

Undefined function or method 'conv2' for input arguments of type 'double' and attributes 'full 3d
complex'.

Error in ==> gaborFeatures at 54
gaborResult{i,j} = conv2(img,gaborArray{i,j},'same');

Error in ==> test_gabor at 3
featureVector = gaborFeatures(img,gaborArray,4,4); % Extracts Gabor features
how, to fix it...

Akshay Gore

Akshay Gore (view profile)

Hi Mohammad,
I recently read your paper "Identification Using Encrypted Biometrics"
In your paper these steps are performed.
1. Face Detection is performed.
2. Gabor Features Extraction.
3. Dimensionality Reduction
4. Feature Quantization using K D tree.
5. Crete Predicate.
6. Generate Token.
But here only second step i.e Gabor features extraction code is available, rest of steps not available in your code.
Please update it or send to me.
Thanks
Akshay Gore
akshaygore@live.com

img = imread('imageName.jpg'); % Reads the image
gaborArray = gaborFilterBank(5,8,39,39); % Generates the Gabor filter bank
featureVector = gaborFeatures(img,gaborArray,4,4); % Extracts Gabor features

putria

putria (view profile)

how to get image / img from JPG n make feature of it?

Akshay Gore

Akshay Gore (view profile)

Steve

Steve (view profile)

Updates

1.7

Linked to Github

1.7

MATLAB Toolbox File Format

1.6

MATLAB Toolbox File Format

1.5

Took care of the RGB images

1.4

Take care of the RGB images

1.3

Added description

1.2

Fixed a bug

1.1

Added a reference

MATLAB Release
MATLAB 8.5 (R2015a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today