Face detection using Viola Jones in openCV

1.8k views Asked by At

I am now comparing the time performance of Viola-Jones code between the one that is written in pure C code and one that uses openCV function cvHaarDetectObjects().

So far, it seems that the time it takes to detect faces with pure C code is about three times of that of using the openCV function. Even though the pure C code version uses the simplified algorithm.

Can anyone give me a hint on this please?

1

There are 1 answers

0
cyriel On BEST ANSWER

Use some profiler to compare both implementations speed and see in which part there is the biggest difference. Very Sleepy is my favorite one, but of course it's not the only one - What's the best free C++ profiler for Windows?
Probably OpenCV implementation is much faster, because it uses(in most of operations - not only in Viola-Jones algorithm, but in basic operations too) parallelization, processor extensions like MMX, SSE(different versions) and optimizations tricks(which often are quite weird - http://www.beyond3d.com/content/articles/8).