Lets say,I have a set of 1000 frames. and i have a dual core processor. can i process 500 frames on one core and another 500 on other core.?

asked 2014-09-15 03:00:44 -0600

updated 2014-09-15 03:15:32 -0600

I want to parallelize the motion estimation process using LK algorithm. And I m using OpenMP for it. Will i be able to divide the total number of frames into two subsets and process each subset of frames on each core ??? Please let me help in this regard. Ur help will be appreciated greatly.

edit retag flag offensive close merge delete

Comments

When working with multiple threads, you don't have to think about the number of cores. You should launch as many threads as you feel logical, the computer will handle the rest.

IIRC, the LK algorithm uses pairs of images to estimate the motion; so you should launch a different thread for each pair of images. Something like (pseudocode):

for(i=1;i<n;i++) startthread(LK,image[i],image[i+1]); //start a thread for each pair of images

for(i=1;i<n;i++) jointhread(i); //wait for each thread to complete

kbarni gravatar imagekbarni ( 2014-09-15 09:24:31 -0600 )edit