Merge pull request #1723 from ilya-lavrenov:ocl_norm

pull/1709/merge
Andrey Pavlenko 11 years ago committed by OpenCV Buildbot
commit 5795bb326d
  1. 4
      modules/ocl/perf/perf_matrix_operation.cpp
  2. 2
      modules/ocl/src/arithm.cpp

@ -156,6 +156,8 @@ PERF_TEST_P(setToFixture, setTo,
OCL_PERF_ELSE OCL_PERF_ELSE
} }
#if 0
/////////////////// upload /////////////////////////// /////////////////// upload ///////////////////////////
typedef tuple<Size, MatDepth, int> uploadParams; typedef tuple<Size, MatDepth, int> uploadParams;
@ -228,3 +230,5 @@ PERF_TEST_P(downloadFixture, download,
SANITY_CHECK_NOTHING(); SANITY_CHECK_NOTHING();
} }
#endif

@ -688,7 +688,7 @@ double cv::ocl::norm(const oclMat &src1, const oclMat &src2, int normType)
break; break;
} }
if (isRelative) if (isRelative)
r = r / norm(src2, normType); r = r / (norm(src2, normType) + DBL_EPSILON);
return r; return r;
} }

Loading…
Cancel
Save