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.?
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.
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