5

I am doing android "face-detection" application using OpenCV. For this I have downloaded the OpenCV-2.4.5-android-sdk and used the "face-detection" sample. The application is working good but the video streaming is too slow. So I want to speed up the application using TBB build.

I found that "Enabled multi-threading support with TBB" from

http://code.opencv.org/projects/opencv/wiki/Android_Release_Notes#240

and also "The good news is that Intel TBB had been build for Android and tested with some OpenCV samples" from the following link.

http://code.opencv.org/projects/opencv/wiki/Android_Release_Notes#231-beta1

But I don't know how to build the TBB with "face-detection" sample. Can someone give me the steps to build TBB with the android OpenCV sample?


Updated:

Finally I found that "OpenCV-2.4.5-android-sdk" basically comes with TBB.

(i.e)libtbb.a available in "\OpenCV-2.4.5-android-sdk\sdk\native\3rdparty\libs\armeabi-v7a" folder

and tbb-("OPENCV_3RDPARTY_COMPONENTS:=tbb libjpeg libpng libtiff libjasper IlmImf") is included in "\OpenCV-2.4.5-android-sdk\sdk\native\jni\OpenCV.mk" file

But I don't know exactly this is correct. Please can anybody tell me is this correct or not?


Andrewgmz
  • 355
  • 3
  • 11
SKK
  • 1,705
  • 3
  • 28
  • 50
  • 1
    Correct. Default distribution comes with TBB enabled. – Andrey Kamaev Jun 22 '13 at 13:26
  • Thanks for the response. Whether we need to enable "WITH_TBB = YES" and do I need to build again? – SKK Jun 22 '13 at 14:05
  • No and no. Setting `WITH_TBB` is usable only if you build OpenCV itself. But you don't really need to rebuild so no extra actions required. You can call `cv::getNumThreads()` to get number of working threads on **multicore** device. A number greater than 1 means that TBB is enabled and sees your cores. – Andrey Kamaev Jun 25 '13 at 22:11

0 Answers0