Code covered by the BSD License  

Highlights from
Objects/Faces Detection Toolbox

4.82353

4.8 | 19 ratings Rate this file 271 Downloads (last 30 days) File Size: 19.93 MB File ID: #24092
image thumbnail

Objects/Faces Detection Toolbox

by Sebastien Paris

 

12 May 2009 (Updated 17 Nov 2011)

Objects/Faces detection using Local Binary Patterns and Haar features

| Watch this File

File Information
Description

Objects/Faces detection toolbox v 0.24
--------------------------------------

This toolbox provides some tools for objects/faces detection using Local Binary Patterns (and some variants) and Haar features. Object/face detection is performed by evaluating trained models over multi-scan windows with boosting models (such Adaboosting, FastAdaboosting and Gentleboosting) or with linear SVM models. The main objective of FDT is to bring simple but efficient tools mainly written in C codes with a matlab interface and easy to modify.
  
BEFORE INSTALLATION, BE SURE TO HAVE A C COMPILER ON YOUR SYSTEM!!!!!

For windows system, recommanded compilers are MSVC/MSVC express (free)/Intel compiler
For Linux system, recommanded compilers are GCC(free)/Intel compiler

PLEASE BE SURE THAT YOU SETUP YOUR COMPILER BEFORE FDT INSTALLATION.

To check, type in matlab command : mex -setup and choose your favorite compiler

For Windows system, default LCC compiler included in matlab can't compile all files, you should have some errors during installation.
Please use precompiled mex-files included in zip files.

For Windows system, you may need also to add OMP_NUM_THREADS equal to the number of core in your system variables (if OpenMP failed)
Installation
------------

This toolbox has been tested on Windows system and should also work for Linux plateform without any problem.

Please run "setup_fdt" to install, compile each mex-files and add fdtool directory in the matlab path.
Type "help mexme_fdt" for more compilation options.

Please open *.m or *.c files to read full description/instruction of each function and main references.

Run First
---------

a) Play with "demo_detector_haar.m" or "demo_detector_hmblbp.m" for real-time face tracking.
For windows system, you can use the included VCAPG2 webcam grabber. Otherwise and for Linux system, you must have the IMAQ Toolbox (getsnapshot function).

b) View examples included in "train_cascade" for training Haar/MBLBP features with boosting algorithms and cascade (type: help train_cascade)

c) View examples included in "train_cascade_Xpos" for training Haar/MBLBP features with boosting algorithms and cascade (type: help train_cascade_Xpos)
Positives examples are staked in a 3D tensors.

d) View examples included in "train_model" for training Haar/MBLBP/HMBLBP/HCSMBLBP features with boosting/SVM algorithms.
  (type: help train_model)

Please open "readme.txt" for full details and references

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
VCAPG2, windows internet explorer + google search = URLs for jpg images

MATLAB release MATLAB 7.8 (R2009a)
Other requirements A C compiler (MSVC/Intel CPP)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (106)
05 Sep 2009 Bodla Rakesh  
04 Nov 2009 Soeren Sproessig  
04 Nov 2009 Soeren Sproessig

excellent work!

to use it with matlab R2009b x64 on win7pro64 I had to change mexme_fdt.m a little bit:

44c44,46
< lib = ['"' , fullfile(matlabroot , sprintf('extern\\lib\\%s\\microsoft\\libmwblas.lib',computer('arch'))) , '"'];
---
>
> lib = ['"' , fullfile(matlabroot , 'extern\lib\win32\microsoft\libmwblas.lib') , '"'];
>
135c137

04 Nov 2009 Soeren Sproessig

in addition to my prior post:
to build vcapg2.cpp you need to have a current Microsoft DirectX SDK installed...

04 Nov 2009 Soeren Sproessig

to build vcagp2.cpp (used in demo_detector_haar as camera acquisition provider) there are some other tricks
1. create a dummy dxtrans.h which seems to be missing in the SDK:
c:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\dxtrans.h
#define __IDxtCompositor_INTERFACE_DEFINED__
#define __IDxtAlphaSetter_INTERFACE_DEFINED__
#define __IDxtJpeg_INTERFACE_DEFINED__
#define __IDxtKey_INTERFACE_DEFINED__

see: sample from http://www.riseoftheants.com/mmx/faq.htm#mjpegsample

2. some changes in code to be able to compile with VC08 and the current SDK in Win64:

82d81
<
629,630c628
< // pbmi->hInst = (HINSTANCE)GetWindowLong(GetFocus(),GWL_HINSTANCE);
< pbmi->hInst = (HINSTANCE)GetWindowLongPtr(GetFocus(), GWLP_HINSTANCE);
---
> pbmi->hInst = (HINSTANCE)GetWindowLong(GetFocus(),GWL_HINSTANCE);
958c956
< wc.lpfnWndProc =(WNDPROC) WndProc;
---
> wc.lpfnWndProc = WndProc;

04 Nov 2009 Sebastien Paris

Thanks you Soeren for these indications and comments.
Please if you have better models than those already included, I'll include them in a future release.

Sébastien

09 Nov 2009 Nessrine

i 'm not soo good in matlab implementation but i would like to test this code. can any one help me specialy i have no idea to use .c file with matlab for me this is the first matter.
thank an advance

10 Nov 2009 Sebastien Paris

Add fdtool dir in your path and run "mexme_fdt.m" to compile *.c files

18 Jan 2010 Fumin Shen

This is an excellent work!!
But there's a problem when i run "mexme_fdt.m" to compile *.c files.
??? Error using ==> mexme_fdt>getmexopts at 208
getmexopts [Bruno]: cannot open comopts.bat file

And i failed to find the file "comopts.bat" or 'mexopts.bat' in the files downloaded.
Could any one tell me why?

18 Jan 2010 Sebastien Paris

did you did a mex -setup before ?

18 Jan 2010 Fumin Shen

I am sorry I made such a stupid mistake!
Thanks for your time!

21 Jan 2010 Mohammad Ghahramani

It is a very useful set of codes but would you please change the imresize to sth else.

I added the path to fdtool folder but MATLAB mixes up with two imresize functions at a time and returns an empty matrix if you just use imresize in a code. The same error reported here: http://www.mathworks.co.uk/matlabcentral/newsreader/view_thread/265938

31 Jan 2010 jethro tan

I trained my own model file "model.mat" by your file "fast_haar_adaboost_binary_model_cascade.c". But a cascade matrix must be created properly for detection module,such as [3 4 2 1;0 0 0 0]. How do I construct a cascade matrix properly?

23 Feb 2010 Kai Tang

To jethro tan,
Paris has done an excellent work on face detection. Maybe he is busy for other things, but he has figured out this question as
[model cascade]=multi_exit_asymetric_boosting(Xpos, negatives_path, options)

23 Feb 2010 Kai Tang  
30 Mar 2010 rajendra gharase

hii.. i am weak in matlab.
can u tel me..
how to do the mex set up?
thanks...

31 Mar 2010 Sebastien Paris

mex -setup

19 May 2010 Iqbal Nouyed

Hi Sebastien,

I am having trouble in compiling the toolbox. I have tried the already given instruction as follows:

path('C:\Program Files\MATLAB\R2009a\toolbox\fdtool', path);
mex -setup

but after running the mexme_fdt i'm getting the following error:

compiling chlbp
 
  C:\PROGRA~1\MATLAB\R2009A\BIN\MEX.PL: Error: 'chlbp.c' not found.
 
??? Error using ==> mex at 218
Unable to complete successfully.

Error in ==> mexme_fdt at 148
    eval(['mex ' str])

Could you please help me?

Thanks.

20 May 2010 Sebastien Paris

Hello,

You installed the toolbox in 'C:\Program Files\MATLAB\R2009a\toolbox\fdtool' ? strange location, anyway ..
Which compiler didyou use ?. did you run mexme_fdt from the right dit ?i.e. 'C:\Program Files\MATLAB\R2009a\toolbox\fdtool' ?

like :

cd 'C:\Program Files\MATLAB\R2009a\toolbox\fdtool'
mexme_fdt

09 Jun 2010 HMN  
09 Aug 2010 Louis

Awesome toolbox. I have a question regarding the CHLBP, does it happen that you have the one that has the LBP values output (i.e. not the histogram bins output).

What i am looking for is you give an image and get the the LBP(R,N) for the pixels; it should a step before CHLBP which calculates the distibution of the LBP pixels

Thanks

11 Aug 2010 Sebastien Paris

Hello,

Probably to many values to output ..... You can modify chlbp.c in order to output theses outputs.....

22 Aug 2010 Samuel

Thank you for this software. The haar functions in .c are fast and very useful.

24 Aug 2010 Tobias malach

Hi,
I'd like to disscus fd toolbox. I've got matlab 2010.
mexme_fdt.m ends with error: Could not find specified options file
    'mexopts_intel10.bat'. Even if i have it in matlab path. Could anyone help me please?
Thanks, Tobias

24 Aug 2010 Sebastien Paris

Simply run "mexme_fdt;" witout any options structure...

25 Aug 2010 Tobias malach

I've already tried, I get an error: Error using mexme_fdt>getmeopts at 208, getmeopts [Bruno]:Cannot open comopts.bat file

26 Aug 2010 Sebastien Paris

Please configure your compiler by "mex -setup"

30 Aug 2010 Kai Tang

To Bluebird,

you can also test the LBP in matlab from MVG.
http://www.ee.oulu.fi/mvg/page/lbp_matlab

By the way, I have done the eye, even gaze detection based on paris' excellent work. Thanks a lot!!!

07 Sep 2010 Qiu dw

Thank you for sharing code.

20 Oct 2010 adam akbar

i already do this step

>> mex -setup
Please choose your compiler for building external interface (MEX) files:
 
Would you like mex to locate installed compilers [y]/n? y
 
Select a compiler:
[1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2009b\sys\lcc
 
[0] None
 
Compiler: 1
 
Please verify your choices:
 
Compiler: Lcc-win32 C 2.4.1
Location: C:\PROGRA~1\MATLAB\R2009b\sys\lcc
 
Are these correct [y]/n? y
 
Trying to update options file: C:\Documents and Settings\Adam\Application Data\MathWorks\MATLAB\R2009b\mexopts.bat
From template: C:\PROGRA~1\MATLAB\R2009b\bin\win32\mexopts\lccopts.bat
 
Done . . .
 
**************************************************************************
  Warning: The MATLAB C and Fortran API has changed to support MATLAB
           variables with more than 2^32-1 elements. In the near future
           you will be required to update your code to utilize the new
           API. You can find more information about this at:
           http://www.mathworks.com/support/solutions/data/1-5C27B9.html?solution=1-5C27B9
           Building with the -largeArrayDims option enables the new API.
**************************************************************************
 
>> mexme_fdt
compiling chlbp
compiling chlbp_adaboost_binary_model_cascade
compiling chlbp_adaboost_binary_predict_cascade
compiling chlbp_gentleboost_binary_model_cascade
compiling chlbp_gentleboost_binary_predict_cascade
compiling detector_haar
compiling detector_mblbp
compiling eval_chlbp
compiling eval_haar
compiling eval_haar_subwindow
compiling eval_mblbp
compiling haar
compiling haar_ada_weaklearner
compiling haar_adaboost_binary_model_cascade
compiling haar_adaboost_binary_predict_cascade
compiling haar_featlist
compiling haar_gentle_weaklearner
compiling haar_gentleboost_binary_model_cascade
compiling haar_gentleboost_binary_predict_cascade
compiling haar_scale
compiling imresize
compiling int8tosparse
compiling mblbp
compiling mblbp_ada_weaklearner
compiling mblbp_adaboost_binary_model_cascade
compiling mblbp_adaboost_binary_predict_cascade
compiling mblbp_featlist
compiling mblbp_gentle_weaklearner
compiling mblbp_gentleboost_binary_model_cascade
compiling mblbp_gentleboost_binary_predict_cascade
compiling rgb2gray
compiling fast_haar_ada_weaklearner
compiling fast_haar_adaboost_binary_model_cascade

but fdtool is not appear in toolbox please help.
thank you

21 Oct 2010 Sebastien Paris

I don't undestand your question. Please run the four demo files...

26 Oct 2010 adam akbar

i got some error when run demo_detector_harr

Error in ==> demo_detector_haar at 33
aa = vcapg2(0,2);

how to solve this?

28 Oct 2010 Sebastien Paris

Do you have a functional webcam installed ?.

28 Oct 2010 adam akbar

yes i have.
the vcapg2.cpp is not compile yet.
can you show me how to compile it??
my matlab wont compile c++ file
or can you give me result from compiling vcapg2 file?

28 Oct 2010 adam akbar

Wow amazing program, finally i can run it...
i have question, how to increase fps??

11 Nov 2010 zhu ?

Hi!
    I want to use demo_detector_haar in matlab 2009a(7.8.0),but it does't work. matlab remind you:
   >> demo_detector_haar
        ??? Undefined function or method 'vcapg2' for input arguments of type 'double'.

        Error in ==> demo_detector_haar at 33
        aa = vcapg2(0,2);

    so I recompile all code,I do like this:
   >> mex -setup
        Please choose your compiler for building external interface (MEX) files:
 
        Would you like mex to locate installed compilers [y]/n? y
 
        Select a compiler:
        [1] Lcc-win32 C 2.4.1 in D:\PROGRA~1\MATLAB\R2009a\sys\lcc
        [2] Microsoft Visual C++ 6.0 in D:\Program Files\Microsoft Visual Studio
 
        [0] None
 
        Compiler: 2
 
        Please verify your choices:
 
        Compiler: Microsoft Visual C++ 6.0
        Location: D:\Program Files\Microsoft Visual Studio
 
        Are these correct [y]/n? y
 
        Trying to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R2009a\mexopts.bat
        From template: D:\PROGRA~1\MATLAB\R2009a\bin\win32\mexopts\msvc60opts.bat
 
        Done . . .
 
**************************************************************************
  Warning: The MATLAB C and Fortran API has changed to support MATLAB
           variables with more than 2^32-1 elements. In the near future
           you will be required to update your code to utilize the new
           API. You can find more information about this at:
           http://www.mathworks.com/support/solutions/data/1-5C27B9.html?solution=1-5C27B9
           Building with the -largeArrayDims option enables the new API.
**************************************************************************
   >> mexme_fdt
        compiling chlbp
        compiling chlbp_adaboost_binary_model_cascade
        compiling chlbp_adaboost_binary_predict_cascade
        compiling chlbp_gentleboost_binary_model_cascade
        compiling chlbp_gentleboost_binary_predict_cascade
        compiling detector_haar
        compiling detector_mblbp
        compiling eval_chlbp
        compiling eval_haar
        compiling eval_haar_subwindow
        compiling eval_mblbp
        compiling haar
        compiling haar_ada_weaklearner
        compiling haar_adaboost_binary_model_cascade
        compiling haar_adaboost_binary_predict_cascade
        compiling haar_featlist
        compiling haar_gentle_weaklearner
        compiling haar_gentleboost_binary_model_cascade
        compiling haar_gentleboost_binary_predict_cascade
        compiling haar_scale
        compiling imresize
        compiling int8tosparse
        compiling mblbp
        compiling mblbp_ada_weaklearner
        compiling mblbp_adaboost_binary_model_cascade
        compiling mblbp_adaboost_binary_predict_cascade
        compiling mblbp_featlist
        compiling mblbp_gentle_weaklearner
        compiling mblbp_gentleboost_binary_model_cascade
        compiling mblbp_gentleboost_binary_predict_cascade
        compiling rgb2gray
        compiling fast_haar_ada_weaklearner
        compiling fast_haar_adaboost_binary_model_cascade
    I find it does not compile vcap2.cpp!why?
    In my PC I have installed DirectShow SDK,and I can find dxtrans.h,what should I do next?

    Please help me,thank you very much!

11 Nov 2010 Sebastien Paris

If your'are not able to recompile vcapg2, please download compiled mex file at : http://www.mathworks.com/matlabcentral/fileexchange/2939-vcapg2

as mentioned in description

19 Nov 2010 zhu ?

thank you ,Sebastien Paris!
I have resolved this problem. when i read the code in "haar_adaboost_binary_model_cascade.c",i the think the best th_opt should be selected like this:
for(i = 0 ; i < N ; i++)
{

ind = index[i];

ytemp = y[ind];

wtemp = w[ind];

Errplus = Splus + (Tminus - Sminus);

Errminus = Sminus + (Tplus - Splus);
printf("Errplus=%g,Errminus=%g\n",Errplus,Errminus);

if(Errplus < Errormin)
{

Errormin = Errplus;
if(i==0)
th_opt = a[i];

else
{

th_opt = (a[i-1] + a[i])/2;

}

a_opt = 1.0;

}

if(Errminus < Errormin)
{

Errormin = Errminus;

if(i==0)
th_opt = a[i];


else
{

th_opt = (a[i-1] + a[i])/2;

}


a_opt = -1.0;

}


if(ytemp == 1)
{

Splus += wtemp;

}
else

{

Sminus += wtemp;

}

19 Nov 2010 Sebastien Paris

I think it does not change really results .... just shit de threshold.

Sébastien

19 Nov 2010 zhu ?

dear Sébastien
i think is different,i have compared them with vc++6.0 and they have different result.

#include "stdafx.h"
void qsindex (double *a, int *index , int lo, int hi)
{

    int i=lo, j=hi , ind;

    double x=a[(lo+hi)/2] , h;

    do
    {
        while (a[i]<x) i++;
        while (a[j]>x) j--;
        if (i<=j)
        {
            h = a[i];
a[i] = a[j];
a[j] = h;
ind = index[i];
index[i] = index[j];
index[j] = ind;
            i++;
j--;
        }
    }
while (i<=j);

    if (lo<j) qsindex(a , index , lo , j);
    if (i<hi) qsindex(a , index , i , hi);
}

/*select best th_opt and a_opt,by Sebastien Paris*/
/*void main(int argc, char* argv[])
{

double a[4]={4,3,2,1};
int index[4]={0,1,2,3};
int y[4]={1,-1,1,1};
int N=4;
int N1;
N1=N-1;
double Tplus=0,Tminus=0;
double Errormin=2;
double w[4]={0.15,0.35,0.25,0.25};
int ind,ytemp;
double wtemp;
////////////////////////////before sort/////////////////////////////
for(int i=0;i<4;i++)
{
printf("a[%d] ",i);

}
printf("\n");
for( i=0;i<4;i++)
printf(" %g ",a[i]);
printf("\n");

for( i=0;i<4;i++)
printf(" %d ",index[i]);
printf("\n");
for( i=0;i<4;i++)
printf(" %d ",y[i]);
printf("\n");
for( i=0;i<4;i++)
printf(" %g ",w[i]);
printf("\n");


int lo=0,hi=N1;
qsindex (a, index , lo, hi);

    ///////////////////////////////after sort

for( i=0;i<4;i++)
{
printf("a[%d] ",i);

}
printf("\n");
for( i=0;i<4;i++)
printf(" %g ",a[i]);
printf("\n");

for( i=0;i<4;i++)
printf(" %d ",index[i]);
printf("\n");
for( i=0;i<4;i++)
printf(" %d ",y[index[i]]);
printf("\n");
for( i=0;i<4;i++)
printf(" %g ",w[index[i]]);
printf("\n");

    for(i = 0 ; i < N ; i++)
{

if(y[i] == 1)
{

Tplus += w[i];

}
else
{

Tminus += w[i];

}
}

printf("Tplus=%g,Tminus=%g\n",Tplus,Tminus);
printf("*********************\n");

    double Splus=0,Sminus=0;
double Errplus,Errminus;
double th_opt,a_opt;
//select best th_opt and a_opt,by Sebastien Paris
for(i = 0 ; i < N ; i++)

{

ind = index[i];

ytemp = y[ind];

wtemp = w[ind];

Errplus = Splus + (Tminus - Sminus);

Errminus = Sminus + (Tplus - Splus);

printf("Errplus=%g,Errminus=%g\n",Errplus,Errminus);

if(Errplus < Errormin)
{

Errormin = Errplus;

if(i<N1)
{

th_opt = (a[i] + a[i+1])/2;

}
else
{

th_opt = a[i];

}

a_opt = 1.0;

}

if(Errminus < Errormin)
{

Errormin = Errminus;

if(i<N1)
{

th_opt = (a[i] + a[i+1])/2;

}
else
{

th_opt = a[i];

}



a_opt = -1.0;

}


if(ytemp == 1)
{

Splus += wtemp;

}
else

{

Sminus += wtemp;

}
printf("when i=%d,a_opt=%g,th_opt=%g,Errormin=%g\n",i,a_opt,th_opt,Errormin);
printf("*********************\n");
}
printf("************finally*********\n");
printf("best a_opt=%g,best th_opt=%g,Errormin=%g\n",a_opt,th_opt,Errormin);
}
*/
/*select best th_opt in my opinion*/
void main(int argc, char* argv[])
{

double a[4]={4,3,2,1};
int index[4]={0,1,2,3};
int y[4]={1,-1,1,1};
int N=4;
int N1;
N1=N-1;
double Tplus=0,Tminus=0;
double Errormin=2;
double w[4]={0.15,0.35,0.25,0.25};
int ind,ytemp;
double wtemp;
///////////////////////////////before sort
printf("before sort:\n");
for(int i=0;i<4;i++)
{
printf("a[%d] ",i);

}
printf("\n");
for( i=0;i<4;i++)
printf(" %g ",a[i]);
printf("\n");

for( i=0;i<4;i++)
printf(" %d ",index[i]);
printf("\n");
for( i=0;i<4;i++)
printf(" %d ",y[i]);
printf("\n");
for( i=0;i<4;i++)
printf(" %g ",w[i]);
printf("\n");

   


int lo=0,hi=3;
qsindex (a, index , lo, hi);
///////////////////////////////after sort
printf("after sort:\n");
for( i=0;i<4;i++)
{
printf("a[%d] ",i);

}
printf("\n");
for( i=0;i<4;i++)
printf(" %g ",a[i]);
printf("\n");

for( i=0;i<4;i++)
printf(" %d ",index[i]);
printf("\n");
for( i=0;i<4;i++)
printf(" %d ",y[index[i]]);
printf("\n");
for( i=0;i<4;i++)
printf(" %g ",w[index[i]]);
printf("\n");

    for(i = 0 ; i < N ; i++)
{

if(y[i] == 1)
{

Tplus += w[i];

}
else
{

Tminus += w[i];

}
}
printf("Tplus=%g,Tminus=%g\n",Tplus,Tminus);
printf("*********************\n");
    double Splus=0,Sminus=0;
double Errplus,Errminus;
double th_opt,a_opt;
//select best th_opt and a_opt,in my opinion

for(i = 0 ; i < N ; i++)
{

ind = index[i];

ytemp = y[ind];

wtemp = w[ind];

Errplus = Splus + (Tminus - Sminus);

Errminus = Sminus + (Tplus - Splus);
printf("Errplus=%g,Errminus=%g\n",Errplus,Errminus);

if(Errplus < Errormin)
{

Errormin = Errplus;
if(i==0)
th_opt = a[i];

else
{

th_opt = (a[i-1] + a[i])/2;

}

a_opt = 1.0;

}

if(Errminus < Errormin)
{

Errormin = Errminus;

if(i==0)
th_opt = a[i];


else
{

th_opt = (a[i-1] + a[i])/2;

}


a_opt = -1.0;

}


if(ytemp == 1)
{

Splus += wtemp;

}
else

{

Sminus += wtemp;

}
printf("when i=%d,a_opt=%g,th_opt=%g,Errormin=%g\n",i,a_opt,th_opt,Errormin);
printf("*********************\n");
}
printf("*********finally********\n");
printf("best a_opt=%g,best th_opt=%g,Errormin=%g\n",a_opt,th_opt,Errormin);

}

20 Nov 2010 Sebastien Paris

Hi,
Of course, you have different results especially with N = 4. You want to define th_opt = (a[i-1] + a[i])/2 and me by th_opt = (a[i] + a[i+1])/2, when N is large (and it's the case usually), it won't change a lot of for the value of th_opt. In your example, of couse, It changed with N = 4. You have 2 choices for defining the interval. You prefered the second choice, but in practice, with N> 1000, it won't change a lot....

20 Nov 2010 zhu ?

dear Sebastien
i can't understand you FastAdaboosting algorithm, because i can't understand "Haar_matG" funciton.
please tell me what your purpose for sparse,and what references you have used.

21 Nov 2010 Sebastien Paris

As referenced in the mex-file :

 Reference : M-T Pham and T-J Cham, "Fast trainning and selection of Haar features using statistics in boosting-based face detection",
 --------- in Proc. 11th IEEE ICCV'07

22 Nov 2010 zhu ?

thank you ,i have download it in ieee

23 Nov 2010 Louis

Hi Sebastien,
I am using the function eval_chlbp which you have in the toolbox but it is giving me memory error saying that i have to close matlab :( ... I understand that you havent used it throughout the demo, but i need it since i am implementing a chlbp detector.

Do you have an updated version of or i am doing something wrong.

Many thanks

23 Nov 2010 Sebastien Paris

Louis : which system you have ? CPU, OS, Compiler ?.
Regards,

23 Nov 2010 Louis

Hi Sebastien,
I have XP, dual core , and visual studio 2010. It does compile well, but when i run it on some models that i generate using chlbp_gentleboost_binary_model_cascade.c, it says "Matlab has encountered internal problem and needs to be closed". I tried to trace the eval_chlbp.c file and "i think" there are some errors there, i am not sure because my knowledge in C is close to none.

eval_chlbp.c is supposed to extract only the models features instead of extracting all the features as in chlbp.c; hence, it should be significantly faster correct?

25 Nov 2010 zhu ?

Hi Sebastien,
Can you tell me what "BLASCALL" mean in fast_haar_adaboost_binary_model_cascade?

25 Nov 2010 Sebastien Paris

BLASCALL is an alias for calling a BLAS function....

26 Nov 2010 zhu ?

Hi Sebastien,
I don not know BLAS fucntions, i can't find it in matlab help documents.

26 Nov 2010 zhu ?

Hi Sebastien
Can you tell me how to calculate th_opt in fast_haar_adaboost_binary_model_cascade.c .Specially, i didn't undetstand the code like this :
alpha = var1c - var2c;

beta = (m1c*var2c - m2c*var1c);

gamma = m2c*m2c*var1c - m1c*m1c*var2c + 2*var1c*var2c*log(ctep*(var2c/var1c));

delta = beta*beta - alpha*gamma;

if(delta < 0)
{

delta = -delta;

}

sqrtdelta = sqrt(delta);

std1c = 1.0/sqrt(var1c); /* 1.0/sqrt(2.0*var1c); */

std2c = 1.0/sqrt(var2c); /* 1.0/sqrt(2.0*var2c); */

if(alpha != 0.0)
{

x1 = (-beta + sqrtdelta)/(alpha);

x2 = (-beta - sqrtdelta)/(alpha);

}
else
{

x1 = -beta/gamma;

x2 = x1;

}

if(m1c > m2c)
{

Err1 = 0.5*(p2*(1.0 - erf((x1 - m2c)*std2c)) + p1*(1.0 + erf((x1 - m1c)*std1c)));

Err2 = 0.5*(p2*(1.0 - erf((x2 - m2c)*std2c)) + p1*(1.0 + erf((x2 - m1c)*std1c)));

}
else
{

Err1 = 0.5*(p1*(1.0 - erf((x1 - m1c)*std1c)) + p2*(1.0 + erf((x1 - m2c)*std2c)));

Err2 = 0.5*(p1*(1.0 - erf((x2 - m1c)*std1c)) + p2*(1.0 + erf((x2 - m2c)*std2c)));

}

if(Err1 < Err2)

{
if(Err1 < Errormin)
{

Errormin = Err1;

featuresIdx_opt = f;

th_opt = x1;

a_opt = -1.0;

}

}
else
{
if(Err2 < Errormin)
{

Errormin = Err2;

featuresIdx_opt = f;

th_opt = x2;

a_opt = 1.0;
}

}

}

26 Nov 2010 Sebastien Paris

Please read the referenced paper ....

26 Nov 2010 zhu ?

Hi Sebastien
i think i find a bug:
if(alpha != 0.0)
{

x1 = (-beta + sqrtdelta)/(alpha);

x2 = (-beta - sqrtdelta)/(alpha);

}
else
{

x1 = -beta/gamma;

x2 = x1;

}
i think when alpha=0, x1=x2=-gamma/(2*beta) !

26 Nov 2010 zhu ?

Hi Sebastien
i think i find a bug:
if(alpha != 0.0)
{

x1 = (-beta + sqrtdelta)/(alpha);

x2 = (-beta - sqrtdelta)/(alpha);

}
else
{

x1 = -beta/gamma;

x2 = x1;

}
i think when alpha=0, x1=x2=-gamma/(2*beta) !

26 Nov 2010 Sebastien Paris

Hi,

In "Digital Image Processing", Rafael C. Gonzalez, P 622-623 see equations. Actually my implementation seems right.

p1 = 0.5;
p2 = 0.5;

m1 = -3 ;
m2 = 1;

s1 = (1.2)^2;
s2 = (1.4)^2;
    cte = p1/p2;
    alpha = s1 - s2;
    beta = 2*(m1.*s2 - m2.*s1);
    %beta = (m1.*s2 - m2.*s1);
    
    gamma = (m2*m2).*s1 - (m1*m1).*s2 + 2*s1*2*s2.*log(cte.*sqrt(s2/s1));% 2*s1*2*s2.*log(cte.*sqrt(s2/s1)) = 2*s1*s2.*log(cte.*(s2/s1))
    
    delta = beta.*beta - 4*alpha.*gamma;

% delta = beta.*beta - alpha.*gamma;
    

    if(delta < 0)

        delta = -delta;

    end

    if(alpha ~= 0)

        x1 = (-beta + sqrt(delta))./(2*alpha);
        x2 = (-beta - sqrt(delta))./(2*alpha);
%
% x1 = (-beta + sqrt(delta))./(alpha);
% x2 = (-beta - sqrt(delta))./(alpha);

    else

        x1 = -gamma/beta;
        T = (m1 + m2)/2 + (sqrt(s1)/(m1 - m2))*log(cte);
        x2 = x1;

    end

26 Nov 2010 zhu ?

hi
i think x1 = -gamma/beta is right,but in you code you write
 x1 = -beta/gamma,so i think it may be a bug.

27 Nov 2010 zhu ?

hi
i can 't understand the way to calculate erf,can you tell me you method ? 3q

27 Nov 2010 Sebastien Paris

Hi,

It's right, is a bug... However, in pratice the case where alpha = 0, never occurs.... Thanks you for reporting.

27 Nov 2010 zhu ?

i still can't understand you method for calculating erf,can you tell me how to resolve ?

27 Nov 2010 zhu ?

I confused on the way to select min error, i think it may be selected like this:
alpha = var1c - var2c;

beta = (m1c*var2c - m2c*var1c);

gamma = m2c*m2c*var1c - m1c*m1c*var2c + 2*var1c*var2c*log(ctep*(var2c/var1c));

            std1c = 1.0/sqrt(var1c);
            if(alpha==0)
            {
                x1=-gamma/(2*beta);
                x2=x1;
                std2c = std1c;
            }
            else
            {
                std2c = 1.0/sqrt(var2c);
                delta = beta*beta - alpha*gamma;
                if(delta==0)
                {
                    x1=(m1c+m2c)/2;
                    x2=x1;
                }
                else
                {
                    delta=abs(delta);
                    sqrtdelta = sqrt(delta);
                    x1 = (-beta + sqrtdelta)/(alpha);
x2 = (-beta - sqrtdelta)/(alpha);
                }
            }
            
            
           if(m1c>m2c)
           {
                if(x1=x2)
                {
                    err11= 0.5*(p2*(1.0 - erf((x1 - m2c)*std2c)) + p1*(1.0 + erf((x1 - m1c)*std1c)));
                    err10=err11;
                    Err1=err11;
                    Err2=Err1;
                    opt1=1;
                    opt2=opt1;
                    temp_th=x1;
                    opt=opt1;
                    tempmin=Err1;
                    
                }
                else
                {
                    err11= 0.5*(p2*(1.0 - erf((x1 - m2c)*std2c)) + p1*(1.0 + erf((x1 - m1c)*std1c)));
                    err10=err11;
                    Err1=err11;
                    opt1=1;
                    err21= 0.5*(p2*(1.0 - erf((x2 - m2c)*std2c)) + p1*(1.0 + erf((x2 - m1c)*std1c)));
                    err20= 0.5*(p2*(1.0 + erf((x2 - m2c)*std2c)) + p1*(1.0 - erf((x2 - m1c)*std1c)));
                    if(err21<err20)
                    {
                    Err2=err21;
                    opt2=1;
                    }
                    else
                    {
                    Err2=err20;
                    opt2=-1;
                    }
                    if(Err1<Err2)
                    {
                    tempmin=Err1;
                    opt=opt1;
                    temp_th=x1;
                    }
                    else
                    {
                    tempmin=Err2;
                    opt=opt2;
                    temp_th=x2;
                    }
                }
           }
           else
           {
                if(x1=x2)
                {
                    err20= 0.5*(p2*(1.0 + erf((x2 - m2c)*std2c)) + p1*(1.0 - erf((x2 - m1c)*std1c)));
                    err21=err20;
                    Err2=err20;
                    Err1=Err2;
                    opt2=-1;
                    opt1=opt2;
                    temp_th=x2;
                    opt=opt2;
                    tempmin=Err2;
                    
                }
                else
                {
                    err20= 0.5*(p2*(1.0 + erf((x2 - m2c)*std2c)) + p1*(1.0 - erf((x2 - m1c)*std1c)));
                    err21=err20;
                    Err2=err20;
                    opt2=-1;
                    err10= 0.5*(p2*(1.0 + erf((x1 - m2c)*std2c)) + p1*(1.0 - erf((x1 - m1c)*std1c)));
                    err11= 0.5*(p2*(1.0 - erf((x1 - m2c)*std2c)) + p1*(1.0 + erf((x1 - m1c)*std1c)));
                    if(err11<err10)
                    {
                    Err1=err11;
                    opt1=1;
                    }
                    else
                    {
                    Err1=err10;
                    opt1=-1;
                    }
                    if(Err1<Err2)
                    {
                    tempmin=Err1;
                    opt=opt1;
                    temp_th=x1;
                    }
                    else
                    {
                    tempmin=Err2;
                    opt=opt2;
                    temp_th=x2;
                    }
                }
           }
            
            
            if(tempmin<Errormin)
            {
                Errormin=tempmin;
                featuresIdx_opt = f;
th_opt = temp_th;
a_opt = opt;
            }

27 Nov 2010 Sebastien Paris

Feel free to modify the code, it's an open and simple for that. However, I will say for you last remark, that the weaklearners selected by the fast algorithm and the classic gentleboost are almost the same (see HTML documentation)

28 Nov 2010 Mariam Z

while tryin the demo_mblbp, i found the error' Undefined function or method 'mblbp_featlist' for input arguments of type 'double'...can u please help me wid it?

28 Nov 2010 Sebastien Paris

Please compile mex files for your system (and more generaly, read full instruction in readme.txt)

run "mexme_fdt.m" after be sure that "mex -setup" had been done before.

30 Nov 2010 Tsai zhenhua

Sebastien Paris , wud pls upload the realadaboost code for training ? In this way, ur code will be more pupular

05 Dec 2010 zhu ?

Hi Sebastien,
    Which face databse you have used in your code? I found you use Viola_24×24.mat and Jensen_24×24.mat,but can you tell me they are come from which face database.

06 Dec 2010 zhu ?

Hi, I confused on coventional cascade structure and multi-exit cascade structure. I need your kind to help me, I think they different like these:

Suppose that there are 10 Weaklearns: ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩

coventional cascade structure maybe like this:
layer-1 ①
layer-2 ② ③
layer-3 ④ ⑤ ⑥
layer-4 ⑦ ⑧ ⑨ ⑩

multi-exit cascade structure maybe like this:
layer-1 ①
layer-2 ① ② ③
layer-3 ① ② ③ ④ ⑤ ⑥
layer-4 ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩

This is my idea,can you agree with me ?

20 Dec 2010 Tsai zhenhua

in function haar_adaboost_binary_model_cascade(x,y),why do u do permutation? what is the difference without it?

21 Dec 2010 Sebastien Paris

If I can remember well, there was some numerical discrepencies without if a long serie of the same class occurs....

12 Feb 2011 shri

hi am newbie please explain what feature_list func does? thanking you

22 Feb 2011 Daniel

Hi to everybody. Could anybody tell me which are the best input arguments for 'detector_haar' function to detect faces from a video source like this: 'vid = videoinput('winvideo', 1, 'RGB24_1280x960');'

I'm using demo_detector_haar and I don't know what's the best 'haar.model', 'cascade', 'min_detect', etc...

How can I know it? Have I do my own haar.model? how?

thank you very much for your work.

23 Feb 2011 Sebastien Paris

Daniel,

A new major update is coming with better cascade training algorithms and plenty of other stuff.
However the actual parameter of demo_detector_haar should work for 1280x960 also

23 Feb 2011 Daniel

Thank you very much for your quick answer Sebastien. Do you know aproximately when are you going to upload the new version?

Thank you, I'm very pleased to use your software.

23 Feb 2011 Sebastien Paris

Daniel,

Whithin few days. I am finishing all the test and debugging.

07 Apr 2011 zhu ?

nice work!!

12 Apr 2011 Jingsong Xu

excellent work.

I meet one problem.
When I use chlbp.c, here is the samples in chlbp.c

clear, close all
load viola_24x24
Ny = 24;
Nx = 24;
options.N = [8 , 4 , 12];
options.R = [1 , 1 , 2];
options.map = zeros(2^max(options.N) , length(options.N));

mapping = getmapping(options.N(1),'u2');
options.map(1:2^options.N(1) , 1) = mapping.table';
options.map(1:2^options.N(2) , 2) = (0:2^options.N(2)-1)';
mapping = getmapping(options.N(3),'u2');
options.map(1:2^options.N(3) , 3) = mapping.table';
options.shiftbox = cat(3 , [Ny , Nx ; 1 , 1] , [16 , 16 ; 4 , 4] , [Ny , Nx ; 1 , 1]);

options.T = 50;

H = chlbp(X , options);

after this I type

 H2 = chlbp(X(:,:,2) , options);

and i find H2 is different H(:,:,2)?why?

13 Apr 2011 Sebastien Paris

Jingsong,

Thx for reporting, fixed in the next update.

20 Apr 2011 Van

Hi Paris,
Your code is very great. I learn a lot from your code. Regard to training haar detector, as I understood, before running train_cascade, we have to have 2 matrix: jensen_24x24 and viola_24x24 for detecting face. However, in my project, I intend to detect user's eyes, not the face. Could you please give me a hint how to create the matrix for training Haar detector? For more detail, I don't know how to create Xpos matrix for detecting eye:
----------------------
load viola_24x24
Xpos = X(: , : , find(y == 1));
load jensen_24x24
Xpos = cat(3 , Xpos , X(: , : , find(y == 1)));

...

[options , model] = train_cascade(Xpos , options);

-------
Thank you for your hard working :)

20 Apr 2011 Sebastien Paris

Van: You will need a such database for training your positives examples... I am sure they are a lot of such databases in the web. When you'll have, you maybe need to downscale each images to something close to 24x24 pixels

Sebastien

20 Apr 2011 Van

Hi Sebastien,
Thank you for your quick response. As I understand, these 2 files, viola_24x24, and jesen_24x24, are face databse in gray scale. Matrix x is face image, and y is idicator whether or not it's a posotive or negative. Am I right?
For increasing efficient of detection, I'd read some papers, one of them is:
Joint Haar-like Features for Face Detection
URL: dtpapers.googlecode.com/files/01544911.pdf
The paper above is introduce some extend Haar-like feature to improve efficience of detection. So, I wonder where you define Haar-like feature, and how you define them.

Thank you,

Van Quach

21 Apr 2011 Van  
21 Apr 2011 Sebastien Paris

Van: Yes for me these 2 files merged are my positives (there are some negatives also inside but I don't use them really)

I didn't know this paper. The idea is good to use "meta" haar features, but if I understand correctly you'll have much more features. Actually you have to modify mode code to create such features. I don't think it's really hard but should be very memory requiering

02 May 2011 Chirath Dharshana

Hi Sebastian,
For our project we need to use the face detection tool.
When we tried to compile mex files, following errors occured.

Error linear.cpp: .\tron.h: 4 syntax error; found `function' expecting `;'
Error linear.cpp: .\tron.h: 5 syntax error; found `{' expecting `;'
Error linear.cpp: .\tron.h: 5 skipping `{'
Error linear.cpp: .\tron.h: 6 syntax error; found `:' expecting `;'
Error linear.cpp: .\tron.h: 6 skipping `:'
Error linear.cpp: .\tron.h: 7 syntax error; found `double' expecting `;'
Error linear.cpp: .\tron.h: 7 illegal initialization for `fun'
Error linear.cpp: .\tron.h: 7 syntax error; found `0' expecting `;'
Error linear.cpp: .\tron.h: 7 unrecognized declaration
Warning linear.cpp: .\tron.h: 7 empty declaration
Error linear.cpp: .\tron.h: 8 syntax error; found `void' expecting `;'
Error linear.cpp: .\tron.h: 8 illegal initialization for `grad'
Error linear.cpp: .\tron.h: 8 syntax error; found `0' expecting `;'
Error linear.cpp: .\tron.h: 8 unrecognized declaration
Warning linear.cpp: .\tron.h: 8 empty declaration
Error linear.cpp: .\tron.h: 9 syntax error; found `void' expecting `;'
Error linear.cpp: .\tron.h: 9 illegal initialization for `Hv'
Error linear.cpp: .\tron.h: 9 syntax error; found `0' expecting `;'
Error linear.cpp: .\tron.h: 9 unrecognized declaration
Warning linear.cpp: .\tron.h: 9 empty declaration
Error linear.cpp: .\tron.h: 11 syntax error; found `int' expecting `;'
Error linear.cpp: .\tron.h: 11 illegal initialization for `get_nr_variable'
Error linear.cpp: .\tron.h: 11 syntax error; found `0' expecting `;'
Error linear.cpp: .\tron.h: 11 too many errors
 
  C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Compile of 'linear.cpp' failed.
 
Failed to compile mex-files, unzip precompiled mex32

-----------------------------------

Please help us.
Thank you in advance.

02 May 2011 Sebastien Paris

Chirath : what is your system ? Matlab version and compiler ?. I think you must use included LCC compiler. Please use the free msvc compiler instead.

04 May 2011 Raida

Dear

My OS is Windows 7 (6 bits)
I am using R2009b version

I run setup_fdt and I got a series of warnings followed by the following error

Compile mex files ...
compiling chlbp
cannot open output file chlbp.mexw32:
 
  C:\PROGRA~2\MATLAB\R2009B\BIN\MEX.PL: Error: Link of 'chlbp.mexw32' failed.
 
Failed to compile mex-files, unzip precompiled mex32

Then I run mexme_fdt and I got the following:

compiling chlbp
cannot open output file chlbp.mexw32:
 
  C:\PROGRA~2\MATLAB\R2009B\BIN\MEX.PL: Error: Link of 'chlbp.mexw32' failed.
 
??? Error using ==> mex at 221
Unable to complete successfully.

Error in ==> mexme_fdt at 146
    eval(['mex ' str])
 
Can you please help me in installing and using the toolbox

Regards

04 May 2011 Sebastien Paris

Raida : please install the free msvc express compiler (you should try to find the 2005 express since your are using 2009b). Then type mex -setup in matlab command.
Run setup_fdt after

04 May 2011 Steve  
08 May 2011 Nitin Kumar  
17 Jun 2011 Javier Rivera

Hi there! I was wondering what kind of webcam I can use with this toolbox. I have a webcam that is accessed from an address (i.e. 111.222.333.444), and I want to know if it is possible to use this code with it, or just USB webcams. Also, how many faces can it detect from a single camera?

23 Jun 2011 Sebastien Paris

Never tried with an IP-camera. If you know how to get a frame, there should not have any problem. All USB webcam should work too. For the last question, no limitation is imposed.

10 Jul 2011 Tsai zhenhua

don't konw why, always appears C:\Users\Tsai\AppData\Local\Temp\mex_wzxP6o\chlbp.obj "D:\Program Files\MATLAB\R2008a\extern\lib\win32\microsoft\libmwblas.lib"
LINK : fatal error LNK1104: cannot open file "chlbp.mexw32"

11 Jul 2011 Tsai zhenhua

problem solved~ i still donno why. i just put the fold to the root DIR, and it works ok~ And Mr Paris, if i train the face detecter using adaboost for a few weeks, and due to some reasons(like the electricity is cut off), what I can do to continue the boosting progress using ur program

19 Jul 2011 Sebastien Paris

Tsai ... Unfortunetly no. But I don't think training will talk weeks ... especially with the multi-core support.

26 Aug 2011 TSE

Dear Paris,I was working with your code and try to improve the function of lbp_feature, but I cant make it work it seems that you implemented some protection of your code,if so could you tell me how to remove them?

26 Aug 2011 Sebastien Paris

Some protections ? what do u mean ?. This code is open, no special protection. which function are u using ?

Sebastien

13 Sep 2011 Mr Smart  
13 Oct 2011 guofeng ma

Please help it.
I become the error when I run the next source code, and Matlab is over.

load viola_24x24
  load haar_dico_2

  [Ny , Nx , P] = size(X);
  II = image_integral_standard(X);
  y = int8(y);
  options.G = haar_matG(Ny , Nx , rect_param);
  options.indexF = int32(0:size(options.G , 2)-1);
  options.fine_threshold = 1;
  w = (1/length(y))*ones(1 , length(y));

  tic,[model , wnew] = fast_haar_ada_weaklearner(II , y , w , options);,toc

I think that it is the issue of fast_haar_ada_weaklearner no.

YmPC information
windows 7 64
Matlab R2011b Compiler:Microsoft Visual C++ 2010 Express in C:Program Files (x86) \Microsoft Visual Studio 10.0

13 Oct 2011 guofeng ma  
13 Oct 2011 Sebastien Paris

ma,

For win32 system, your example is working. I have to check for win64. Thanks for reporting.
N.B. The version 0.3 is upcoming.

13 Oct 2011 guofeng ma

Thank you for an answer.
I do not have any problem in myNootBook windowsVista 32. However, I cannot run it in myDeskPC windows7 64.and Compiling it does not have any problem in windows7 64.

27 Oct 2011 guofeng ma

Please help it.
I run the "train_cascade.m Example 1" source code(options.usefa=1 and options.algoboost=0or1,2),but,Xfa is all face images(generate_data_cascade.m). is this right?

27 Oct 2011 guofeng ma

i want train a face detector using new data set(haar feature,adaboost and gentleboost,conventional cascade),but do give a demo?
my email mgf9788@hotmail.com

28 Oct 2011 Sebastien Paris

Guofeng,

I just uploaded the version v0.22 with more examples especially how to use train_cascade.m. This update will appear in a couple of hours.

28 Oct 2011 guofeng ma

Dear Paris
By the way, if there is a detailed demon about the ROC drawing. I will be a great help.

17 Nov 2011 Claude Rico

I am a final year student and hope to graduate if i finish my thesis project... can anyone help me how to make a real time face recognition with a displayed information in an extracted face... thanks and God bless!

11 Jan 2012 kgan

I followed the earlier instructions however i keep on having the same error

Unzipping negatives picts ...
Compile mex files ...
compiling chlbp
compiling chlbp_adaboost_binary_train_cascade
compiling chlbp_adaboost_binary_predict_cascade
compiling chlbp_gentleboost_binary_train_cascade
compiling chlbp_gentleboost_binary_predict_cascade
compiling detector_haar
compiling detector_mblbp
compiling eval_chlbp
compiling eval_haar
compiling eval_haar_subwindow
compiling eval_mblbp
compiling eval_mblbp_subwindows
compiling haar
compiling haar_ada_weaklearner
compiling haar_adaboost_binary_train_cascade
compiling haar_adaboost_binary_predict_cascade
compiling haar_featlist
compiling haar_gentle_weaklearner
compiling haar_gentleboost_binary_train_cascade
compiling haar_gentleboost_binary_predict_cascade
compiling haar_scale
compiling imresize
compiling area
compiling homkermap
compiling homkertable
compiling eval_hmblbp_spyr_subwindow
compiling detector_mlhmslbp_spyr
compiling mblbp
compiling mblbp_ada_weaklearner
compiling mblbp_adaboost_binary_train_cascade
compiling mblbp_adaboost_binary_predict_cascade
compiling mblbp_featlist
compiling mblbp_gentle_weaklearner
compiling mblbp_gentleboost_binary_train_cascade
compiling mblbp_gentleboost_binary_predict_cascade
compiling rgb2gray
compiling fast_rotate
compiling haar_ada_weaklearner_memory
compiling haar_adaboost_binary_predict_cascade_memory
compiling haar_adaboost_binary_train_cascade_memory
compiling haar_gentle_weaklearner_memory
compiling haar_gentleboost_binary_predict_cascade_memory
compiling haar_gentleboost_binary_train_cascade_memory
compiling int8tosparse
compiling fast_haar_ada_weaklearner
compiling fast_haar_adaboost_binary_train_cascade
compiling train_dense
Error linear.cpp: .\tron.h: 4 syntax error; found `function' expecting `;'
Error linear.cpp: .\tron.h: 5 syntax error; found `{' expecting `;'
Error linear.cpp: .\tron.h: 5 skipping `{'
Error linear.cpp: .\tron.h: 6 syntax error; found `:' expecting `;'
Error linear.cpp: .\tron.h: 6 skipping `:'
Error linear.cpp: .\tron.h: 7 syntax error; found `double' expecting `;'
Error linear.cpp: .\tron.h: 7 illegal initialization for `fun'
Error linear.cpp: .\tron.h: 7 syntax error; found `0' expecting `;'
Error linear.cpp: .\tron.h: 7 unrecognized declaration
Warning linear.cpp: .\tron.h: 7 empty declaration
Error linear.cpp: .\tron.h: 8 syntax error; found `void' expecting `;'
Error linear.cpp: .\tron.h: 8 illegal initialization for `grad'
Error linear.cpp: .\tron.h: 8 syntax error; found `0' expecting `;'
Error linear.cpp: .\tron.h: 8 unrecognized declaration
Warning linear.cpp: .\tron.h: 8 empty declaration
Error linear.cpp: .\tron.h: 9 syntax error; found `void' expecting `;'
Error linear.cpp: .\tron.h: 9 illegal initialization for `Hv'
Error linear.cpp: .\tron.h: 9 syntax error; found `0' expecting `;'
Error linear.cpp: .\tron.h: 9 unrecognized declaration
Warning linear.cpp: .\tron.h: 9 empty declaration
Error linear.cpp: .\tron.h: 11 syntax error; found `int' expecting `;'
Error linear.cpp: .\tron.h: 11 illegal initialization for `get_nr_variable'
Error linear.cpp: .\tron.h: 11 syntax error; found `0' expecting `;'
Error linear.cpp: .\tron.h: 11 too many errors
 
  C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Compile of 'linear.cpp' failed.
 
Failed to compile mex-files, unzip precompiled mex32

i am using matlab 2010b and LCC compiler for windows

12 Jan 2012 Sebastien Paris

Hello,

As written in the description :
"For Windows system, default LCC compiler included in matlab can't compile all files, you should have some errors during installation.
".
Please choose a modern compiler, MSVC express for example which is free

Please login to add a comment or rating.
Updates
18 May 2009

- v 0.1 bis : correct some typos and minor changes ...

19 Jun 2009

V 0.1c
-Should compile on non C99 compiler
-Add demo_detector_haar
-Minor changes

09 Oct 2009

-Minor Update for Linux compilation

11 Nov 2009

- Remove some Crashes
- Correct bugs with LCC and prior version of Matlab (add uselcc options in mexme_fdt)

12 Nov 2009

- Correct some crashes
- Improve number of plateform supported (LCC, Win64, etc ...)

20 Nov 2010

-fixed smal bugs, compatible with Linux64 and include a modified version of vcapg2 compatible with win64. Thanks Pr Fehn for his help

22 Nov 2010

-A full win32/win64 working version of vcapg2. Thanks again to Pr Fehn.

04 Apr 2011

-v0.2 Major Update. see readme.txt for full changes
             

16 Apr 2011

Minor update (0.21):
- Add missing negatives.zip
- Add dense version of Liblinear
- Fix chlbp.c

27 Oct 2011

-v0.22. Minor update. Please open readme.txt for details.

09 Nov 2011

- Update spyr option for HMSLBP approach. Now weights of each subwindows can be tune by users.
- Add online help

09 Nov 2011

- Update spyr option for HMSLBP approach. Now weights of each subwindows can be tune by users.
- Add online help

17 Nov 2011

- Correct bugs in eval_hmblbp_spyr_subwindow.c
- Minor comestic changes
- Update readme.txt

Tag Activity for this File
Tag Applied By Date/Time
faces detection Sebastien Paris 12 May 2009 15:17:45
boosting Sebastien Paris 12 May 2009 15:17:45
haar Sebastien Paris 12 May 2009 15:17:45
lbp Sebastien Paris 12 May 2009 15:17:45
images processing Sebastien Paris 12 May 2009 15:17:45
statistics Sebastien Paris 12 May 2009 15:17:45
faces detection ely Har 03 Sep 2009 04:43:57
faces detection stephy 01 Nov 2009 01:53:14
faces detection kuoping 29 Jun 2010 07:00:26
boosting adam akbar 20 Oct 2010 22:06:51
boosting zhu ? 20 Nov 2010 03:06:34
faces detection zhu ? 20 Nov 2010 03:06:37
dear sebastien Tsai zhenhua 30 Nov 2010 02:23:08
itll be more helpful to all users Tsai zhenhua 30 Nov 2010 02:23:08
itll be more helpful to all users zhu ? 06 Dec 2010 09:09:29
lbp Fred Sigworth 07 Dec 2010 09:54:39
dear sebastien zhu ? 05 Jan 2011 06:11:48

Contact us at files@mathworks.com