@@ -50,6 +50,36 @@ PERF_TEST_P( TestWarpAffine, WarpAffine,
50
50
#endif
51
51
}
52
52
53
+ PERF_TEST_P (TestWarpAffine, WarpAffine_ovx,
54
+ Combine (
55
+ Values (szVGA, sz720p, sz1080p),
56
+ InterType::all(),
57
+ BorderMode::all()
58
+ )
59
+ )
60
+ {
61
+ Size sz, szSrc (512 , 512 );
62
+ int borderMode, interType;
63
+ sz = get<0 >(GetParam ());
64
+ interType = get<1 >(GetParam ());
65
+ borderMode = get<2 >(GetParam ());
66
+ Scalar borderColor = Scalar::all (150 );
67
+
68
+ Mat src (szSrc, CV_8UC1), dst (sz, CV_8UC1);
69
+ cvtest::fillGradient (src);
70
+ if (borderMode == BORDER_CONSTANT) cvtest::smoothBorder (src, borderColor, 1 );
71
+ Mat warpMat = getRotationMatrix2D (Point2f (src.cols / 2 .f , src.rows / 2 .f ), 30 ., 2.2 );
72
+ declare.in (src).out (dst);
73
+
74
+ TEST_CYCLE () warpAffine (src, dst, warpMat, sz, interType, borderMode, borderColor);
75
+
76
+ #ifdef ANDROID
77
+ SANITY_CHECK (dst, interType == INTER_LINEAR ? 5 : 10 );
78
+ #else
79
+ SANITY_CHECK (dst, 1 );
80
+ #endif
81
+ }
82
+
53
83
PERF_TEST_P ( TestWarpPerspective, WarpPerspective,
54
84
Combine (
55
85
Values ( szVGA, sz720p, sz1080p ),
@@ -88,6 +118,44 @@ PERF_TEST_P( TestWarpPerspective, WarpPerspective,
88
118
#endif
89
119
}
90
120
121
+ PERF_TEST_P (TestWarpPerspective, WarpPerspective_ovx,
122
+ Combine (
123
+ Values (szVGA, sz720p, sz1080p),
124
+ InterType::all(),
125
+ BorderMode::all()
126
+ )
127
+ )
128
+ {
129
+ Size sz, szSrc (512 , 512 );
130
+ int borderMode, interType;
131
+ sz = get<0 >(GetParam ());
132
+ interType = get<1 >(GetParam ());
133
+ borderMode = get<2 >(GetParam ());
134
+ Scalar borderColor = Scalar::all (150 );
135
+
136
+ Mat src (szSrc, CV_8UC1), dst (sz, CV_8UC1);
137
+ cvtest::fillGradient (src);
138
+ if (borderMode == BORDER_CONSTANT) cvtest::smoothBorder (src, borderColor, 1 );
139
+ Mat rotMat = getRotationMatrix2D (Point2f (src.cols / 2 .f , src.rows / 2 .f ), 30 ., 2.2 );
140
+ Mat warpMat (3 , 3 , CV_64FC1);
141
+ for (int r = 0 ; r<2 ; r++)
142
+ for (int c = 0 ; c<3 ; c++)
143
+ warpMat.at <double >(r, c) = rotMat.at <double >(r, c);
144
+ warpMat.at <double >(2 , 0 ) = .3 / sz.width ;
145
+ warpMat.at <double >(2 , 1 ) = .3 / sz.height ;
146
+ warpMat.at <double >(2 , 2 ) = 1 ;
147
+
148
+ declare.in (src).out (dst);
149
+
150
+ TEST_CYCLE () warpPerspective (src, dst, warpMat, sz, interType, borderMode, borderColor);
151
+
152
+ #ifdef ANDROID
153
+ SANITY_CHECK (dst, interType == INTER_LINEAR ? 5 : 10 );
154
+ #else
155
+ SANITY_CHECK (dst, 1 );
156
+ #endif
157
+ }
158
+
91
159
PERF_TEST_P ( TestWarpPerspectiveNear_t, WarpPerspectiveNear,
92
160
Combine (
93
161
Values ( Size(640 ,480 ), Size(1920 ,1080 ), Size(2592 ,1944 ) ),
0 commit comments