Ask Your Question

detectMultiScale speed

asked 2015-12-18 07:22:23 -0500

crynsane gravatar image

I've recently upgraded to OpenCV 3.0 and found out, that (atleast in my case) the detectMultiScale overload that takes reject_levels and level_weights parameters is twice as fast as the other two (the one taking the num_detections vector and the default one). I've tested this many times on a large enough sample of images. Has it happened to any of you?
I've looked through the source code and it seems that the only difference it comes to is in CascadeClassifierInvoker and doesn't look like it should alter the speed in such a way it does.

edit retag flag offensive close merge delete


Have you the same number of detections as in the case of the other 2 versions?

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-12-18 08:03:28 -0500 )edit

the results are exactly the same, except for the speed

crynsane gravatar imagecrynsane ( 2015-12-19 10:57:42 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-02-01 05:36:29 -0500

crynsane gravatar image

I've probably found the reason behind this. The two versions with lower speed are using GPU, while the fast version is using CPU. The computer I'm using has an Intel HD graphic card so this is probably the explanation. I've declared the variables as cv::Mat and not cv::UMat and consequently wasn't expecting such behavior and it still sort of baffles me.

edit flag offensive delete link more


Hmm keep in mind that lately there have been reports of the overload function doing very strange things and not producing decent output. There is a bug report existing on this on github!

StevenPuttemans gravatar imageStevenPuttemans ( 2016-02-02 06:46:26 -0500 )edit

Question Tools

1 follower


Asked: 2015-12-18 07:22:23 -0500

Seen: 537 times

Last updated: Feb 01 '16