Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV and TBB

Hi, I am looking for a way to speed up my image processing. I have a vector<string> containing the storage location of an image in each element. the vector's size is approx 1000. the for loop looks like:

for(int i=0; i<vectorimg.size();++i) {="" mat="" img="imread(vectorimg[i]);" gaussianblur(img...);="" threshold(img...);="" ...="" }<="" p="">

I wonder if I could use parallel_for from TBB to speed up the for loop. how would the parallel_for loop look like? Are there any examples for using parallel_for and opencv?

Thanks in advance!

OpenCV and TBB

Hi, I am looking for a way to speed up my image processing. I have a vector<string> containing the storage location of an image in each element. the vector's size is approx 1000. the for loop looks like:

for(int i=0; i<vectorimg.size();++i) {="" mat="" img="imread(vectorimg[i]);" gaussianblur(img...);="" threshold(img...);="" ...="" }<="" p="">
i<vectorimg.size();++i)
{
Mat img = imread(vectorimg[i]);
GaussianBlur(img...);
threshold(img...);
...
}

I wonder if I could use parallel_for from TBB to speed up the for loop. how would the parallel_for loop look like? Are there any examples for using parallel_for and opencv?

Thanks in advance!