Fixed border interpolation problem in filter2D
This commit is contained in:
parent
4cfc9dc67e
commit
320bee3bfe
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user