1 #include "perf_precomp.hpp"
4 using namespace testing;
8 template<> void Ptr<CvBGStatModel>::delete_obj()
10 cvReleaseBGStatModel(&obj);
16 //////////////////////////////////////////////////////
19 typedef pair<string, string> pair_string;
21 DEF_PARAM_TEST_1(ImagePair, pair_string);
23 PERF_TEST_P(ImagePair, Video_BroxOpticalFlow,
24 Values<pair_string>(make_pair("gpu/opticalflow/frame0.png", "gpu/opticalflow/frame1.png")))
28 cv::Mat frame0 = readImage(GetParam().first, cv::IMREAD_GRAYSCALE);
29 ASSERT_FALSE(frame0.empty());
31 cv::Mat frame1 = readImage(GetParam().second, cv::IMREAD_GRAYSCALE);
32 ASSERT_FALSE(frame1.empty());
34 frame0.convertTo(frame0, CV_32FC1, 1.0 / 255.0);
35 frame1.convertTo(frame1, CV_32FC1, 1.0 / 255.0);
39 cv::gpu::GpuMat d_frame0(frame0);
40 cv::gpu::GpuMat d_frame1(frame1);
44 cv::gpu::BroxOpticalFlow d_flow(0.197f /*alpha*/, 50.0f /*gamma*/, 0.8f /*scale_factor*/,
45 10 /*inner_iterations*/, 77 /*outer_iterations*/, 10 /*solver_iterations*/);
47 d_flow(d_frame0, d_frame1, d_u, d_v);
51 d_flow(d_frame0, d_frame1, d_u, d_v);
54 GPU_SANITY_CHECK(d_u);
55 GPU_SANITY_CHECK(d_v);
59 FAIL() << "No such CPU implementation analogy";
63 //////////////////////////////////////////////////////
66 PERF_TEST_P(ImagePair, Video_InterpolateFrames,
67 Values<pair_string>(make_pair("gpu/opticalflow/frame0.png", "gpu/opticalflow/frame1.png")))
69 cv::Mat frame0 = readImage(GetParam().first, cv::IMREAD_GRAYSCALE);
70 ASSERT_FALSE(frame0.empty());
72 cv::Mat frame1 = readImage(GetParam().second, cv::IMREAD_GRAYSCALE);
73 ASSERT_FALSE(frame1.empty());
75 frame0.convertTo(frame0, CV_32FC1, 1.0 / 255.0);
76 frame1.convertTo(frame1, CV_32FC1, 1.0 / 255.0);
80 cv::gpu::GpuMat d_frame0(frame0);
81 cv::gpu::GpuMat d_frame1(frame1);
82 cv::gpu::GpuMat d_fu, d_fv;
83 cv::gpu::GpuMat d_bu, d_bv;
85 cv::gpu::BroxOpticalFlow d_flow(0.197f /*alpha*/, 50.0f /*gamma*/, 0.8f /*scale_factor*/,
86 10 /*inner_iterations*/, 77 /*outer_iterations*/, 10 /*solver_iterations*/);
88 d_flow(d_frame0, d_frame1, d_fu, d_fv);
89 d_flow(d_frame1, d_frame0, d_bu, d_bv);
91 cv::gpu::GpuMat d_newFrame;
92 cv::gpu::GpuMat d_buf;
94 cv::gpu::interpolateFrames(d_frame0, d_frame1, d_fu, d_fv, d_bu, d_bv, 0.5f, d_newFrame, d_buf);
98 cv::gpu::interpolateFrames(d_frame0, d_frame1, d_fu, d_fv, d_bu, d_bv, 0.5f, d_newFrame, d_buf);
101 GPU_SANITY_CHECK(d_fu);
102 GPU_SANITY_CHECK(d_fv);
103 GPU_SANITY_CHECK(d_bu);
104 GPU_SANITY_CHECK(d_bv);
108 FAIL() << "No such CPU implementation analogy";
112 //////////////////////////////////////////////////////
113 // CreateOpticalFlowNeedleMap
115 PERF_TEST_P(ImagePair, Video_CreateOpticalFlowNeedleMap,
116 Values<pair_string>(make_pair("gpu/opticalflow/frame0.png", "gpu/opticalflow/frame1.png")))
118 cv::Mat frame0 = readImage(GetParam().first, cv::IMREAD_GRAYSCALE);
119 ASSERT_FALSE(frame0.empty());
121 cv::Mat frame1 = readImage(GetParam().second, cv::IMREAD_GRAYSCALE);
122 ASSERT_FALSE(frame1.empty());
124 frame0.convertTo(frame0, CV_32FC1, 1.0 / 255.0);
125 frame1.convertTo(frame1, CV_32FC1, 1.0 / 255.0);
129 cv::gpu::GpuMat d_frame0(frame0);
130 cv::gpu::GpuMat d_frame1(frame1);
134 cv::gpu::BroxOpticalFlow d_flow(0.197f /*alpha*/, 50.0f /*gamma*/, 0.8f /*scale_factor*/,
135 10 /*inner_iterations*/, 77 /*outer_iterations*/, 10 /*solver_iterations*/);
137 d_flow(d_frame0, d_frame1, d_u, d_v);
139 cv::gpu::GpuMat d_vertex, d_colors;
141 cv::gpu::createOpticalFlowNeedleMap(d_u, d_v, d_vertex, d_colors);
145 cv::gpu::createOpticalFlowNeedleMap(d_u, d_v, d_vertex, d_colors);
148 GPU_SANITY_CHECK(d_vertex);
149 GPU_SANITY_CHECK(d_colors);
153 FAIL() << "No such CPU implementation analogy";
157 //////////////////////////////////////////////////////
158 // GoodFeaturesToTrack
160 DEF_PARAM_TEST(Image_MinDistance, string, double);
162 PERF_TEST_P(Image_MinDistance, Video_GoodFeaturesToTrack,
163 Combine(Values<string>("gpu/perf/aloe.png"), Values(0.0, 3.0)))
165 string fileName = GET_PARAM(0);
166 double minDistance = GET_PARAM(1);
168 cv::Mat image = readImage(fileName, cv::IMREAD_GRAYSCALE);
169 ASSERT_FALSE(image.empty());
173 cv::gpu::GoodFeaturesToTrackDetector_GPU d_detector(8000, 0.01, minDistance);
175 cv::gpu::GpuMat d_image(image);
176 cv::gpu::GpuMat d_pts;
178 d_detector(d_image, d_pts);
182 d_detector(d_image, d_pts);
185 GPU_SANITY_CHECK(d_pts);
191 cv::goodFeaturesToTrack(image, pts, 8000, 0.01, minDistance);
195 cv::goodFeaturesToTrack(image, pts, 8000, 0.01, minDistance);
198 CPU_SANITY_CHECK(pts);
202 //////////////////////////////////////////////////////
203 // PyrLKOpticalFlowSparse
205 DEF_PARAM_TEST(ImagePair_Gray_NPts_WinSz_Levels_Iters, pair_string, bool, int, int, int, int);
207 PERF_TEST_P(ImagePair_Gray_NPts_WinSz_Levels_Iters, Video_PyrLKOpticalFlowSparse, Combine(
208 Values<pair_string>(make_pair("gpu/opticalflow/frame0.png", "gpu/opticalflow/frame1.png")),
210 Values(1000, 2000, 4000, 8000),
211 Values(9, 13, 17, 21),
217 pair_string imagePair = GET_PARAM(0);
218 bool useGray = GET_PARAM(1);
219 int points = GET_PARAM(2);
220 int winSize = GET_PARAM(3);
221 int levels = GET_PARAM(4);
222 int iters = GET_PARAM(5);
224 cv::Mat frame0 = readImage(imagePair.first, useGray ? cv::IMREAD_GRAYSCALE : cv::IMREAD_COLOR);
225 ASSERT_FALSE(frame0.empty());
227 cv::Mat frame1 = readImage(imagePair.second, useGray ? cv::IMREAD_GRAYSCALE : cv::IMREAD_COLOR);
228 ASSERT_FALSE(frame1.empty());
234 cv::cvtColor(frame0, gray_frame, cv::COLOR_BGR2GRAY);
237 cv::goodFeaturesToTrack(gray_frame, pts, points, 0.01, 0.0);
241 cv::gpu::GpuMat d_pts(pts.reshape(2, 1));
243 cv::gpu::PyrLKOpticalFlow d_pyrLK;
244 d_pyrLK.winSize = cv::Size(winSize, winSize);
245 d_pyrLK.maxLevel = levels - 1;
246 d_pyrLK.iters = iters;
248 cv::gpu::GpuMat d_frame0(frame0);
249 cv::gpu::GpuMat d_frame1(frame1);
250 cv::gpu::GpuMat d_nextPts;
251 cv::gpu::GpuMat d_status;
253 d_pyrLK.sparse(d_frame0, d_frame1, d_pts, d_nextPts, d_status);
257 d_pyrLK.sparse(d_frame0, d_frame1, d_pts, d_nextPts, d_status);
260 GPU_SANITY_CHECK(d_status);
267 cv::calcOpticalFlowPyrLK(frame0, frame1, pts, nextPts, status, cv::noArray(),
268 cv::Size(winSize, winSize), levels - 1,
269 cv::TermCriteria(cv::TermCriteria::COUNT + cv::TermCriteria::EPS, iters, 0.01));
273 cv::calcOpticalFlowPyrLK(frame0, frame1, pts, nextPts, status, cv::noArray(),
274 cv::Size(winSize, winSize), levels - 1,
275 cv::TermCriteria(cv::TermCriteria::COUNT + cv::TermCriteria::EPS, iters, 0.01));
278 CPU_SANITY_CHECK(status);
282 //////////////////////////////////////////////////////
283 // PyrLKOpticalFlowDense
285 DEF_PARAM_TEST(ImagePair_WinSz_Levels_Iters, pair_string, int, int, int);
287 PERF_TEST_P(ImagePair_WinSz_Levels_Iters, Video_PyrLKOpticalFlowDense, Combine(
288 Values<pair_string>(make_pair("gpu/opticalflow/frame0.png", "gpu/opticalflow/frame1.png")),
289 Values(3, 5, 7, 9, 13, 17, 21),
295 pair_string imagePair = GET_PARAM(0);
296 int winSize = GET_PARAM(1);
297 int levels = GET_PARAM(2);
298 int iters = GET_PARAM(3);
300 cv::Mat frame0 = readImage(imagePair.first, cv::IMREAD_GRAYSCALE);
301 ASSERT_FALSE(frame0.empty());
303 cv::Mat frame1 = readImage(imagePair.second, cv::IMREAD_GRAYSCALE);
304 ASSERT_FALSE(frame1.empty());
308 cv::gpu::GpuMat d_frame0(frame0);
309 cv::gpu::GpuMat d_frame1(frame1);
313 cv::gpu::PyrLKOpticalFlow d_pyrLK;
314 d_pyrLK.winSize = cv::Size(winSize, winSize);
315 d_pyrLK.maxLevel = levels - 1;
316 d_pyrLK.iters = iters;
318 d_pyrLK.dense(d_frame0, d_frame1, d_u, d_v);
322 d_pyrLK.dense(d_frame0, d_frame1, d_u, d_v);
325 GPU_SANITY_CHECK(d_u);
326 GPU_SANITY_CHECK(d_v);
330 FAIL() << "No such CPU implementation analogy";
334 //////////////////////////////////////////////////////
335 // FarnebackOpticalFlow
337 PERF_TEST_P(ImagePair, Video_FarnebackOpticalFlow,
338 Values<pair_string>(make_pair("gpu/opticalflow/frame0.png", "gpu/opticalflow/frame1.png")))
342 cv::Mat frame0 = readImage(GetParam().first, cv::IMREAD_GRAYSCALE);
343 ASSERT_FALSE(frame0.empty());
345 cv::Mat frame1 = readImage(GetParam().second, cv::IMREAD_GRAYSCALE);
346 ASSERT_FALSE(frame1.empty());
349 double pyrScale = 0.5;
353 double polySigma = 1.1;
358 cv::gpu::GpuMat d_frame0(frame0);
359 cv::gpu::GpuMat d_frame1(frame1);
363 cv::gpu::FarnebackOpticalFlow d_farneback;
364 d_farneback.numLevels = numLevels;
365 d_farneback.pyrScale = pyrScale;
366 d_farneback.winSize = winSize;
367 d_farneback.numIters = numIters;
368 d_farneback.polyN = polyN;
369 d_farneback.polySigma = polySigma;
370 d_farneback.flags = flags;
372 d_farneback(d_frame0, d_frame1, d_u, d_v);
376 d_farneback(d_frame0, d_frame1, d_u, d_v);
379 GPU_SANITY_CHECK(d_u);
380 GPU_SANITY_CHECK(d_v);
386 cv::calcOpticalFlowFarneback(frame0, frame1, flow, pyrScale, numLevels, winSize, numIters, polyN, polySigma, flags);
390 cv::calcOpticalFlowFarneback(frame0, frame1, flow, pyrScale, numLevels, winSize, numIters, polyN, polySigma, flags);
393 CPU_SANITY_CHECK(flow);
397 //////////////////////////////////////////////////////
400 DEF_PARAM_TEST_1(Video, string);
402 PERF_TEST_P(Video, DISABLED_Video_FGDStatModel, Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"))
406 string inputFile = perf::TestBase::getDataPath(GetParam());
408 cv::VideoCapture cap(inputFile);
409 ASSERT_TRUE(cap.isOpened());
413 ASSERT_FALSE(frame.empty());
417 cv::gpu::GpuMat d_frame(frame);
419 cv::gpu::FGDStatModel d_model(4);
420 d_model.create(d_frame);
422 for (int i = 0; i < 10; ++i)
425 ASSERT_FALSE(frame.empty());
427 d_frame.upload(frame);
429 startTimer(); next();
430 d_model.update(d_frame);
436 IplImage ipl_frame = frame;
437 cv::Ptr<CvBGStatModel> model(cvCreateFGDStatModel(&ipl_frame));
439 for (int i = 0; i < 10; ++i)
442 ASSERT_FALSE(frame.empty());
446 startTimer(); next();
447 cvUpdateBGStatModel(&ipl_frame, model);
453 //////////////////////////////////////////////////////
456 DEF_PARAM_TEST(Video_Cn_LearningRate, string, MatCn, double);
458 PERF_TEST_P(Video_Cn_LearningRate, DISABLED_Video_MOG,
459 Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"), GPU_CHANNELS_1_3_4, Values(0.0, 0.01)))
461 string inputFile = perf::TestBase::getDataPath(GET_PARAM(0));
462 int cn = GET_PARAM(1);
463 float learningRate = static_cast<float>(GET_PARAM(2));
465 cv::VideoCapture cap(inputFile);
466 ASSERT_TRUE(cap.isOpened());
471 ASSERT_FALSE(frame.empty());
477 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
479 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
480 cv::swap(temp, frame);
485 cv::gpu::GpuMat d_frame(frame);
486 cv::gpu::MOG_GPU d_mog;
487 cv::gpu::GpuMat d_foreground;
489 d_mog(d_frame, d_foreground, learningRate);
491 for (int i = 0; i < 10; ++i)
494 ASSERT_FALSE(frame.empty());
500 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
502 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
503 cv::swap(temp, frame);
506 d_frame.upload(frame);
508 startTimer(); next();
509 d_mog(d_frame, d_foreground, learningRate);
515 cv::BackgroundSubtractorMOG mog;
518 mog(frame, foreground, learningRate);
520 for (int i = 0; i < 10; ++i)
523 ASSERT_FALSE(frame.empty());
529 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
531 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
532 cv::swap(temp, frame);
535 startTimer(); next();
536 mog(frame, foreground, learningRate);
542 //////////////////////////////////////////////////////
545 DEF_PARAM_TEST(Video_Cn, string, int);
547 PERF_TEST_P(Video_Cn, DISABLED_Video_MOG2,
548 Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"), GPU_CHANNELS_1_3_4))
550 string inputFile = perf::TestBase::getDataPath(GET_PARAM(0));
551 int cn = GET_PARAM(1);
553 cv::VideoCapture cap(inputFile);
554 ASSERT_TRUE(cap.isOpened());
559 ASSERT_FALSE(frame.empty());
565 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
567 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
568 cv::swap(temp, frame);
573 cv::gpu::GpuMat d_frame(frame);
574 cv::gpu::MOG2_GPU d_mog2;
575 cv::gpu::GpuMat d_foreground;
577 d_mog2(d_frame, d_foreground);
579 for (int i = 0; i < 10; ++i)
582 ASSERT_FALSE(frame.empty());
588 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
590 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
591 cv::swap(temp, frame);
594 d_frame.upload(frame);
596 startTimer(); next();
597 d_mog2(d_frame, d_foreground);
603 cv::BackgroundSubtractorMOG2 mog2;
606 mog2(frame, foreground);
608 for (int i = 0; i < 10; ++i)
611 ASSERT_FALSE(frame.empty());
617 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
619 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
620 cv::swap(temp, frame);
623 startTimer(); next();
624 mog2(frame, foreground);
630 //////////////////////////////////////////////////////
631 // MOG2GetBackgroundImage
633 PERF_TEST_P(Video_Cn, Video_MOG2GetBackgroundImage,
634 Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"), GPU_CHANNELS_1_3_4))
636 string inputFile = perf::TestBase::getDataPath(GET_PARAM(0));
637 int cn = GET_PARAM(1);
639 cv::VideoCapture cap(inputFile);
640 ASSERT_TRUE(cap.isOpened());
646 cv::gpu::GpuMat d_frame;
647 cv::gpu::MOG2_GPU d_mog2;
648 cv::gpu::GpuMat d_foreground;
650 for (int i = 0; i < 10; ++i)
653 ASSERT_FALSE(frame.empty());
659 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
661 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
662 cv::swap(temp, frame);
665 d_frame.upload(frame);
667 d_mog2(d_frame, d_foreground);
670 cv::gpu::GpuMat d_background;
671 d_mog2.getBackgroundImage(d_background);
675 d_mog2.getBackgroundImage(d_background);
678 GPU_SANITY_CHECK(d_background);
682 cv::BackgroundSubtractorMOG2 mog2;
685 for (int i = 0; i < 10; ++i)
688 ASSERT_FALSE(frame.empty());
694 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
696 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
697 cv::swap(temp, frame);
700 mog2(frame, foreground);
704 mog2.getBackgroundImage(background);
708 mog2.getBackgroundImage(background);
711 CPU_SANITY_CHECK(background);
715 //////////////////////////////////////////////////////
718 PERF_TEST_P(Video_Cn, DISABLED_Video_VIBE,
719 Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"), GPU_CHANNELS_1_3_4))
721 string inputFile = perf::TestBase::getDataPath(GET_PARAM(0));
722 int cn = GET_PARAM(1);
724 cv::VideoCapture cap(inputFile);
725 ASSERT_TRUE(cap.isOpened());
729 ASSERT_FALSE(frame.empty());
735 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
737 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
738 cv::swap(temp, frame);
743 cv::gpu::GpuMat d_frame(frame);
744 cv::gpu::VIBE_GPU d_vibe;
745 cv::gpu::GpuMat d_foreground;
747 d_vibe(d_frame, d_foreground);
749 for (int i = 0; i < 10; ++i)
752 ASSERT_FALSE(frame.empty());
758 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
760 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
761 cv::swap(temp, frame);
764 d_frame.upload(frame);
766 startTimer(); next();
767 d_vibe(d_frame, d_foreground);
773 FAIL() << "No such CPU implementation analogy";
777 //////////////////////////////////////////////////////
780 DEF_PARAM_TEST(Video_Cn_MaxFeatures, string, MatCn, int);
782 PERF_TEST_P(Video_Cn_MaxFeatures, DISABLED_Video_GMG,
783 Combine(Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"), GPU_CHANNELS_1_3_4, Values(20, 40, 60)))
785 std::string inputFile = perf::TestBase::getDataPath(GET_PARAM(0));
786 int cn = GET_PARAM(1);
787 int maxFeatures = GET_PARAM(2);
789 cv::VideoCapture cap(inputFile);
790 ASSERT_TRUE(cap.isOpened());
794 ASSERT_FALSE(frame.empty());
800 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
802 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
803 cv::swap(temp, frame);
808 cv::gpu::GpuMat d_frame(frame);
809 cv::gpu::GpuMat d_fgmask;
811 cv::gpu::GMG_GPU d_gmg;
812 d_gmg.maxFeatures = maxFeatures;
814 d_gmg(d_frame, d_fgmask);
816 for (int i = 0; i < 150; ++i)
830 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
832 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
833 cv::swap(temp, frame);
836 d_frame.upload(frame);
838 startTimer(); next();
839 d_gmg(d_frame, d_fgmask);
846 cv::Mat zeros(frame.size(), CV_8UC1, cv::Scalar::all(0));
848 cv::BackgroundSubtractorGMG gmg;
849 gmg.set("maxFeatures", maxFeatures);
850 gmg.initialize(frame.size(), 0.0, 255.0);
854 for (int i = 0; i < 150; ++i)
868 cv::cvtColor(frame, temp, cv::COLOR_BGR2GRAY);
870 cv::cvtColor(frame, temp, cv::COLOR_BGR2BGRA);
871 cv::swap(temp, frame);
874 startTimer(); next();
881 //////////////////////////////////////////////////////
884 PERF_TEST_P(Video, DISABLED_Video_VideoWriter, Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"))
888 string inputFile = perf::TestBase::getDataPath(GetParam());
889 string outputFile = cv::tempfile(".avi");
891 const double FPS = 25.0;
893 cv::VideoCapture reader(inputFile);
894 ASSERT_TRUE( reader.isOpened() );
900 cv::gpu::VideoWriter_GPU d_writer;
902 cv::gpu::GpuMat d_frame;
904 for (int i = 0; i < 10; ++i)
907 ASSERT_FALSE(frame.empty());
909 d_frame.upload(frame);
911 if (!d_writer.isOpened())
912 d_writer.open(outputFile, frame.size(), FPS);
914 startTimer(); next();
915 d_writer.write(d_frame);
921 cv::VideoWriter writer;
923 for (int i = 0; i < 10; ++i)
926 ASSERT_FALSE(frame.empty());
928 if (!writer.isOpened())
929 writer.open(outputFile, CV_FOURCC('X', 'V', 'I', 'D'), FPS, frame.size());
931 startTimer(); next();
938 //////////////////////////////////////////////////////
941 PERF_TEST_P(Video, Video_VideoReader, Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"))
945 string inputFile = perf::TestBase::getDataPath(GetParam());
949 cv::gpu::VideoReader_GPU d_reader(inputFile);
950 ASSERT_TRUE( d_reader.isOpened() );
952 cv::gpu::GpuMat d_frame;
954 d_reader.read(d_frame);
958 d_reader.read(d_frame);
961 GPU_SANITY_CHECK(d_frame);
965 cv::VideoCapture reader(inputFile);
966 ASSERT_TRUE( reader.isOpened() );
977 CPU_SANITY_CHECK(frame);