1 #include "perf_precomp.hpp"
\r
5 //////////////////////////////////////////////////////
\r
8 GPU_PERF_TEST_1(BroxOpticalFlow, cv::gpu::DeviceInfo)
\r
10 cv::gpu::DeviceInfo devInfo = GetParam();
\r
11 cv::gpu::setDevice(devInfo.deviceID());
\r
13 cv::Mat frame0_host = readImage("gpu/opticalflow/frame0.png", cv::IMREAD_GRAYSCALE);
\r
14 ASSERT_FALSE(frame0_host.empty());
\r
16 cv::Mat frame1_host = readImage("gpu/opticalflow/frame1.png", cv::IMREAD_GRAYSCALE);
\r
17 ASSERT_FALSE(frame1_host.empty());
\r
19 frame0_host.convertTo(frame0_host, CV_32FC1, 1.0 / 255.0);
\r
20 frame1_host.convertTo(frame1_host, CV_32FC1, 1.0 / 255.0);
\r
22 cv::gpu::GpuMat frame0(frame0_host);
\r
23 cv::gpu::GpuMat frame1(frame1_host);
\r
27 cv::gpu::BroxOpticalFlow d_flow(0.197f /*alpha*/, 50.0f /*gamma*/, 0.8f /*scale_factor*/,
\r
28 10 /*inner_iterations*/, 77 /*outer_iterations*/, 10 /*solver_iterations*/);
\r
30 d_flow(frame0, frame1, u, v);
\r
36 d_flow(frame0, frame1, u, v);
\r
40 INSTANTIATE_TEST_CASE_P(Video, BroxOpticalFlow, ALL_DEVICES);
\r
42 //////////////////////////////////////////////////////
\r
43 // InterpolateFrames
\r
45 GPU_PERF_TEST_1(InterpolateFrames, cv::gpu::DeviceInfo)
\r
47 cv::gpu::DeviceInfo devInfo = GetParam();
\r
48 cv::gpu::setDevice(devInfo.deviceID());
\r
50 cv::Mat frame0_host = readImage("gpu/perf/aloe.jpg", cv::IMREAD_GRAYSCALE);
\r
51 ASSERT_FALSE(frame0_host.empty());
\r
53 cv::Mat frame1_host = readImage("gpu/perf/aloeR.jpg", cv::IMREAD_GRAYSCALE);
\r
54 ASSERT_FALSE(frame1_host.empty());
\r
56 frame0_host.convertTo(frame0_host, CV_32FC1, 1.0 / 255.0);
\r
57 frame1_host.convertTo(frame1_host, CV_32FC1, 1.0 / 255.0);
\r
59 cv::gpu::GpuMat frame0(frame0_host);
\r
60 cv::gpu::GpuMat frame1(frame1_host);
\r
61 cv::gpu::GpuMat fu, fv;
\r
62 cv::gpu::GpuMat bu, bv;
\r
64 cv::gpu::BroxOpticalFlow d_flow(0.197f /*alpha*/, 50.0f /*gamma*/, 0.8f /*scale_factor*/,
\r
65 10 /*inner_iterations*/, 77 /*outer_iterations*/, 10 /*solver_iterations*/);
\r
67 d_flow(frame0, frame1, fu, fv);
\r
68 d_flow(frame1, frame0, bu, bv);
\r
70 cv::gpu::GpuMat newFrame;
\r
71 cv::gpu::GpuMat buf;
\r
73 cv::gpu::interpolateFrames(frame0, frame1, fu, fv, bu, bv, 0.5f, newFrame, buf);
\r
77 cv::gpu::interpolateFrames(frame0, frame1, fu, fv, bu, bv, 0.5f, newFrame, buf);
\r
81 INSTANTIATE_TEST_CASE_P(Video, InterpolateFrames, ALL_DEVICES);
\r
83 //////////////////////////////////////////////////////
\r
84 // CreateOpticalFlowNeedleMap
\r
86 GPU_PERF_TEST_1(CreateOpticalFlowNeedleMap, cv::gpu::DeviceInfo)
\r
88 cv::gpu::DeviceInfo devInfo = GetParam();
\r
89 cv::gpu::setDevice(devInfo.deviceID());
\r
91 cv::Mat frame0_host = readImage("gpu/perf/aloe.jpg", cv::IMREAD_GRAYSCALE);
\r
92 ASSERT_FALSE(frame0_host.empty());
\r
94 cv::Mat frame1_host = readImage("gpu/perf/aloeR.jpg", cv::IMREAD_GRAYSCALE);
\r
95 ASSERT_FALSE(frame1_host.empty());
\r
97 frame0_host.convertTo(frame0_host, CV_32FC1, 1.0 / 255.0);
\r
98 frame1_host.convertTo(frame1_host, CV_32FC1, 1.0 / 255.0);
\r
100 cv::gpu::GpuMat frame0(frame0_host);
\r
101 cv::gpu::GpuMat frame1(frame1_host);
\r
102 cv::gpu::GpuMat u, v;
\r
104 cv::gpu::BroxOpticalFlow d_flow(0.197f /*alpha*/, 50.0f /*gamma*/, 0.8f /*scale_factor*/,
\r
105 10 /*inner_iterations*/, 77 /*outer_iterations*/, 10 /*solver_iterations*/);
\r
107 d_flow(frame0, frame1, u, v);
\r
109 cv::gpu::GpuMat vertex, colors;
\r
111 cv::gpu::createOpticalFlowNeedleMap(u, v, vertex, colors);
\r
115 cv::gpu::createOpticalFlowNeedleMap(u, v, vertex, colors);
\r
119 INSTANTIATE_TEST_CASE_P(Video, CreateOpticalFlowNeedleMap, ALL_DEVICES);
\r
121 //////////////////////////////////////////////////////
\r
122 // GoodFeaturesToTrack
\r
124 IMPLEMENT_PARAM_CLASS(MinDistance, double)
\r
126 GPU_PERF_TEST(GoodFeaturesToTrack, cv::gpu::DeviceInfo, MinDistance)
\r
128 cv::gpu::DeviceInfo devInfo = GET_PARAM(0);
\r
129 cv::gpu::setDevice(devInfo.deviceID());
\r
131 double minDistance = GET_PARAM(1);
\r
133 cv::Mat image_host = readImage("gpu/perf/aloe.jpg", cv::IMREAD_GRAYSCALE);
\r
134 ASSERT_FALSE(image_host.empty());
\r
136 cv::gpu::GoodFeaturesToTrackDetector_GPU detector(8000, 0.01, minDistance);
\r
138 cv::gpu::GpuMat image(image_host);
\r
139 cv::gpu::GpuMat pts;
\r
141 detector(image, pts);
\r
145 detector(image, pts);
\r
149 INSTANTIATE_TEST_CASE_P(Video, GoodFeaturesToTrack, testing::Combine(
\r
151 testing::Values(MinDistance(0.0), MinDistance(3.0))));
\r
153 //////////////////////////////////////////////////////
\r
154 // PyrLKOpticalFlowSparse
\r
156 IMPLEMENT_PARAM_CLASS(GraySource, bool)
\r
157 IMPLEMENT_PARAM_CLASS(Points, int)
\r
158 IMPLEMENT_PARAM_CLASS(WinSize, int)
\r
159 IMPLEMENT_PARAM_CLASS(Levels, int)
\r
160 IMPLEMENT_PARAM_CLASS(Iters, int)
\r
162 GPU_PERF_TEST(PyrLKOpticalFlowSparse, cv::gpu::DeviceInfo, GraySource, Points, WinSize, Levels, Iters)
\r
164 cv::gpu::DeviceInfo devInfo = GET_PARAM(0);
\r
165 cv::gpu::setDevice(devInfo.deviceID());
\r
167 bool useGray = GET_PARAM(1);
\r
168 int points = GET_PARAM(2);
\r
169 int winSize = GET_PARAM(3);
\r
170 int levels = GET_PARAM(4);
\r
171 int iters = GET_PARAM(5);
\r
173 cv::Mat frame0_host = readImage("gpu/opticalflow/frame0.png", useGray ? cv::IMREAD_GRAYSCALE : cv::IMREAD_COLOR);
\r
174 ASSERT_FALSE(frame0_host.empty());
\r
176 cv::Mat frame1_host = readImage("gpu/opticalflow/frame1.png", useGray ? cv::IMREAD_GRAYSCALE : cv::IMREAD_COLOR);
\r
177 ASSERT_FALSE(frame1_host.empty());
\r
179 cv::Mat gray_frame;
\r
181 gray_frame = frame0_host;
\r
183 cv::cvtColor(frame0_host, gray_frame, cv::COLOR_BGR2GRAY);
\r
185 cv::gpu::GpuMat pts;
\r
187 cv::gpu::GoodFeaturesToTrackDetector_GPU detector(points, 0.01, 0.0);
\r
188 detector(cv::gpu::GpuMat(gray_frame), pts);
\r
190 cv::gpu::PyrLKOpticalFlow pyrLK;
\r
191 pyrLK.winSize = cv::Size(winSize, winSize);
\r
192 pyrLK.maxLevel = levels - 1;
\r
193 pyrLK.iters = iters;
\r
195 cv::gpu::GpuMat frame0(frame0_host);
\r
196 cv::gpu::GpuMat frame1(frame1_host);
\r
197 cv::gpu::GpuMat nextPts;
\r
198 cv::gpu::GpuMat status;
\r
200 pyrLK.sparse(frame0, frame1, pts, nextPts, status);
\r
204 pyrLK.sparse(frame0, frame1, pts, nextPts, status);
\r
208 INSTANTIATE_TEST_CASE_P(Video, PyrLKOpticalFlowSparse, testing::Combine(
\r
210 testing::Values(GraySource(true), GraySource(false)),
\r
211 testing::Values(Points(1000), Points(2000), Points(4000), Points(8000)),
\r
212 testing::Values(WinSize(9), WinSize(13), WinSize(17), WinSize(21)),
\r
213 testing::Values(Levels(1), Levels(2), Levels(3)),
\r
214 testing::Values(Iters(1), Iters(10), Iters(30))));
\r
216 //////////////////////////////////////////////////////
\r
217 // PyrLKOpticalFlowDense
\r
219 GPU_PERF_TEST(PyrLKOpticalFlowDense, cv::gpu::DeviceInfo, WinSize, Levels, Iters)
\r
221 cv::gpu::DeviceInfo devInfo = GET_PARAM(0);
\r
222 cv::gpu::setDevice(devInfo.deviceID());
\r
224 int winSize = GET_PARAM(1);
\r
225 int levels = GET_PARAM(2);
\r
226 int iters = GET_PARAM(3);
\r
228 cv::Mat frame0_host = readImage("gpu/opticalflow/frame0.png", cv::IMREAD_GRAYSCALE);
\r
229 ASSERT_FALSE(frame0_host.empty());
\r
231 cv::Mat frame1_host = readImage("gpu/opticalflow/frame1.png", cv::IMREAD_GRAYSCALE);
\r
232 ASSERT_FALSE(frame1_host.empty());
\r
234 cv::gpu::GpuMat frame0(frame0_host);
\r
235 cv::gpu::GpuMat frame1(frame1_host);
\r
239 cv::gpu::PyrLKOpticalFlow pyrLK;
\r
241 pyrLK.winSize = cv::Size(winSize, winSize);
\r
242 pyrLK.maxLevel = levels - 1;
\r
243 pyrLK.iters = iters;
\r
245 pyrLK.dense(frame0, frame1, u, v);
\r
251 pyrLK.dense(frame0, frame1, u, v);
\r
255 INSTANTIATE_TEST_CASE_P(Video, PyrLKOpticalFlowDense, testing::Combine(
\r
257 testing::Values(WinSize(3), WinSize(5), WinSize(7), WinSize(9), WinSize(13), WinSize(17), WinSize(21)),
\r
258 testing::Values(Levels(1), Levels(2), Levels(3)),
\r
259 testing::Values(Iters(1), Iters(10))));
\r
261 //////////////////////////////////////////////////////
\r
262 // FarnebackOpticalFlowTest
\r
264 GPU_PERF_TEST_1(FarnebackOpticalFlowTest, cv::gpu::DeviceInfo)
\r
266 cv::gpu::DeviceInfo devInfo = GetParam();
\r
267 cv::gpu::setDevice(devInfo.deviceID());
\r
269 cv::Mat frame0_host = readImage("gpu/opticalflow/frame0.png", cv::IMREAD_GRAYSCALE);
\r
270 ASSERT_FALSE(frame0_host.empty());
\r
272 cv::Mat frame1_host = readImage("gpu/opticalflow/frame1.png", cv::IMREAD_GRAYSCALE);
\r
273 ASSERT_FALSE(frame1_host.empty());
\r
275 cv::gpu::GpuMat frame0(frame0_host);
\r
276 cv::gpu::GpuMat frame1(frame1_host);
\r
280 cv::gpu::FarnebackOpticalFlow farneback;
\r
282 farneback(frame0, frame1, u, v);
\r
288 farneback(frame0, frame1, u, v);
\r
292 INSTANTIATE_TEST_CASE_P(Video, FarnebackOpticalFlowTest, ALL_DEVICES);
\r
294 //////////////////////////////////////////////////////
\r
297 GPU_PERF_TEST(FGDStatModel, cv::gpu::DeviceInfo, std::string)
\r
299 cv::gpu::DeviceInfo devInfo = GET_PARAM(0);
\r
300 cv::gpu::setDevice(devInfo.deviceID());
\r
302 std::string inputFile = perf::TestBase::getDataPath(std::string("gpu/video/") + GET_PARAM(1));
\r
304 cv::VideoCapture cap(inputFile);
\r
305 ASSERT_TRUE(cap.isOpened());
\r
309 ASSERT_FALSE(frame.empty());
\r
311 cv::gpu::GpuMat d_frame(frame);
\r
312 cv::gpu::FGDStatModel d_model(4);
\r
313 d_model.create(d_frame);
\r
317 for (int i = 0; i < 10; ++i)
\r
320 ASSERT_FALSE(frame.empty());
\r
322 d_frame.upload(frame);
\r
324 startTimer(); next();
\r
325 d_model.update(d_frame);
\r
330 INSTANTIATE_TEST_CASE_P(Video, FGDStatModel, testing::Combine(
\r
332 testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi"))));
\r
334 //////////////////////////////////////////////////////
\r
337 IMPLEMENT_PARAM_CLASS(LearningRate, double)
\r
339 GPU_PERF_TEST(MOG, cv::gpu::DeviceInfo, std::string, Channels, LearningRate)
\r
341 cv::gpu::DeviceInfo devInfo = GET_PARAM(0);
\r
342 cv::gpu::setDevice(devInfo.deviceID());
\r
344 std::string inputFile = perf::TestBase::getDataPath(std::string("gpu/video/") + GET_PARAM(1));
\r
345 int cn = GET_PARAM(2);
\r
346 double learningRate = GET_PARAM(3);
\r
348 cv::VideoCapture cap(inputFile);
\r
349 ASSERT_TRUE(cap.isOpened());
\r
353 cv::gpu::GpuMat d_frame;
\r
354 cv::gpu::MOG_GPU mog;
\r
355 cv::gpu::GpuMat foreground;
\r
358 ASSERT_FALSE(frame.empty());
\r
364 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
\r
366 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
\r
367 cv::swap(temp, frame);
\r
370 d_frame.upload(frame);
\r
372 mog(d_frame, foreground, learningRate);
\r
374 for (int i = 0; i < 10; ++i)
\r
377 ASSERT_FALSE(frame.empty());
\r
383 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
\r
385 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
\r
386 cv::swap(temp, frame);
\r
389 d_frame.upload(frame);
\r
391 startTimer(); next();
\r
392 mog(d_frame, foreground, learningRate);
\r
397 INSTANTIATE_TEST_CASE_P(Video, MOG, testing::Combine(
\r
399 testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi")),
\r
400 testing::Values(Channels(1), Channels(3), Channels(4)),
\r
401 testing::Values(LearningRate(0.0), LearningRate(0.01))));
\r
403 //////////////////////////////////////////////////////
\r
406 GPU_PERF_TEST(MOG2_update, cv::gpu::DeviceInfo, std::string, Channels)
\r
408 cv::gpu::DeviceInfo devInfo = GET_PARAM(0);
\r
409 cv::gpu::setDevice(devInfo.deviceID());
\r
411 std::string inputFile = perf::TestBase::getDataPath(std::string("gpu/video/") + GET_PARAM(1));
\r
412 int cn = GET_PARAM(2);
\r
414 cv::VideoCapture cap(inputFile);
\r
415 ASSERT_TRUE(cap.isOpened());
\r
419 cv::gpu::GpuMat d_frame;
\r
420 cv::gpu::MOG2_GPU mog2;
\r
421 cv::gpu::GpuMat foreground;
\r
424 ASSERT_FALSE(frame.empty());
\r
430 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
\r
432 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
\r
433 cv::swap(temp, frame);
\r
436 d_frame.upload(frame);
\r
438 mog2(d_frame, foreground);
\r
440 for (int i = 0; i < 10; ++i)
\r
443 ASSERT_FALSE(frame.empty());
\r
449 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
\r
451 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
\r
452 cv::swap(temp, frame);
\r
455 d_frame.upload(frame);
\r
457 startTimer(); next();
\r
458 mog2(d_frame, foreground);
\r
463 INSTANTIATE_TEST_CASE_P(Video, MOG2_update, testing::Combine(
\r
465 testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi")),
\r
466 testing::Values(Channels(1), Channels(3), Channels(4))));
\r
468 GPU_PERF_TEST(MOG2_getBackgroundImage, cv::gpu::DeviceInfo, std::string, Channels)
\r
470 cv::gpu::DeviceInfo devInfo = GET_PARAM(0);
\r
471 cv::gpu::setDevice(devInfo.deviceID());
\r
473 std::string inputFile = perf::TestBase::getDataPath(std::string("gpu/video/") + GET_PARAM(1));
\r
474 int cn = GET_PARAM(2);
\r
476 cv::VideoCapture cap(inputFile);
\r
477 ASSERT_TRUE(cap.isOpened());
\r
481 cv::gpu::GpuMat d_frame;
\r
482 cv::gpu::MOG2_GPU mog2;
\r
483 cv::gpu::GpuMat foreground;
\r
485 for (int i = 0; i < 10; ++i)
\r
488 ASSERT_FALSE(frame.empty());
\r
494 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
\r
496 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
\r
497 cv::swap(temp, frame);
\r
500 d_frame.upload(frame);
\r
502 mog2(d_frame, foreground);
\r
505 cv::gpu::GpuMat background;
\r
506 mog2.getBackgroundImage(background);
\r
510 mog2.getBackgroundImage(background);
\r
514 INSTANTIATE_TEST_CASE_P(Video, MOG2_getBackgroundImage, testing::Combine(
\r
516 testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi")),
\r
517 testing::Values(Channels(1), Channels(3), Channels(4))));
\r
519 //////////////////////////////////////////////////////
\r
522 GPU_PERF_TEST(VIBE, cv::gpu::DeviceInfo, std::string, Channels)
\r
524 cv::gpu::DeviceInfo devInfo = GET_PARAM(0);
\r
525 cv::gpu::setDevice(devInfo.deviceID());
\r
527 std::string inputFile = perf::TestBase::getDataPath(std::string("gpu/video/") + GET_PARAM(1));
\r
528 int cn = GET_PARAM(2);
\r
530 cv::VideoCapture cap(inputFile);
\r
531 ASSERT_TRUE(cap.isOpened());
\r
535 ASSERT_FALSE(frame.empty());
\r
541 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
\r
543 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
\r
544 cv::swap(temp, frame);
\r
547 cv::gpu::GpuMat d_frame(frame);
\r
548 cv::gpu::VIBE_GPU vibe;
\r
549 cv::gpu::GpuMat foreground;
\r
551 vibe(d_frame, foreground);
\r
553 for (int i = 0; i < 10; ++i)
\r
556 ASSERT_FALSE(frame.empty());
\r
562 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
\r
564 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
\r
565 cv::swap(temp, frame);
\r
568 d_frame.upload(frame);
\r
570 startTimer(); next();
\r
571 vibe(d_frame, foreground);
\r
576 INSTANTIATE_TEST_CASE_P(Video, VIBE, testing::Combine(
\r
578 testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi")),
\r
579 testing::Values(Channels(1), Channels(3), Channels(4))));
\r
581 //////////////////////////////////////////////////////
\r
584 IMPLEMENT_PARAM_CLASS(MaxFeatures, int)
\r
586 GPU_PERF_TEST(GMG, cv::gpu::DeviceInfo, std::string, Channels, MaxFeatures)
\r
588 cv::gpu::DeviceInfo devInfo = GET_PARAM(0);
\r
589 cv::gpu::setDevice(devInfo.deviceID());
\r
590 std::string inputFile = perf::TestBase::getDataPath(std::string("gpu/video/") + GET_PARAM(1));
\r
591 int cn = GET_PARAM(2);
\r
592 int maxFeatures = GET_PARAM(3);
\r
594 cv::VideoCapture cap(inputFile);
\r
595 ASSERT_TRUE(cap.isOpened());
\r
599 ASSERT_FALSE(frame.empty());
\r
605 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
\r
607 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
\r
608 cv::swap(temp, frame);
\r
611 cv::gpu::GpuMat d_frame(frame);
\r
612 cv::gpu::GpuMat d_fgmask;
\r
614 cv::gpu::GMG_GPU gmg;
\r
615 gmg.maxFeatures = maxFeatures;
\r
617 gmg(d_frame, d_fgmask);
\r
619 for (int i = 0; i < 150; ++i)
\r
624 cap.open(inputFile);
\r
632 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
\r
634 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
\r
635 cv::swap(temp, frame);
\r
638 d_frame.upload(frame);
\r
640 startTimer(); next();
\r
641 gmg(d_frame, d_fgmask);
\r
646 INSTANTIATE_TEST_CASE_P(Video, GMG, testing::Combine(
\r
648 testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi")),
\r
649 testing::Values(Channels(1), Channels(3), Channels(4)),
\r
650 testing::Values(MaxFeatures(20), MaxFeatures(40), MaxFeatures(60))));
\r
652 //////////////////////////////////////////////////////
\r
657 GPU_PERF_TEST(VideoWriter, cv::gpu::DeviceInfo, std::string)
\r
659 const double FPS = 25.0;
\r
661 cv::gpu::DeviceInfo devInfo = GET_PARAM(0);
\r
662 cv::gpu::setDevice(devInfo.deviceID());
\r
664 std::string inputFile = perf::TestBase::getDataPath(std::string("gpu/video/") + GET_PARAM(1));
\r
665 std::string outputFile = cv::tempfile(".avi");
\r
667 cv::VideoCapture reader(inputFile);
\r
668 ASSERT_TRUE( reader.isOpened() );
\r
670 cv::gpu::VideoWriter_GPU d_writer;
\r
673 cv::gpu::GpuMat d_frame;
\r
677 for (int i = 0; i < 10; ++i)
\r
680 ASSERT_FALSE(frame.empty());
\r
682 d_frame.upload(frame);
\r
684 if (!d_writer.isOpened())
\r
685 d_writer.open(outputFile, frame.size(), FPS);
\r
687 startTimer(); next();
\r
688 d_writer.write(d_frame);
\r
693 INSTANTIATE_TEST_CASE_P(Video, VideoWriter, testing::Combine(
\r
695 testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi"))));
\r
699 //////////////////////////////////////////////////////
\r
702 GPU_PERF_TEST(VideoReader, cv::gpu::DeviceInfo, std::string)
\r
704 cv::gpu::DeviceInfo devInfo = GET_PARAM(0);
\r
705 cv::gpu::setDevice(devInfo.deviceID());
\r
707 std::string inputFile = perf::TestBase::getDataPath(std::string("gpu/video/") + GET_PARAM(1));
\r
709 cv::gpu::VideoReader_GPU reader(inputFile);
\r
710 ASSERT_TRUE( reader.isOpened() );
\r
712 cv::gpu::GpuMat frame;
\r
714 reader.read(frame);
\r
720 reader.read(frame);
\r
724 INSTANTIATE_TEST_CASE_P(Video, VideoReader, testing::Combine(
\r
726 testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi"))));
\r