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.
5 // Copyright (C) 2018 Intel Corporation
8 #include "../test_precomp.hpp"
9 #include "../common/gapi_render_tests.hpp"
14 INSTANTIATE_TEST_CASE_P(RenderTextTestCPU, RenderTextTest,
15 Combine(Values(cv::Size(1280, 720),
19 Values(Points{Point(5, 30), Point(40, 70), Point(-1, -1)}),
20 /* Font face */ Values(FONT_HERSHEY_SIMPLEX),
21 /* Font scale */ Values(2),
22 /* Color */ Values(cv::Scalar(255, 0, 0)),
23 /* Thickness */ Values(1),
24 /* Line type */ Values(LINE_8),
25 /* Bottom left origin */ testing::Bool(),
26 /* NV12 format or not */ testing::Bool()));
28 INSTANTIATE_TEST_CASE_P(RenderRectTestCPU, RenderRectTest,
29 Combine(Values(cv::Size(1280, 720),
32 Values(Rects{Rect(5, 30, 40, 50),
34 /* Edge case, rectangle will not be drawn */ Rect(75, 110, -40, 50),
35 /* Edge case, rectangle will not be drawn */ Rect(70, 100, 0, 50)}),
36 /* Color */ Values(cv::Scalar(255, 0, 0)),
37 /* Thickness */ Values(1),
38 /* Line type */ Values(LINE_8),
39 /* Shift */ Values(0),
40 /* NV12 format or not */ testing::Bool()));
42 INSTANTIATE_TEST_CASE_P(RenderCircleTestCPU, RenderCircleTest,
43 Combine(Values(cv::Size(1280, 720),
46 Values(Points{Point(5, 30), Point(40, 70), Point(75, 110)}),
47 /* Radius */ Values(5),
48 /* Color */ Values(cv::Scalar(255, 0, 0)),
49 /* Thickness */ Values(1),
50 /* Line type */ Values(LINE_8),
51 /* Shift */ Values(0),
52 /* NV12 format or not */ testing::Bool()));
54 INSTANTIATE_TEST_CASE_P(RenderLineTestCPU, RenderLineTest,
55 Combine(Values(cv::Size(1280, 720),
58 Values(VecOfPairOfPoints{ {Point(5, 30) , Point(5, 40) },
59 {Point(40, 70) , Point(50, 70) },
60 {Point(75, 110), Point(100, 115)} }),
61 /* Color */ Values(cv::Scalar(255, 0, 0)),
62 /* Thickness */ Values(1),
63 /* Line type */ Values(LINE_8),
64 /* Shift */ Values(0),
65 /* NV12 format or not */ testing::Bool()));