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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user