diff --git a/modules/imgproc/src/deriv.cpp b/modules/imgproc/src/deriv.cpp index c0b6e0853ac2caff308e655b19f810b3eb796fa4..5e920ec0b846b0dffebfd2d131c60c98b17e193b 100644 --- a/modules/imgproc/src/deriv.cpp +++ b/modules/imgproc/src/deriv.cpp @@ -410,7 +410,7 @@ static bool IPPDerivScharr(InputArray _src, OutputArray _dst, int ddepth, int dx static bool IPPDerivSobel(InputArray _src, OutputArray _dst, int ddepth, int dx, int dy, int ksize, double scale, double delta, int borderType) { - if ((borderType != BORDER_REPLICATE) || (3 != ksize) || (5 != ksize)) + if ((borderType != BORDER_REPLICATE) || ((3 != ksize) && (5 != ksize))) return false; if (fabs(delta) > FLT_EPSILON) return false;