r = clamp(dy+dr+9, 0, rows-1);
int index9 = mad24(r, srcStep, srcOffset + c*scnbytes);
-
+
__global DATA_TYPE * src = (__global DATA_TYPE *)(srcptr + index1);
data[dr][dc] = src[0];
op(p4, p2); op(p6, p4); op(p4, p2);
int dst_index = mad24( gy, dstStep, dstOffset + gx * scnbytes);
-
+
if( gy < rows && gx < cols)
{
__global DATA_TYPE* dst = (__global DATA_TYPE *)(dstptr + dst_index);
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;
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 )
{
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())
);