diff --git a/modules/ocl/src/arithm.cpp b/modules/ocl/src/arithm.cpp index ea2eff63fc..9b24b16b0b 100644 --- a/modules/ocl/src/arithm.cpp +++ b/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; }