Ask Your Question

Revision history [back]

OpenCV + TBB + Aruco not running in MultiProcessor box

Hi,

I'm trying to do a application run with the following packages:

OpenCV + TBB + Aruco, all compiled with MinGW64 4.8.1 threads win32, seh.

My intention is use the multiprocessing of TBB (attribuited automatically in some operations by OpenCV, like us know).

My Env:

Msys2 - x64-msys2-beta2-20130909.tar.xz, from here

Mingw-4.8.1 64bit - x64-4.8.1-release-win32-seh-rev5.7z, from here

Intel TBB 4.2, from here

In the compilation of TBB I'd used these arguments:

mingw32-make compiler=gcc arch=intel64 runtime=mingw default

The DDLs was generated with sucess, and the result of tests works fine, like follow:

mingw32-make compiler=gcc arch=intel64 runtime=mingw test

At this point, all processors several times remained processing in 100% of capacity.

After that, I ran the cmake against the opencv tree (and several configures after), I have obtained this configuration:

http://pastebin.com/VhUSwTi9

How we can see in the line 68 of pastebin, the support for TBB was activated.

After the building of OpenCV, the DLL's, .a's and samples was generated works fine.

I'm using the aruco (http://www.uco.es/investiga/grupos/ava/node/26) to detect some targets in static images (not in video).

In a first and preliminar tests, I used the VS2010 + binary OpenCV from site (ver 2.4.2) with aruco.

In the process of search markers (by aruco), all the processors was used (indicating the multiprocessing provided by the TBB).

How can you see, my DLLs compilation is using the TBB DLL:

http://pastebin.com/cULDFt37

And my cvconfig.h in the build dir of OpenCV have the follow content:

http://pastebin.com/sss0ujDc

But when I try to run my App with OpenCV and TBB above, the multicore process was not used.

I do some tests in my source, and the command:

printf("getNumThreads() == %d\n", getNumThreads());

returns 8 (The number of cores of my PC).

This combination OpenCV + TBB compiled with MinGW64 has some restiction?

Anyone have a help, or tip?

Thanks in advance!

Thiago Tiedtke dos Reis