CLAHE Python bindings
[profile/ivi/opencv.git] / modules / highgui / perf / perf_output.cpp
1 #include "perf_precomp.hpp"
2
3 #if BUILD_WITH_VIDEO_OUTPUT_SUPPORT
4
5 using namespace std;
6 using namespace cv;
7 using namespace perf;
8 using std::tr1::make_tuple;
9 using std::tr1::get;
10
11 typedef std::tr1::tuple<String, bool> VideoWriter_Writing_t;
12 typedef perf::TestBaseWithParam<VideoWriter_Writing_t> VideoWriter_Writing;
13
14 PERF_TEST_P(VideoWriter_Writing, WriteFrame,
15             testing::Combine( testing::Values( "python/images/QCIF_00.bmp",
16                                                "python/images/QCIF_01.bmp",
17                                                "python/images/QCIF_02.bmp",
18                                                "python/images/QCIF_03.bmp",
19                                                "python/images/QCIF_04.bmp",
20                                                "python/images/QCIF_05.bmp" ),
21             testing::Bool()))
22 {
23   string filename = getDataPath(get<0>(GetParam()));
24   bool isColor = get<1>(GetParam());
25
26   VideoWriter writer(cv::tempfile(".avi"), CV_FOURCC('X', 'V', 'I', 'D'), 25, cv::Size(640, 480), isColor);
27
28   TEST_CYCLE() { Mat image = imread(filename, 1); writer << image; }
29
30   bool dummy = writer.isOpened();
31   SANITY_CHECK(dummy);
32 }
33
34 #endif // BUILD_WITH_VIDEO_OUTPUT_SUPPORT