How can I see inside cvHaarDetectObjects() in openCV?

2.3k views Asked by At

I am trying to optimize the Viola-Jones code written in pure C code since it takes longer to detect faces than the code using the openCV function.

I want to see how cvHaarDetectObjects function actually work but I can't find how.

Can anybody help me out here please?

2

There are 2 answers

1
cyriel On BEST ANSWER
0
DevGoldm On
  1. Go here to download the source code so you can see how it was written. Make sure it is the same version as the one you are running
  2. Run the .exe file you just downloaded and specify a place to unpack the OpenCV library. It unpacks more than just the library itself; it includes plenty of helpful samples and documentation among other things
  3. Go to wherever you unpacked it and go to \modules\objdetect\src\haar.cpp and open it in whatever editor you want
  4. Press ctrl+F or whatever you need to do to search for text and look for cvHaarDetectObjects
  5. Absorb knowledge