1

Recently I wrote my own modified version (single threaded CPU's code) of Cascade Classifier which uses OpenCV's XML file.

I want to compare my bare VJ algorithm with OpenCV's. So I disabled OpenCL and when I run OpenCV's one it takes 19-23ms to process whole image, while my code takes 39-49ms which is 2 times slower.

I suspect it's because I have 2 cores in my CPU and they used parallel for loops to increase efficiency. Am I right?

If wrong how much impact do parallel loops in OpenCV's code have in overall performance?

Darren Shewry
  • 10,179
  • 4
  • 50
  • 46
BilguunCH
  • 51
  • 3
  • 1
    Check [source code](https://github.com/opencv/opencv/blob/master/modules/objdetect/src/cascadedetect.cpp) and find out. Yes, they use parallel for. – Miki Nov 03 '16 at 15:21
  • I've checked it and that's why I mentioned parallel loops. But what I wanna know is how much effect do those loops have. Does dividing program into 2 cores mean 2 times faster process? – BilguunCH Nov 03 '16 at 23:08

0 Answers0