How to build OpenCV with TBB support?
I want to use OpenCV with multi-threading enabled, how can I achieve this?
I want to use OpenCV with multi-threading enabled, how can I achieve this?
First of all, you need to have TBB installed. You can get it at http://threadingbuildingblocks.org/.
When you build OpenCV with cmake, include the option WITH_TBB=ON. Example:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_PYTHON_SUPPORT=ON ..
If I build with tbb, does it mean that openCV will automatically use multiple cores on its functions? Or is there any further procedure?
On OS X, if you don't want to build TBB brew install tbb
also works fine
You may also CMake GUI. Just check the box of WITH_TBB.
You can download CMake from the link below.
Add option WITH_TBB=ON when building opencv.
Asked: 2012-06-09 02:47:37 -0600
Seen: 31,587 times
Last updated: Jan 19 '14
How to speed up this code implemented OpenCV
Traincascade with MultiThreading (TBB) -- Opencv-2.4.5
OpenCV + TBB + Aruco not running in MultiProcessor box
TBB parallel_for vs std::thread
How to decrease the number of processed frames from a live video camera?
What is the most effective way to access cv::Mat elements in a loop?
Performance evaluation for detection