Difference between OpenCL TBB and OpenMP

asked 2018-11-15 03:12:15 -0600

Zari gravatar image

Hi All,

Not going into too much details I am having a project where I am using a computer with Intel Core i7 processor with 8 cores for computer vision applications. I do not have and cannot use any GPU - so cuda is out of the question here. Let's say that I mostly doing some image processing (threshold, blur, canny etc) and dense optical flow. The mix of those algorithms do their job for me but they all take too much time for me. I would like to call OpenCV functions in parallel. And here is my question - how can I do it in the easiest way ?

I know that OpenCV can be compiled with the support of parallel frameworks like TBB and OpenMP but I do not fully understand what is the difference to the compiled version of OpenCV with or without those libraries? Can I compile OpenCV with both of theme at that same time ? Will I benefit with just compiling OpenCV with those libraries or they only enable me to use "parallel_for" funcion and I have to write my parallel code myself?

I thought that it is easiest to use OpenCL but in this case I am not confident in the compilation options and OpenCL versions available. If I want OpenCL only for Intel CPU computations speed-up should I install Intel's SKD for that ? However when in cmake options, by default the directory in opencv/3rdparty/include/opencl/1.2 is specified.

Could somebody explain to me the concept of parallelization in OpenCV taking my doubts into account ?

edit retag flag offensive close merge delete

Comments

1

i can't really answer, but:

Can I compile OpenCV with both of theme at that same time ?

no. it's either or.

for opencl, have a look here

also: nice tbb/omp/wpx/pthreads shootout here

berak gravatar imageberak ( 2018-11-15 03:17:46 -0600 )edit