Ask Your Question

Using OpenCV parallelization on ARM

asked 2013-03-15 09:54:19 -0500

babis gravatar image


I'm trying to use OpenCV 2.4.4 for the ZedBoard. It has a dual ARM Cortex-A9. The operating system is Xillinux, it is just an Ubuntu 12.04 for the ZedBoard with some extra stuff from Xillybus.

Testing a build with no special options was pretty straight forward. Then I tried one build using the following options for TBB, as suggested here:


The build was successful, as it was the compilation of my demo program. The problem is that I don't see any difference on the performance. I get the same fps as without TBB. The demo I use is a pretty simple motion detection. Just basic operations on video frames.

So the questions I have are the following:

  1. My code is written on C, as I later on found out that the C API is only for compatibility. Should it be on C++ to benefit from TBB?

  2. After searching for TBB accelerated functions in the online documentation, I didn't quite find a lot of them. Does TBB, at the moment, make any real difference?

  3. Based on the answer of this question, the only other option for ARM would be OpenMP (also not coming up on the online documentation). Is it more extensively used from the library, or I should only care parallelizing my own code?

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2013-03-16 06:48:45 -0500

  1. You are right. C interface is supported for compatibility only. All TBB optimizations are implemented in C++ code.

  2. Not all of TBB optimizations are documented. I recommend you to see source code of functions your are interested in. OpenCV is open source project and you can contribute your changes in documentation and your TBB optimizations. See details on how to contribute page.

edit flag offensive delete link more



I've already started rewriting my code in C++ to test again. I didn't know that TBB optimizations were not documented. So I will follow your advice on reading the source code!

Thank you very much for your help! Спасибо тебе большое за помощь!

babis gravatar imagebabis ( 2013-03-16 08:38:45 -0500 )edit

Also please note, that there are just few TBB optimizations. You can grep for parallel_for_, and you will see that you shouldn't expect significant performance boost. Actually you should better use threads in your application, parallelize processing steps.

Kirill Kornyakov gravatar imageKirill Kornyakov ( 2013-08-16 00:11:18 -0500 )edit

answered 2014-06-18 04:49:32 -0500

Fran gravatar image

Hi babis, since we both work with ZedBoard, Ubuntu and OpenCV I was interested in contacting you and maybe share some experiences. Was not able to PM you here though.

Regards, Fran

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2013-03-15 09:54:19 -0500

Seen: 1,839 times

Last updated: Jun 18 '14