fix the right border

pull/22194/head
@lizhiyu3 2 years ago
parent 366e8217c2
commit e59cff47d4
  1. 2
      modules/imgproc/src/pyramids.cpp
  2. 2
      modules/imgproc/test/test_pyramid.cpp

@ -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];
}
}

@ -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);
}

Loading…
Cancel
Save