View License

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

» Watch video

Highlights from
FLD-based Face Recognition System

4.4 | 18 ratings Rate this file 50 Downloads (last 30 days) File Size: 180 KB File ID: #17066 Version: 1.0

FLD-based Face Recognition System


Amir Omidvarnia (view profile)


22 Oct 2007 (Updated )

This package implements 'Fisherface', a FLD-based face recognition system.

| Watch this File

File Information

This package implements a well-known FLD-based face recognition method, which is called 'Fisherface'.
All functions are easy to use, as they are heavy commented. Furthermore, a sample script and two small training and test databases are included to show their usage.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.2 (R2006a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (29)
14 Dec 2016 Will

Will (view profile)

I tried not to apply PCA at first. However, it takes such a long time to run the training code.

Comment only
13 Dec 2016 Will

Will (view profile)

Based on what Jaime and other people said.

1.In line 43 of "FisherfaceCore.m".
Replace "for i = 1 : P-Class_number" with "for i = P : -1 : Class_number+1".
If the results is still bad, try to increase the number of part " Class_number+1 ".
For example. "for i = P : -1 : (P - Class_number)".

2.Multiply Sb by the number of images per class intraining set.
For example, Sb = Sb + class_number*(m(:,i)-m_PCA) * (m(:,i)-m_PCA)';

Thanks to Amir, Jamie and who contributed to the code.

13 Dec 2016 Will

Will (view profile)

25 Aug 2016 Bayu Pradinta

I used 20 images for training data, the accuracy was good but when I used more than that (ex.100) the accuracy was bad. anyone can help me ?
what the function of class pouplation ? when I change it, it will be error

Comment only
30 Apr 2015 PAVAN KOKANE

in which line sb should mutliplied by number pictures in class and is any preprocessing is required if i take pictures from camera continuously.
which preprocessing is better to get good efficiency.

Comment only
17 Sep 2014 beldi makrem

thank you for this code I just changed the code I find good results.
my problem is how to can generates confusion matrix for n class.

Comment only
01 Jun 2014 Dalvin

Dalvin (view profile)

i wanted to ask is there any pre-processing can be apply to the recognition to improve recognition rate?

Comment only
18 May 2014 Osama Ramadan

gamed fash5

29 Nov 2013 nikhil dewangan

21 May 2013 Dani

Dani (view profile)

Thanks to you for your correctness in this cod in fisherfacecore.m file
its really effective for me.

Thanks and best regards.

Comment only
12 Apr 2013 fa ah

fa ah (view profile)


Comment only
12 Dec 2011 Jaime

Jaime (view profile)

Tsai, I forgot to mention that Sb should be multiplied by the number of pcitures per class (in this case 2), you are right on that too. Refer to section 2.4 of the following paper to note the error:

If you guys would like to look at another sample Matlab code for fisher faces, look at:

Comment only
12 Dec 2011 Jaime

Jaime (view profile)

12 Dec 2011 Jaime

Jaime (view profile)

Tsai there is a mistake indeed; the order of the eigenvectors is backwars, and you are using the eigenvectors with less relevance.

In line 43 of FisherfaceCore.m, you have to substitute line 43:

"for i = 1 : P-Class_number"


"for i = P:-1:Class_number+1"

This will solve the problem. I tested with all the faces in the sample set, and it was 90% accurate.

Everything has been working perfectly, thanks for an excellent and well commented code Amir!

Comment only
09 Oct 2011 Mr Smart

05 Sep 2010 Lucas Chai

And the PCA, the eigen vectors selected should be corresponding to the largest eigen values but in the source code it is opposite,
my email is:
expect to dicuss with u:)

05 Sep 2010 Lucas Chai

Inthe Sb part, there should be a multipler 2, right?

Comment only
25 Jul 2010 Lucas Chai

04 Mar 2010 Mike Gu


BTW, can I ask why in FisherfaceCore.m - under "Sorting and eliminating small eigenvalues" we don't need to fliplr "V" first since eigenvalues there are in ascending order? is it mean we eliminate large eigenvalues?

20 Jun 2009 Kahn615 Y


27 Apr 2009 Sergio Rodriguez

It simply works

05 Mar 2009 Amir Omidvarnia

Amir Omidvarnia (view profile)

Dear friend! My code is only a prototype of FLD-based face recognition systems. In fact, this code implements the core algorithm for the system. So, you shouldn't expect it to work well on all datasets. Instead, you can customize it according to your needs and used facial images.

Comment only
20 Feb 2009 Angshul Majumdar

Works well for the toy example provided. Should have been more general.

17 Jun 2008 chao shi

Thank you very much for your code.

30 May 2008 Chao Wang

perfect except that there are two little problems in matlab 6.5

08 May 2008 Dilip kumar

thanks a lot

05 Feb 2008 Syed Adnan Ahmed

Thanks for your code
they are commented to the max level
keep up the good work

05 Dec 2007 radha lak


29 Nov 2007 kaveh Rad

Thank you for your Excellent and clearly Code

Contact us