filter2d runs in single thread? [closed]

asked 2019-12-03 02:52:13 -0500

luoyu510183 gravatar image

To my knowledge, filter2d can run a lot faster under parallel computation. But all I can see is that OpenCV only occupied one thread with a low CPU usage. Do I need to set some compiler flags to use multiprocessors? BTW, I've already set WITH_OPENMP.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by luoyu510183
close date 2019-12-04 00:51:32.710264


BTW, I've already set WITH_OPENMP.

where and when did you do that ? os ? opencv version ? build from src ?

berak gravatar imageberak ( 2019-12-03 04:43:30 -0500 )edit

build from src with CMake. I wrote a myfilter2d with OpenMP to test the execution speed. I'm quite sure that filter2d must run in multi-thread´╝îbecause filter2d is faster than my OpenMP-myfilter2d. Just observing by the win10's Task manager, it shows that my OpenCV program only occupied a little CPU percentage. So I thought filter2d didn't run in multi-thread which is not correct.

luoyu510183 gravatar imageluoyu510183 ( 2019-12-03 05:09:07 -0500 )edit