1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

brush up by following the comments

This commit is contained in:
Tomoaki Teshima
2020-09-25 23:57:15 +09:00
parent 220b37144b
commit 234117800f
2 changed files with 10 additions and 5 deletions
+6 -3
View File
@@ -281,11 +281,14 @@ CUDA_TEST_P(Flip, Accuracy)
CUDA_TEST_P(Flip, AccuracyInplace)
{
size.width = (size.width >> 1) << 1; // in-place version only accepts even number
size.height = (size.height >> 1) << 1; // in-place version only accepts even number
cv::Mat src = randomMat(size, type);
bool isSizeOdd = ((size.width & 1) == 1) || ((size.height & 1) == 1);
cv::cuda::GpuMat srcDst = loadMat(src, useRoi);
if(isSizeOdd)
{
EXPECT_THROW(cv::cuda::flip(srcDst, srcDst, flip_code), cv::Exception);
return;
}
cv::cuda::flip(srcDst, srcDst, flip_code);
cv::Mat dst_gold;