diff --git a/modules/imgproc/src/smooth.cpp b/modules/imgproc/src/smooth.cpp index dc19f7b169..952d4e3fd2 100644 --- a/modules/imgproc/src/smooth.cpp +++ b/modules/imgproc/src/smooth.cpp @@ -2848,7 +2848,7 @@ void cv::medianBlur( InputArray _src0, OutputArray _dst, int ksize ) bool useSortNet = ksize == 3 || (ksize == 5 #if !(CV_SSE2 || CV_NEON) - && src0.depth() > CV_8U + && ( src0.depth() > CV_8U || src0.channels() == 2 || src0.channels() > 4 ) #endif );