No BSD License  

Highlights from
Face Detection in Matlab


3.7 | 41 ratings Rate this file 144 Downloads (last 30 days) File Size: 1.97 MB File ID: #13701
image thumbnail

Face Detection in Matlab



18 Jan 2007 (Updated )

Face Detection using local SMQT features and split up SnoW classifier

| Watch this File

File Information

Face detection system implemented to run under Matlab. Based on local Successive Mean Quantization Transform (SMQT) features and split up Sparse Network of Winnows (SNoW) classifier. Based on the paper: Face Detection using local SMQT features and split up SNoW classifier. See further information in readme.txt and license.txt in the zip-file.

MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (70)
06 Nov 2014 Chen

I am working on face detection. I can run this submission in 32-bit Matlab, and it works very well. However, I can't run it in 64-bit Matlab.
Can you please send me this code.

06 Nov 2014 Chen  
11 Aug 2014 Muhammad Farhan

I can not run this submission. please could anyone help me out with this or any other good resource for illumination invariant face and mouth detection? I have to submit my work in this field before the end of this month so i am freaking out because of no prior knowledge of the field and matlab. Please send me the code if you can on

thanking you in advance.

28 Jun 2014 azeddine

Great work Thanks very much, please can you send me the full code?

28 Jun 2014 Awudu

Thanks very much, please can you send me the full code?

23 Jun 2014 azeddine

great work ...can you help me I need methods for crop the face in red box ?

25 Apr 2014 vienthong10 tphcm

Hi everyone. Hope, all you are doing well. I am in a problem. Please help me out if possible. I’m so poor at matlab. I need a code that can detect faces in images. So I did google and got the code below:


x=imread('test01.jpg');%read the image to memory
if (size(x,3)>1)%if RGB image make gray scale
x=rgb2gray(x);%image toolbox dependent
x=sum(double(x),3)/3;%if no image toolbox do simple sum
x=double(x);%make sure the input is in double format
[output,count,m,svec]=facefind(x);%run default face detection (full scan)
imagesc(x), colormap(gray)%show image
plotbox(output)%show the detections as red squares
plotsize(x,m)%draw the minimum and maximum face size boxes in top left
function [output,count,m,svec]=facefind(x,minf,maxf,dx,dy,sens);

function [output,count,m,svec]=facefind(x,minf,maxf,dx,dy,sens);
%x - grayscale image, double format (typical in range 0-1)
%minf - minimun face size to find [default 32]
%maxf - maximum face size to find [default inf]
%dx - number of pixel jump in x-direction [default 1]
%dy - number of pixel jump in y-direction [default 1]
%sens - sensitivity of detection on a scale from 1 to 10 [default 5]
% sens = 1 -> misses fewer faces, more false accepted faces
% sens = 10 -> misses more faces, fewer false accepted faces
%output - matrix with positions and scale information for
% found faces
% output(:,1) - [x1 x2 y1 y2].'
%count - number of patches evaluated for detection
%m - true (recalculated) minf and maxf m=[minf maxf]
%svec - scales of image used [x_s;y_s] (s - scale index)
%The input parameters minf, maxf, dx, dy and sens will get their
%default value if an empty matrix is given as input. For example:
%will change the sensitivity value to 7 but keep the default
%values for minf, maxf, dx and dy.
But all the lines of the function function[output,count,m,svec]=facefind(x,minf,maxf,dx,dy,sens); is written as comment lines. But the program runs well and also give me output. I don’t know the programmer to ask this. So I beg your help. Can anyone please help me to understand why and how this function runs?

I’m looking forward to your answers. Any suggestions will be appreciated.


01 Mar 2014 rajesh kumar

I am working on face detection. Pls send me this code.

01 Mar 2014 rajesh kumar

I am working on face detection. Pls send me this code.

11 Dec 2013 merve  
03 Dec 2013 ozi OZMOZ

I am working on face detection.This code is great, but I'm too curious about what is happening in facefind.dll. please send me your facefind.dll contents do I need this code .

03 Dec 2013 ozi OZMOZ

I am working on face detection. Pls send me this code.Thanks..

01 Sep 2013 sasa

I am working on face detection and I have tested your code on my database. I should change your code to get better result regarding to my database. would you mind sending me your full source code at

28 Aug 2013 Sajida

I am working on face detection. I tested your algorithm and some others. Your algorithm gives 100% results on my database. But I need to customize the code to make it work according to my requirements for that I need full source code. Can you please send me your code at
Thanks in advance.

10 Jul 2013 Arumugam G

Can you please send me the SMQT part matlab code? It would be very useful to me.. Thanks in advance.

27 Jun 2013 Bastien Schenckbecher

I, I work on face tracking. I test all the algorithms and I would like to test your own code. Can you send me ?

26 Jun 2013 javed patel

pls sent this coding.

19 Jun 2013 SOHEL RANA

Its very helpful.
please sent the code with your pleasure.

08 Jun 2013 valerio

hi, i've tested your code (ex01) but i've this problem:

Error in facefind (line 1)
function [output,count,m,svec]=facefind(x,minf,maxf,dx,dy,sens);

Output argument "output" (and maybe others) not assigned during call to

Error in ex01 (line 15)
[output,count,m,svec]=facefind(x);%full scan

how can I resolv it?

19 May 2013 WAN

Can you please send me the code ?

thanks in advance.

10 Apr 2013 gyanesh

thanks for the code....
it helped me a lot..

08 Mar 2013 Gayathri PP

This code is really great, but I'm too curious about what is happening in facefind.dll, so, it would be helpful if you upload the entire source code including the mechanism of facefind.dll.. or please send the full code to Thank you :)

22 Feb 2013 Robert Zeien

Very nice, could you please provide the MATLAB source for findface()?
-Thank you.

06 Feb 2013 Sakhi Shokouh

Can you please send me the code ?
my email is

thanks in advance.

17 Jan 2013 soumya

can u pls sent the code to me?

13 Jul 2012 Made Asana

it's very good..
thank you very much...

27 Jun 2012 Nattawat Siri

I think like Shamir Alavi, I need source code or step guideline of facefind.dll, Since I have study this technique from the paper ,I understanding that it use a lot of images for training,learning face and non-face,This reason you must kept many data in '.dll' file,isn't it?
I need to know for steps to detect face in facefind.dll ,Can you explain to me about it send to my email?

Thank you.Nice to meet you. ^_^

country: Thailand

07 Jun 2012 Shamir Alavi

I'm doing a project based on face detection and your program is giving one of the best results. Can you please send me the source code for the 'facefind' function. Here's my email id:
It'd be of great help to me. Thank you

08 Jan 2012 anjali

can anyone send me the MATLAB CODE FOR FACIAL FEATURES EXTRACTION? pls....
email id :

28 Dec 2011 eva

i'll tri first

22 Aug 2011 Dusan Zivkovic

what do you mean when you say not to wrap the .dll file?

06 Aug 2011 Divya Muralitharan

Hai ...
Thank u n advance...I am new to matlab..I don't knw hw tis findface works?Can u please tell me??

12 May 2011 Sajad

i have this problem too.when i impelemt it in matlab i am getting the following error
Error in ==> facefind at 1
function [output,count,m,svec]=facefind(x,minf,maxf,dx,dy,sens);

??? Output argument "output" (and maybe others) not assigned during call to

Error in ==> ex01 at 15
[output,count,m,svec]=facefind(x);%full scan

29 Apr 2011 song

thanks man ...

18 Apr 2011 renuka

pls give me source code

27 Feb 2011 Low Ming Yao

hi..Your work is great...May i ask is it any possible methods to crop out the face detected enclosed in the box??

01 Jan 2011 vipin vc

how to run this

21 Oct 2010 Electron Ali

Sir , i m interested in Face detectioN of A particuLAr perSon, in a crowd.....

Example:.. i haVe daTa stored in my a Computer,,of a particular person or a grp...,,,.,.then my live camera detect a face frm a crowd ,who match with, a persons, in my list,,,

i get automatically its complete data and info,,.,.

i m electronic student,.plZ,.,help me,
u gUys help me tOO....


07 Sep 2010 Qiu dw

It works well, but do not wrap facefind.dll please

05 Aug 2010 Tanyer Alan  
15 Jun 2010 Tolga  
26 May 2010 ayesha anwar  
19 Mar 2010 Evi

I'm working on my dissertation, which is on face recognition and came across your face detection function.

I have a 64-bit version of matlab. I'm executing the ex01.m example; however I'm getting the following error:

Error in ==> facefind at 1
function [output,count,m,svec]=facefind(x,minf,maxf,dx,dy,sens);

??? Output argument "output" (and maybe others) not assigned during call to

Error in ==> ex01 at 15
[output,count,m,svec]=facefind(x);%full scan

Could this be related to the fact that the dll was compiled for a 32 bit platform and O.S.? If so would you please be able to send me the source code?

Thank you in advance for your help.



23 Mar 2009 Iva

hm... maybe i am doing something wrong... but there is no .h file which i need for loading the facefind .dll in matlab with the loadlibrary function. what am i doing wrong? thx

05 Mar 2009 Hanaa


I'm doing my final year project on 'Image Processing Methods for facial recognition using Matlab'. I've got Visual Studio 2005 background but never used MatLab before. I've just started on with research, video tutorials and reading.

Can you please help me with a guide, where can I start this from? I just downloaded this file. Will it help to what I'm doing?

Will be waiting for your reply, your help would be very much appreciated! :))

Thanks, Hanaa

01 Feb 2009 Gholamreza (Šahab) Anbarjafari

Great Work, Well done, your work has been cited in my work :-)

11 Dec 2008 sara

it's good ,Thank you

14 Sep 2008 Ivelina Stefanova

Thank you. It works quite well.

30 Jul 2008 ould ahmed elhadi  
26 May 2008 danisupr4 (student)

thanks so much .. this will help us much much much much much ....

25 May 2008 Seirr (Student)

It's good. Thanks.

25 May 2008 yang bruce

excellent performance! how to get the code?

07 May 2008 Ji Soo Lee

excellent performance! source code?

04 May 2008 steven fernandes

The face detection is really gud

24 Mar 2008 sun xunfeng  
01 Aug 2007 suchita agarwal

its good to see.

07 Jun 2007 kemmou abdelali

c'es un algo efficace

07 Jun 2007 oei loei

best algorithe.oei

05 May 2007 diana abd

i like ur code.its simple but take long time to execute if the pixels of the image is big.

02 Apr 2007 Lucy Amelia

It interests much this subject to me since I am making my thesis about this and him agradeceria much any information or aid that can provide to me.
Att. Lucy

02 Mar 2007 Azalin L

don't rate your own file

01 Mar 2007 Mikael N


28 Feb 2007 Azalin L


28 Feb 2007 A M

you're cool

20 Feb 2007 hala jamal  
19 Feb 2007 m k

don't waste our time

22 Jan 2007 Jos x

If you do not provide source codes, then:
1. this will run on windows machines only,
2. is potentially dangerous to use!

19 Jan 2007 M Slava

And dont bother about the source code comments !

18 Jan 2007 Zhijun Wang

Do not wrap facefind.dll

18 Jan 2007 N Chandra

Please, don't bother submiting something if you do not intend to provide the entire source code.

Contact us