gapi_imgproc_tests_cpu.cpp 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616
  1. // This file is part of OpenCV project.
  2. // It is subject to the license terms in the LICENSE file found in the top-level directory
  3. // of this distribution and at http://opencv.org/license.html.
  4. //
  5. // Copyright (C) 2018-2020 Intel Corporation
  6. #include "../test_precomp.hpp"
  7. #include "../common/gapi_imgproc_tests.hpp"
  8. #include <opencv2/gapi/cpu/imgproc.hpp>
  9. namespace
  10. {
  11. #define IMGPROC_CPU [] () { return cv::compile_args(cv::gapi::use_only{cv::gapi::imgproc::cpu::kernels()}); }
  12. } // anonymous namespace
  13. namespace opencv_test
  14. {
  15. INSTANTIATE_TEST_CASE_P(ResizeTestCPU, ResizeTest,
  16. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1),
  17. Values(cv::Size(1280, 720),
  18. cv::Size(640, 480),
  19. cv::Size(128, 128)),
  20. Values(-1),
  21. Values(IMGPROC_CPU),
  22. Values(AbsSimilarPoints(2, 0.05).to_compare_obj()),
  23. Values(cv::INTER_NEAREST, cv::INTER_LINEAR, cv::INTER_AREA),
  24. Values(cv::Size(64,64),
  25. cv::Size(30,30))));
  26. INSTANTIATE_TEST_CASE_P(ResizePTestCPU, ResizePTest,
  27. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1),
  28. Values(cv::Size(1280, 720),
  29. cv::Size(640, 480),
  30. cv::Size(128, 128)),
  31. Values(-1),
  32. Values(IMGPROC_CPU),
  33. Values(AbsSimilarPoints(2, 0.05).to_compare_obj()),
  34. Values(cv::INTER_LINEAR),
  35. Values(cv::Size(64,64),
  36. cv::Size(30,30))));
  37. INSTANTIATE_TEST_CASE_P(ResizeTestCPU, ResizeTestFxFy,
  38. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1),
  39. Values(cv::Size(1280, 720),
  40. cv::Size(640, 480),
  41. cv::Size(128, 128)),
  42. Values(-1),
  43. Values(IMGPROC_CPU),
  44. Values(AbsSimilarPoints(2, 0.05).to_compare_obj()),
  45. Values(cv::INTER_NEAREST, cv::INTER_LINEAR, cv::INTER_AREA),
  46. Values(0.5, 0.1),
  47. Values(0.5, 0.1)));
  48. INSTANTIATE_TEST_CASE_P(Filter2DTestCPU, Filter2DTest,
  49. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1),
  50. Values(cv::Size(1280, 720),
  51. cv::Size(640, 480),
  52. cv::Size(128, 128)),
  53. Values(-1, CV_32F),
  54. Values(IMGPROC_CPU),
  55. Values(AbsExact().to_compare_obj()),
  56. Values(cv::Size(3, 3),
  57. cv::Size(4, 4),
  58. cv::Size(5, 5),
  59. cv::Size(7, 7)),
  60. Values(cv::BORDER_DEFAULT)));
  61. INSTANTIATE_TEST_CASE_P(BoxFilterTestCPU, BoxFilterTest,
  62. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1),
  63. Values(cv::Size(1280, 720),
  64. cv::Size(640, 480)),
  65. Values(-1, CV_32F),
  66. Values(IMGPROC_CPU),
  67. Values(AbsTolerance(0).to_compare_obj()),
  68. Values(3,5),
  69. Values(cv::BORDER_DEFAULT)));
  70. INSTANTIATE_TEST_CASE_P(SepFilterTestCPU_8U, SepFilterTest,
  71. Combine(Values(CV_8UC1, CV_8UC3),
  72. Values(cv::Size(1280, 720),
  73. cv::Size(640, 480)),
  74. Values(-1, CV_16S, CV_32F),
  75. Values(IMGPROC_CPU),
  76. Values(AbsExact().to_compare_obj()),
  77. Values(3)));
  78. INSTANTIATE_TEST_CASE_P(SepFilterTestCPU_other, SepFilterTest,
  79. Combine(Values(CV_16UC1, CV_16SC1, CV_32FC1),
  80. Values(cv::Size(1280, 720),
  81. cv::Size(640, 480)),
  82. Values(-1, CV_32F),
  83. Values(IMGPROC_CPU),
  84. Values(AbsExact().to_compare_obj()),
  85. Values(3)));
  86. INSTANTIATE_TEST_CASE_P(BlurTestCPU, BlurTest,
  87. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1),
  88. Values(cv::Size(1280, 720),
  89. cv::Size(640, 480)),
  90. Values(-1),
  91. Values(IMGPROC_CPU),
  92. Values(AbsTolerance(0.0).to_compare_obj()),
  93. Values(3,5),
  94. Values(cv::BORDER_DEFAULT)));
  95. INSTANTIATE_TEST_CASE_P(gaussBlurTestCPU, GaussianBlurTest,
  96. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1),
  97. Values(cv::Size(1280, 720),
  98. cv::Size(640, 480)),
  99. Values(-1),
  100. Values(IMGPROC_CPU),
  101. Values(AbsExact().to_compare_obj()),
  102. Values(3, 5)));
  103. INSTANTIATE_TEST_CASE_P(MedianBlurTestCPU, MedianBlurTest,
  104. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1),
  105. Values(cv::Size(1280, 720),
  106. cv::Size(640, 480)),
  107. Values(-1),
  108. Values(IMGPROC_CPU),
  109. Values(AbsExact().to_compare_obj()),
  110. Values(3, 5)));
  111. INSTANTIATE_TEST_CASE_P(ErodeTestCPU, ErodeTest,
  112. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1),
  113. Values(cv::Size(1280, 720),
  114. cv::Size(640, 480)),
  115. Values(-1),
  116. Values(IMGPROC_CPU),
  117. Values(AbsExact().to_compare_obj()),
  118. Values(3, 5),
  119. Values(cv::MorphShapes::MORPH_RECT,
  120. cv::MorphShapes::MORPH_CROSS,
  121. cv::MorphShapes::MORPH_ELLIPSE)));
  122. INSTANTIATE_TEST_CASE_P(Erode3x3TestCPU, Erode3x3Test,
  123. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1),
  124. Values(cv::Size(1280, 720),
  125. cv::Size(640, 480)),
  126. Values(-1),
  127. Values(IMGPROC_CPU),
  128. Values(AbsExact().to_compare_obj()),
  129. Values(1,2,4)));
  130. INSTANTIATE_TEST_CASE_P(DilateTestCPU, DilateTest,
  131. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1),
  132. Values(cv::Size(1280, 720),
  133. cv::Size(640, 480)),
  134. Values(-1),
  135. Values(IMGPROC_CPU),
  136. Values(AbsExact().to_compare_obj()),
  137. Values(3, 5),
  138. Values(cv::MorphShapes::MORPH_RECT,
  139. cv::MorphShapes::MORPH_CROSS,
  140. cv::MorphShapes::MORPH_ELLIPSE)));
  141. INSTANTIATE_TEST_CASE_P(Dilate3x3TestCPU, Dilate3x3Test,
  142. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1),
  143. Values(cv::Size(1280, 720),
  144. cv::Size(640, 480)),
  145. Values(-1),
  146. Values(IMGPROC_CPU),
  147. Values(AbsExact().to_compare_obj()),
  148. Values(1,2,4)));
  149. INSTANTIATE_TEST_CASE_P(MorphologyExTestCPU, MorphologyExTest,
  150. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1),
  151. Values(cv::Size(1280, 720),
  152. cv::Size(640, 480)),
  153. Values(-1),
  154. Values(IMGPROC_CPU),
  155. Values(AbsExact().to_compare_obj()),
  156. Values(cv::MorphTypes::MORPH_ERODE,
  157. cv::MorphTypes::MORPH_DILATE,
  158. cv::MorphTypes::MORPH_OPEN,
  159. cv::MorphTypes::MORPH_CLOSE,
  160. cv::MorphTypes::MORPH_GRADIENT,
  161. cv::MorphTypes::MORPH_TOPHAT,
  162. cv::MorphTypes::MORPH_BLACKHAT)));
  163. INSTANTIATE_TEST_CASE_P(MorphologyExHitMissTestCPU, MorphologyExTest,
  164. Combine(Values(CV_8UC1),
  165. Values(cv::Size(1280, 720),
  166. cv::Size(640, 480)),
  167. Values(-1),
  168. Values(IMGPROC_CPU),
  169. Values(AbsExact().to_compare_obj()),
  170. Values(cv::MorphTypes::MORPH_HITMISS)));
  171. INSTANTIATE_TEST_CASE_P(SobelTestCPU, SobelTest,
  172. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1),
  173. Values(cv::Size(1280, 720),
  174. cv::Size(640, 480)),
  175. Values(-1, CV_16S, CV_32F),
  176. Values(IMGPROC_CPU),
  177. Values(AbsExact().to_compare_obj()),
  178. Values(3, 5),
  179. Values(0, 1),
  180. Values(1, 2)));
  181. INSTANTIATE_TEST_CASE_P(SobelTestCPU32F, SobelTest,
  182. Combine(Values(CV_32FC1),
  183. Values(cv::Size(1280, 720),
  184. cv::Size(640, 480)),
  185. Values(CV_32F),
  186. Values(IMGPROC_CPU),
  187. Values(AbsExact().to_compare_obj()),
  188. Values(3, 5),
  189. Values(0, 1),
  190. Values(1, 2)));
  191. INSTANTIATE_TEST_CASE_P(SobelXYTestCPU, SobelXYTest,
  192. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1),
  193. Values(cv::Size(1280, 720),
  194. cv::Size(640, 480)),
  195. Values(-1, CV_16S, CV_32F),
  196. Values(IMGPROC_CPU),
  197. Values(AbsExact().to_compare_obj()),
  198. Values(3, 5),
  199. Values(1, 2),
  200. Values(BORDER_CONSTANT, BORDER_REPLICATE, BORDER_REFLECT),
  201. Values(0, 1, 255)));
  202. INSTANTIATE_TEST_CASE_P(SobelXYTestCPU32F, SobelXYTest,
  203. Combine(Values(CV_32FC1),
  204. Values(cv::Size(1280, 720),
  205. cv::Size(640, 480)),
  206. Values(CV_32F),
  207. Values(IMGPROC_CPU),
  208. Values(AbsExact().to_compare_obj()),
  209. Values(3, 5),
  210. Values(1, 2),
  211. Values(BORDER_CONSTANT, BORDER_REPLICATE, BORDER_REFLECT),
  212. Values(0, 1, 255)));
  213. INSTANTIATE_TEST_CASE_P(LaplacianTestCPU, LaplacianTest,
  214. Combine(Values(CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1),
  215. Values(cv::Size(1280, 720),
  216. cv::Size(640, 480)),
  217. Values(-1),
  218. Values(IMGPROC_CPU),
  219. Values(AbsExact().to_compare_obj()),
  220. Values(1, 3),
  221. Values(0.2, 1.0),
  222. Values(BORDER_CONSTANT, BORDER_REPLICATE, BORDER_REFLECT)));
  223. INSTANTIATE_TEST_CASE_P(BilateralFilterTestCPU, BilateralFilterTest,
  224. Combine(Values(CV_32FC1, CV_32FC3, CV_8UC1, CV_8UC3),
  225. Values(cv::Size(1280, 720),
  226. cv::Size(640, 480)),
  227. Values(-1),
  228. Values(IMGPROC_CPU),
  229. Values(AbsExact().to_compare_obj()),
  230. Values(3, 5),
  231. Values(20),
  232. Values(10),
  233. Values(BORDER_CONSTANT, BORDER_REPLICATE, BORDER_REFLECT)));
  234. INSTANTIATE_TEST_CASE_P(EqHistTestCPU, EqHistTest,
  235. Combine(Values(CV_8UC1),
  236. Values(cv::Size(1280, 720),
  237. cv::Size(640, 480)),
  238. Values(CV_8UC1),
  239. Values(IMGPROC_CPU),
  240. Values(AbsExact().to_compare_obj())));
  241. INSTANTIATE_TEST_CASE_P(CannyTestCPU, CannyTest,
  242. Combine(Values(CV_8UC1, CV_8UC3),
  243. Values(cv::Size(1280, 720),
  244. cv::Size(640, 480)),
  245. Values(CV_8UC1),
  246. Values(IMGPROC_CPU),
  247. Values(AbsSimilarPoints(0, 0.05).to_compare_obj()),
  248. Values(3.0, 120.0),
  249. Values(125.0, 240.0),
  250. Values(3, 5),
  251. testing::Bool()));
  252. INSTANTIATE_TEST_CASE_P(GoodFeaturesTestCPU, GoodFeaturesTest,
  253. Combine(Values(IMGPROC_CPU),
  254. Values(AbsExactVector<cv::Point2f>().to_compare_obj()),
  255. Values("cv/shared/fruits.png"),
  256. Values(CV_32FC1, CV_8UC1),
  257. Values(50, 100),
  258. Values(0.01),
  259. Values(10.0),
  260. Values(3),
  261. testing::Bool()));
  262. INSTANTIATE_TEST_CASE_P(GoodFeaturesInternalTestCPU, GoodFeaturesTest,
  263. Combine(Values(IMGPROC_CPU),
  264. Values(AbsExactVector<cv::Point2f>().to_compare_obj()),
  265. Values("cv/cascadeandhog/images/audrybt1.png"),
  266. Values(CV_32FC1, CV_8UC1),
  267. Values(100),
  268. Values(0.0000001),
  269. Values(5.0),
  270. Values(3),
  271. Values(true)));
  272. INSTANTIATE_TEST_CASE_P(FindContoursNoOffsetTestCPU, FindContoursNoOffsetTest,
  273. Combine(Values(IMGPROC_CPU),
  274. Values(cv::Size(1280, 720)),
  275. Values(CV_8UC1),
  276. Values(RETR_EXTERNAL),
  277. Values(CHAIN_APPROX_NONE),
  278. Values(AbsExact().to_compare_obj())));
  279. INSTANTIATE_TEST_CASE_P(FindContoursOffsetTestCPU, FindContoursOffsetTest,
  280. Values(IMGPROC_CPU));
  281. INSTANTIATE_TEST_CASE_P(FindContoursHNoOffsetTestCPU, FindContoursHNoOffsetTest,
  282. Combine(Values(IMGPROC_CPU),
  283. Values(cv::Size(1280, 720),
  284. cv::Size(640, 480)),
  285. Values(CV_8UC1),
  286. Values(RETR_EXTERNAL, RETR_LIST, RETR_CCOMP, RETR_TREE),
  287. Values(CHAIN_APPROX_NONE, CHAIN_APPROX_SIMPLE,
  288. CHAIN_APPROX_TC89_L1, CHAIN_APPROX_TC89_KCOS),
  289. Values(AbsExact().to_compare_obj())));
  290. INSTANTIATE_TEST_CASE_P(FindContoursHNoOffset32STestCPU, FindContoursHNoOffsetTest,
  291. Combine(Values(IMGPROC_CPU),
  292. Values(cv::Size(1280, 720),
  293. cv::Size(640, 480)),
  294. Values(CV_32SC1),
  295. Values(RETR_CCOMP, RETR_FLOODFILL),
  296. Values(CHAIN_APPROX_NONE, CHAIN_APPROX_SIMPLE,
  297. CHAIN_APPROX_TC89_L1, CHAIN_APPROX_TC89_KCOS),
  298. Values(AbsExact().to_compare_obj())));
  299. INSTANTIATE_TEST_CASE_P(FindContoursHOffsetTestCPU, FindContoursHOffsetTest,
  300. Values(IMGPROC_CPU));
  301. INSTANTIATE_TEST_CASE_P(BoundingRectMatTestCPU, BoundingRectMatTest,
  302. Combine(Values( CV_8UC1 ),
  303. Values(cv::Size(1280, 720),
  304. cv::Size(640, 480),
  305. cv::Size(128, 128)),
  306. Values(-1),
  307. Values(IMGPROC_CPU),
  308. Values(IoUToleranceRect(0).to_compare_obj()),
  309. Values(false)));
  310. INSTANTIATE_TEST_CASE_P(BoundingRectMatVectorTestCPU, BoundingRectMatTest,
  311. Combine(Values(CV_32S, CV_32F),
  312. Values(cv::Size(1280, 1),
  313. cv::Size(128, 1)),
  314. Values(-1),
  315. Values(IMGPROC_CPU),
  316. Values(IoUToleranceRect(1e-5).to_compare_obj()),
  317. Values(true)));
  318. INSTANTIATE_TEST_CASE_P(BoundingRectVector32STestCPU, BoundingRectVector32STest,
  319. Combine(Values(-1),
  320. Values(cv::Size(1280, 1),
  321. cv::Size(128, 1)),
  322. Values(-1),
  323. Values(IMGPROC_CPU),
  324. Values(IoUToleranceRect(0).to_compare_obj())));
  325. INSTANTIATE_TEST_CASE_P(BoundingRectVector32FTestCPU, BoundingRectVector32FTest,
  326. Combine(Values(-1),
  327. Values(cv::Size(1280, 1),
  328. cv::Size(128, 1)),
  329. Values(-1),
  330. Values(IMGPROC_CPU),
  331. Values(IoUToleranceRect(1e-5).to_compare_obj())));
  332. INSTANTIATE_TEST_CASE_P(FitLine2DMatVectorTestCPU, FitLine2DMatVectorTest,
  333. Combine(Values(CV_8U, CV_8S, CV_16U, CV_16S,
  334. CV_32S, CV_32F, CV_64F),
  335. Values(cv::Size(8, 0), cv::Size(1024, 0)),
  336. Values(-1),
  337. Values(IMGPROC_CPU),
  338. Values(RelDiffToleranceVec<float, 4>(0.01).to_compare_obj()),
  339. Values(DIST_L1, DIST_L2, DIST_L12, DIST_FAIR,
  340. DIST_WELSCH, DIST_HUBER)));
  341. INSTANTIATE_TEST_CASE_P(FitLine2DVector32STestCPU, FitLine2DVector32STest,
  342. Combine(Values(-1),
  343. Values(cv::Size(8, 0)),
  344. Values(-1),
  345. Values(IMGPROC_CPU),
  346. Values(RelDiffToleranceVec<float, 4>(0.01).to_compare_obj()),
  347. Values(DIST_L1)));
  348. INSTANTIATE_TEST_CASE_P(FitLine2DVector32FTestCPU, FitLine2DVector32FTest,
  349. Combine(Values(-1),
  350. Values(cv::Size(8, 0)),
  351. Values(-1),
  352. Values(IMGPROC_CPU),
  353. Values(RelDiffToleranceVec<float, 4>(0.01).to_compare_obj()),
  354. Values(DIST_L1)));
  355. INSTANTIATE_TEST_CASE_P(FitLine2DVector64FTestCPU, FitLine2DVector64FTest,
  356. Combine(Values(-1),
  357. Values(cv::Size(8, 0)),
  358. Values(-1),
  359. Values(IMGPROC_CPU),
  360. Values(RelDiffToleranceVec<float, 4>(0.01).to_compare_obj()),
  361. Values(DIST_L1)));
  362. INSTANTIATE_TEST_CASE_P(FitLine3DMatVectorTestCPU, FitLine3DMatVectorTest,
  363. Combine(Values(CV_8UC1, CV_8SC1, CV_16UC1, CV_16SC1,
  364. CV_32SC1, CV_32FC1, CV_64FC1),
  365. Values(cv::Size(8, 0), cv::Size(1024, 0)),
  366. Values(-1),
  367. Values(IMGPROC_CPU),
  368. Values(RelDiffToleranceVec<float, 6>(0.01).to_compare_obj()),
  369. Values(DIST_L1, DIST_L2, DIST_L12, DIST_FAIR,
  370. DIST_WELSCH, DIST_HUBER)));
  371. INSTANTIATE_TEST_CASE_P(FitLine3DVector32STestCPU, FitLine3DVector32STest,
  372. Combine(Values(-1),
  373. Values(cv::Size(8, 0)),
  374. Values(-1),
  375. Values(IMGPROC_CPU),
  376. Values(RelDiffToleranceVec<float, 6>(0.01).to_compare_obj()),
  377. Values(DIST_L1)));
  378. INSTANTIATE_TEST_CASE_P(FitLine3DVector32FTestCPU, FitLine3DVector32FTest,
  379. Combine(Values(-1),
  380. Values(cv::Size(8, 0)),
  381. Values(-1),
  382. Values(IMGPROC_CPU),
  383. Values(RelDiffToleranceVec<float, 6>(0.01).to_compare_obj()),
  384. Values(DIST_L1)));
  385. INSTANTIATE_TEST_CASE_P(FitLine3DVector64FTestCPU, FitLine3DVector64FTest,
  386. Combine(Values(-1),
  387. Values(cv::Size(8, 0)),
  388. Values(-1),
  389. Values(IMGPROC_CPU),
  390. Values(RelDiffToleranceVec<float, 6>(0.01).to_compare_obj()),
  391. Values(DIST_L1)));
  392. INSTANTIATE_TEST_CASE_P(BGR2RGBTestCPU, BGR2RGBTest,
  393. Combine(Values(CV_8UC3),
  394. Values(cv::Size(1280, 720),
  395. cv::Size(640, 480)),
  396. Values(CV_8UC3),
  397. Values(IMGPROC_CPU),
  398. Values(AbsExact().to_compare_obj())));
  399. INSTANTIATE_TEST_CASE_P(RGB2GrayTestCPU, RGB2GrayTest,
  400. Combine(Values(CV_8UC3),
  401. Values(cv::Size(1280, 720),
  402. cv::Size(640, 480)),
  403. Values(CV_8UC1),
  404. Values(IMGPROC_CPU),
  405. Values(AbsExact().to_compare_obj())));
  406. INSTANTIATE_TEST_CASE_P(BGR2GrayTestCPU, BGR2GrayTest,
  407. Combine(Values(CV_8UC3),
  408. Values(cv::Size(1280, 720),
  409. cv::Size(640, 480)),
  410. Values(CV_8UC1),
  411. Values(IMGPROC_CPU),
  412. Values(AbsExact().to_compare_obj())));
  413. INSTANTIATE_TEST_CASE_P(RGB2YUVTestCPU, RGB2YUVTest,
  414. Combine(Values(CV_8UC3),
  415. Values(cv::Size(1280, 720),
  416. cv::Size(640, 480)),
  417. Values(CV_8UC3),
  418. Values(IMGPROC_CPU),
  419. Values(AbsExact().to_compare_obj())));
  420. INSTANTIATE_TEST_CASE_P(YUV2RGBTestCPU, YUV2RGBTest,
  421. Combine(Values(CV_8UC3),
  422. Values(cv::Size(1280, 720),
  423. cv::Size(640, 480)),
  424. Values(CV_8UC3),
  425. Values(IMGPROC_CPU),
  426. Values(AbsExact().to_compare_obj())));
  427. INSTANTIATE_TEST_CASE_P(BGR2I420TestCPU, BGR2I420Test,
  428. Combine(Values(CV_8UC3),
  429. Values(cv::Size(1280, 720),
  430. cv::Size(640, 480)),
  431. Values(CV_8UC1),
  432. Values(IMGPROC_CPU),
  433. Values(AbsExact().to_compare_obj())));
  434. INSTANTIATE_TEST_CASE_P(RGB2I420TestCPU, RGB2I420Test,
  435. Combine(Values(CV_8UC3),
  436. Values(cv::Size(1280, 720),
  437. cv::Size(640, 480)),
  438. Values(CV_8UC1),
  439. Values(IMGPROC_CPU),
  440. Values(AbsExact().to_compare_obj())));
  441. INSTANTIATE_TEST_CASE_P(I4202BGRTestCPU, I4202BGRTest,
  442. Combine(Values(CV_8UC1),
  443. Values(cv::Size(1280, 720),
  444. cv::Size(640, 480)),
  445. Values(CV_8UC3),
  446. Values(IMGPROC_CPU),
  447. Values(AbsExact().to_compare_obj())));
  448. INSTANTIATE_TEST_CASE_P(I4202RGBTestCPU, I4202RGBTest,
  449. Combine(Values(CV_8UC1),
  450. Values(cv::Size(1280, 720),
  451. cv::Size(640, 480)),
  452. Values(CV_8UC3),
  453. Values(IMGPROC_CPU),
  454. Values(AbsExact().to_compare_obj())));
  455. INSTANTIATE_TEST_CASE_P(NV12toRGBTestCPU, NV12toRGBTest,
  456. Combine(Values(CV_8UC1),
  457. Values(cv::Size(1280, 720),
  458. cv::Size(640, 480)),
  459. Values(CV_8UC3),
  460. Values(IMGPROC_CPU),
  461. Values(AbsExact().to_compare_obj())));
  462. INSTANTIATE_TEST_CASE_P(NV12toBGRTestCPU, NV12toBGRTest,
  463. Combine(Values(CV_8UC1),
  464. Values(cv::Size(1280, 720),
  465. cv::Size(640, 480)),
  466. Values(CV_8UC3),
  467. Values(IMGPROC_CPU),
  468. Values(AbsExact().to_compare_obj())));
  469. INSTANTIATE_TEST_CASE_P(NV12toGrayTestCPU, NV12toGrayTest,
  470. Combine(Values(CV_8UC1),
  471. Values(cv::Size(1280, 720),
  472. cv::Size(640, 480)),
  473. Values(CV_8UC1),
  474. Values(IMGPROC_CPU),
  475. Values(AbsExact().to_compare_obj())));
  476. INSTANTIATE_TEST_CASE_P(NV12toRGBpTestCPU, NV12toRGBpTest,
  477. Combine(Values(CV_8UC1),
  478. Values(cv::Size(1280, 720),
  479. cv::Size(640, 480)),
  480. Values(CV_8UC1),
  481. Values(IMGPROC_CPU),
  482. Values(AbsExact().to_compare_obj())));
  483. INSTANTIATE_TEST_CASE_P(NV12toBGRpTestCPU, NV12toBGRpTest,
  484. Combine(Values(CV_8UC1),
  485. Values(cv::Size(1280, 720),
  486. cv::Size(640, 480)),
  487. Values(CV_8UC3),
  488. Values(IMGPROC_CPU),
  489. Values(AbsExact().to_compare_obj())));
  490. INSTANTIATE_TEST_CASE_P(RGB2LabTestCPU, RGB2LabTest,
  491. Combine(Values(CV_8UC3),
  492. Values(cv::Size(1280, 720),
  493. cv::Size(640, 480)),
  494. Values(CV_8UC3),
  495. Values(IMGPROC_CPU),
  496. Values(AbsExact().to_compare_obj())));
  497. INSTANTIATE_TEST_CASE_P(BGR2LUVTestCPU, BGR2LUVTest,
  498. Combine(Values(CV_8UC3),
  499. Values(cv::Size(1280, 720),
  500. cv::Size(640, 480)),
  501. Values(CV_8UC3),
  502. Values(IMGPROC_CPU),
  503. Values(AbsExact().to_compare_obj())));
  504. INSTANTIATE_TEST_CASE_P(LUV2BGRTestCPU, LUV2BGRTest,
  505. Combine(Values(CV_8UC3),
  506. Values(cv::Size(1280, 720),
  507. cv::Size(640, 480)),
  508. Values(CV_8UC3),
  509. Values(IMGPROC_CPU),
  510. Values(AbsExact().to_compare_obj())));
  511. INSTANTIATE_TEST_CASE_P(BGR2YUVTestCPU, BGR2YUVTest,
  512. Combine(Values(CV_8UC3),
  513. Values(cv::Size(1280, 720),
  514. cv::Size(640, 480)),
  515. Values(CV_8UC3),
  516. Values(IMGPROC_CPU),
  517. Values(AbsExact().to_compare_obj())));
  518. INSTANTIATE_TEST_CASE_P(YUV2BGRTestCPU, YUV2BGRTest,
  519. Combine(Values(CV_8UC3),
  520. Values(cv::Size(1280, 720),
  521. cv::Size(640, 480)),
  522. Values(CV_8UC3),
  523. Values(IMGPROC_CPU),
  524. Values(AbsExact().to_compare_obj())));
  525. INSTANTIATE_TEST_CASE_P(RGB2HSVTestCPU, RGB2HSVTest,
  526. Combine(Values(CV_8UC3),
  527. Values(cv::Size(1280, 720),
  528. cv::Size(640, 480)),
  529. Values(CV_8UC3),
  530. Values(IMGPROC_CPU),
  531. Values(AbsExact().to_compare_obj())));
  532. INSTANTIATE_TEST_CASE_P(BayerGR2RGBTestCPU, BayerGR2RGBTest,
  533. Combine(Values(CV_8UC1),
  534. Values(cv::Size(1280, 720),
  535. cv::Size(640, 480)),
  536. Values(CV_8UC3),
  537. Values(IMGPROC_CPU),
  538. Values(AbsExact().to_compare_obj())));
  539. INSTANTIATE_TEST_CASE_P(RGB2YUV422TestCPU, RGB2YUV422Test,
  540. Combine(Values(CV_8UC3),
  541. Values(cv::Size(1280, 720),
  542. cv::Size(640, 480)),
  543. Values(CV_8UC2),
  544. Values(IMGPROC_CPU),
  545. Values(AbsTolerance(1).to_compare_obj())));
  546. } // opencv_test