fixed ocl::norm (with NORM_RELATIVE specified) when norm(src2) == 0
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user