Commit 320bee3b authored by Andrey Kamaev's avatar Andrey Kamaev

Fixed border interpolation problem in filter2D

parent 4cfc9dc6
......@@ -3026,8 +3026,8 @@ void cv::filter2D( InputArray _src, OutputArray _dst, int ddepth,
}
Ptr<FilterEngine> f = createLinearFilter(src.type(), dst.type(), kernel,
anchor, delta, borderType );
f->apply(src, dst);
anchor, delta, borderType & ~BORDER_ISOLATED );
f->apply(src, dst, Rect(0,0,-1,-1), Point(), (borderType & BORDER_ISOLATED) != 0 );
}
......
......@@ -144,6 +144,7 @@ void crossCorr( const Mat& img, const Mat& templ, Mat& corr,
img0.adjustROI(roiofs.y, wholeSize.height-img.rows-roiofs.y,
roiofs.x, wholeSize.width-img.cols-roiofs.x);
}
borderType |= BORDER_ISOLATED;
// calculate correlation by blocks
for( i = 0; i < tileCount; i++ )
......
......@@ -218,6 +218,8 @@ void cv::copyMakeBorder( InputArray _src, OutputArray _dst, int top, int bottom,
src.adjustROI(dtop, dbottom, dleft, dright);
top -= dtop;
left -= dleft;
bottom -= dbottom;
right -= dright;
}
borderType &= ~BORDER_ISOLATED;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment