Skip to content

Commit bf699c3

Browse files
committed
Merge pull request #358 from DirtyMaster:patch-1
2 parents 9011368 + 9382f0e commit bf699c3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/ximgproc/src/structured_edge_detection.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,9 @@ class StructuredEdgeDetectionImpl : public StructuredEdgeDetection
549549
offsetY[n] = x2*features.cols*nchannels + y2*nchannels + z;
550550
}
551551
// lookup tables for mapping linear index to offset pairs
552-
552+
#ifdef _OPENMP
553+
#pragma omp parallel for
554+
#endif
553555
for (int i = 0; i < height; ++i)
554556
{
555557
float *regFeaturesPtr = regFeatures.ptr<float>(i*stride/shrink);
@@ -599,6 +601,9 @@ class StructuredEdgeDetectionImpl : public StructuredEdgeDetection
599601
dstM.setTo(0);
600602

601603
float step = 2.0f * CV_SQR(stride) / CV_SQR(ipSize) / nTreesEval;
604+
#ifdef _OPENMP
605+
#pragma omp parallel for
606+
#endif
602607
for (int i = 0; i < height; ++i)
603608
{
604609
int *pIndex = indexes.ptr<int>(i);

0 commit comments

Comments
 (0)