Does OpenCV have any multi threading under the hood?

asked 2017-07-03 12:07:22 -0500

cgrif gravatar image

I'm looking to use the random forests algorithm in OpenCV, and I'm wondering about whether the predict method optimizes using multiple threads, or if it's single threaded.

A broader question: Is there any multithreading in OpenCV?

Many thanks!

edit retag flag offensive close merge delete

Comments

2

Thank you for that pointer. I will assume that since I did not see predict() in that search that the answer to the first question is No while the answer to the second question is Yes.

cgrif gravatar imagecgrif ( 2017-07-03 14:27:56 -0500 )edit

imho, you hit it exactly.

berak gravatar imageberak ( 2017-07-03 14:35:12 -0500 )edit

By the way, why doesn't opencv use multithreading by default? Is it being planned to introduce such a functionality? New C++11 and above has native support for threads, so no 3rd party libraries are needed anymore.

KjMag gravatar imageKjMag ( 2017-07-04 06:54:02 -0500 )edit