mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge pull request #25633 from savuor:rv/rotate_tests
Tests for cv::rotate() added #25633 fixes #25449 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
committed by
GitHub
parent
f17b122512
commit
b267f1791c
@@ -374,6 +374,36 @@ OCL_PERF_TEST_P(FlipFixture, Flip,
|
||||
SANITY_CHECK(dst);
|
||||
}
|
||||
|
||||
///////////// Rotate ////////////////////////
|
||||
|
||||
enum
|
||||
{
|
||||
ROTATE_90_CLOCKWISE = 0, ROTATE_180, ROTATE_90_COUNTERCLOCKWISE
|
||||
};
|
||||
|
||||
CV_ENUM(RotateType, ROTATE_90_CLOCKWISE, ROTATE_180, ROTATE_90_COUNTERCLOCKWISE)
|
||||
|
||||
typedef tuple<Size, MatType, RotateType> RotateParams;
|
||||
typedef TestBaseWithParam<RotateParams> RotateFixture;
|
||||
|
||||
OCL_PERF_TEST_P(RotateFixture, rotate,
|
||||
::testing::Combine(OCL_TEST_SIZES, OCL_TEST_TYPES, RotateType::all()))
|
||||
{
|
||||
const RotateParams params = GetParam();
|
||||
const Size srcSize = get<0>(params);
|
||||
const int type = get<1>(params);
|
||||
const int rotateCode = get<2>(params);
|
||||
|
||||
checkDeviceMaxMemoryAllocSize(srcSize, type);
|
||||
|
||||
UMat src(srcSize, type), dst(srcSize, type);
|
||||
declare.in(src, WARMUP_RNG).out(dst);
|
||||
|
||||
OCL_TEST_CYCLE() cv::rotate(src, dst, rotateCode);
|
||||
|
||||
SANITY_CHECK_NOTHING();
|
||||
}
|
||||
|
||||
///////////// minMaxLoc ////////////////////////
|
||||
|
||||
typedef Size_MatType MinMaxLocFixture;
|
||||
|
||||
Reference in New Issue
Block a user