fixed ocl::norm (with NORM_RELATIVE specified) when norm(src2) == 0

pull/1723/head
Ilya Lavrenov 11 years ago
parent 957c85e9c4
commit c674d3cf49
  1. 2
      modules/ocl/src/arithm.cpp

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

Loading…
Cancel
Save