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