Fixed medianFilter

This commit is contained in:
Elena Gvozdeva 2013-12-17 11:04:54 +04:00
parent 8fe4e98b8a
commit 125d67130b
3 changed files with 5 additions and 5 deletions

View File

@ -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 == 1 || 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 );
CV_Assert( (ksize % 2 == 1) && (_src0.dims() <= 2 ));
if( ksize <= 1 )
{

View File

@ -102,7 +102,7 @@ OCL_TEST_P(MedianFilter, Mat)
OCL_INSTANTIATE_TEST_CASE_P(ImageProc, MedianFilter, Combine(
Values(CV_8U, CV_16U, CV_16S, CV_32F),
Values(1, 4),
Values(1, 2, 4),
Values(3, 5),
Bool())
);