Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Parallel for

Soi I have some problems. It's hard to understand how it works. I've red some information like this http://answers.opencv.org/question/3730/how-to-use-parallel_for/ can you help me with my code

for( int y=0; y<dst->height; y++ ) { uchar* ptr = (uchar) (dst->imageData + y * dst->widthStep); uchar ptrM = (uchar) (outCircle->imageData + y * outCircle->widthStep); for( int x=0; x<dst->width; x++ ) { if(outCircle->imageData[outCircle->widthStepy+x]==0){
ptr[3x]=0; ptr[3x+1]=0; ptr[3*x+2]=0; } I have this one and i don't understand how to implement parallel_for

Parallel for

Soi I have some problems. It's hard to understand how it works. I've red some information like this http://answers.opencv.org/question/3730/how-to-use-parallel_for/ can you help me with my code

for( int y=0; y<dst->height; y++ ) {
 uchar* ptr = (uchar) (uchar*) (dst->imageData + y * dst->widthStep);
 uchar uchar* ptrM = (uchar) (uchar*) (outCircle->imageData + y * outCircle->widthStep);
  for( int x=0; x<dst->width; x++ ) {
if(outCircle->imageData[outCircle->widthStep*y+x]==0){  if(outCircle->imageData[outCircle->widthStepy+x]==0){ 
ptr[3x]=0; ptr[3*x]=0; ptr[3x+1]=0; ptr[3*x+1]=0; ptr[3*x+2]=0; }

I have this one and i don't understand how to implement parallel_for