From d9d4678599763d40fd7eee779ff36466b26143df Mon Sep 17 00:00:00 2001 From: Elena Gvozdeva Date: Tue, 17 Dec 2013 11:15:48 +0400 Subject: [PATCH] Fixed condition for channels --- modules/imgproc/src/smooth.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/imgproc/src/smooth.cpp b/modules/imgproc/src/smooth.cpp index c3991212e6..d77837732d 100644 --- a/modules/imgproc/src/smooth.cpp +++ b/modules/imgproc/src/smooth.cpp @@ -1668,7 +1668,7 @@ namespace cv int type = _src.type(); int depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); - if (!((depth == CV_8U || depth == CV_16U || depth == CV_16S || depth == CV_32F) && (cn != 3 || cn <= 4))) + if (!((depth == CV_8U || depth == CV_16U || depth == CV_16S || depth == CV_32F) && (cn != 3 && cn <= 4))) return false; const char * kernelName; @@ -1696,7 +1696,7 @@ namespace cv void cv::medianBlur( InputArray _src0, OutputArray _dst, int ksize ) { - CV_Assert( (ksize % 2 == 1) && (_src0.dims() <= 2 )); + CV_Assert( (ksize % 2 == 1) && (_src0.dims() <= 2 )); if( ksize <= 1 ) {