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

This commit is contained in:
Ilya Lavrenov 2013-10-30 16:48:12 +04:00
parent 957c85e9c4
commit c674d3cf49

View File

@ -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;
}