1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Fix Sobel evaluation for image ROI without isolated border.

This commit is contained in:
Vitaly Tuzov
2016-09-07 18:30:17 +03:00
parent 26ecf2f374
commit 48f132f35f
4 changed files with 60 additions and 11 deletions
+5 -1
View File
@@ -307,7 +307,7 @@ static bool IPPDerivSobel(InputArray _src, OutputArray _dst, int ddepth, int dx,
{
CV_INSTRUMENT_REGION_IPP()
if ((borderType != BORDER_REPLICATE) || ((3 != ksize) && (5 != ksize)))
if (((borderType & ~BORDER_ISOLATED) != BORDER_REPLICATE) || ((3 != ksize) && (5 != ksize)))
return false;
if (fabs(delta) > FLT_EPSILON)
return false;
@@ -317,6 +317,10 @@ static bool IPPDerivSobel(InputArray _src, OutputArray _dst, int ddepth, int dx,
int bufSize = 0;
cv::AutoBuffer<char> buffer;
Mat src = _src.getMat(), dst = _dst.getMat();
if ((borderType & BORDER_ISOLATED) == 0 && src.isSubmatrix())
return false;
if ( ddepth < 0 )
ddepth = src.depth();