Ask Your Question
1

detectMultiScale speed

asked Dec 18 '15

crynsane gravatar image

Hello,
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.

Preview: (hide)

Comments

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

thdrksdfthmn gravatar imagethdrksdfthmn (Dec 18 '15)edit

the results are exactly the same, except for the speed

crynsane gravatar imagecrynsane (Dec 19 '15)edit

1 answer

Sort by » oldest newest most voted
2

answered Feb 1 '16

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.

Preview: (hide)

Comments

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 (Feb 2 '16)edit

Question Tools

1 follower

Stats

Asked: Dec 18 '15

Seen: 779 times

Last updated: Feb 01 '16