How to build OpenCV with TBB support?
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.
Asked: 2012-06-09 02:47:37 -0600
Seen: 30,732 times
Last updated: Jan 19 '14