1 | initial version |
After some researches I have finally found that the main difference that produces speed down in 320 version of CascadeClassifier::detectMultiscale(...) compare to 310 version. It is because, if your code works with cv::Mat, as mine did, then in new version all evaluations goes to CPU, wherease in previous version evaluations goes to GPU. To prove that I have made this sketches:
Opencv310 detectMultiscale on cv::Mat
Opencv320 detectMultiscale on cv::Mat
Let's change cv::Mat to cv::UMat.
Opencv320 detectMultiscale on cv::UMat
So, as you can see in all three builds Opencl was enabled, but if the old version of the API makes convertion to UMat internally (in detectMultiscale), the new one does not make it, therefore now you should do it manually.
2 | No.2 Revision |
After some researches I have finally found that the main difference that produces speed down in 320 version of CascadeClassifier::detectMultiscale(...) compare to 310 version. It is because, if your code works with cv::Mat, as mine did, then in new version all evaluations goes to CPU, wherease in previous version evaluations goes to GPU. To prove that I have made this sketches:
Opencv310 detectMultiscale on cv::Mat
Opencv320 detectMultiscale on cv::Mat
Let's change cv::Mat to cv::UMat.
Opencv320 detectMultiscale on cv::UMat
So, as you can see in all three builds Opencl was enabled, but if the old version of the API makes convertion to UMat internally (in detectMultiscale), the new one does not make it, therefore now you should do it manually.