fixed cv::sepFilter2D
This commit is contained in:
parent
ee331001f5
commit
059e6e4305
@ -3510,8 +3510,8 @@ static bool ocl_sepFilter2D( InputArray _src, OutputArray _dst, int ddepth,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
int type = _src.type();
|
int type = _src.type();
|
||||||
if ((CV_8UC1 != type) && (CV_8UC4 == type) &&
|
if ( !( (CV_8UC1 == type || CV_8UC4 == type || CV_32FC1 == type || CV_32FC4 == type) &&
|
||||||
(CV_32FC1 != type) && (CV_32FC4 == type))
|
(ddepth == CV_32F || ddepth == CV_8U) ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int cn = CV_MAT_CN(type);
|
int cn = CV_MAT_CN(type);
|
||||||
@ -3531,8 +3531,6 @@ static bool ocl_sepFilter2D( InputArray _src, OutputArray _dst, int ddepth,
|
|||||||
|
|
||||||
if( ddepth < 0 )
|
if( ddepth < 0 )
|
||||||
ddepth = sdepth;
|
ddepth = sdepth;
|
||||||
else if (ddepth != sdepth)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
UMat src = _src.getUMat();
|
UMat src = _src.getUMat();
|
||||||
Size srcWholeSize; Point srcOffset;
|
Size srcWholeSize; Point srcOffset;
|
||||||
@ -3541,9 +3539,7 @@ static bool ocl_sepFilter2D( InputArray _src, OutputArray _dst, int ddepth,
|
|||||||
(0 != (src.cols % 4)) ||
|
(0 != (src.cols % 4)) ||
|
||||||
(0 != ((src.step / src.elemSize()) % 4))
|
(0 != ((src.step / src.elemSize()) % 4))
|
||||||
)
|
)
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
Size srcSize = src.size();
|
Size srcSize = src.size();
|
||||||
Size bufSize(srcSize.width, srcSize.height + kernelY.cols - 1);
|
Size bufSize(srcSize.width, srcSize.height + kernelY.cols - 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user