fix the right border

This commit is contained in:
@lizhiyu3 2022-07-20 17:03:09 +08:00
parent 366e8217c2
commit e59cff47d4
2 changed files with 2 additions and 2 deletions

View File

@ -1079,7 +1079,7 @@ pyrUp_( const Mat& _src, Mat& _dst, int)
if (dsize.width > ssize.width*2)
{
row[(_dst.cols-1) + x] = row[dx + cn];
row[(_dst.cols-1) * cn + x] = row[dx + cn];
}
}

View File

@ -11,7 +11,7 @@ TEST(Imgproc_PyrUp, pyrUp_regression_22184)
Mat src(100,100,CV_16UC3,Scalar(255,255,255));
Mat dst(100 * 2 + 1, 100 * 2 + 1, CV_16UC3, Scalar(0,0,0));
pyrUp(src, dst, Size(dst.cols, dst.rows));
double min_val;
double min_val = 0;
minMaxLoc(dst, &min_val);
ASSERT_GT(cvRound(min_val), 0);
}