diff --git a/modules/core/src/stat.cpp b/modules/core/src/stat.cpp index a1415652c..d99a1879e 100644 --- a/modules/core/src/stat.cpp +++ b/modules/core/src/stat.cpp @@ -2185,6 +2185,9 @@ static bool ocl_norm( InputArray _src, int normType, InputArray _mask, double & (!doubleSupport && depth == CV_64F)) return false; + if( depth == CV_32F && !_mask.empty() ) + return false; + UMat src = _src.getUMat(); if (normType == NORM_INF)