From e65c6270bf080ab3802c12fe024af9a4bde2ead6 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 1 Mar 2017 14:28:23 +0300 Subject: [PATCH] stitching(perf): workaround test failures force other RNG seed --- modules/stitching/perf/perf_stich.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/stitching/perf/perf_stich.cpp b/modules/stitching/perf/perf_stich.cpp index ded2571585..ee78d6d2f4 100644 --- a/modules/stitching/perf/perf_stich.cpp +++ b/modules/stitching/perf/perf_stich.cpp @@ -2,6 +2,8 @@ #include "opencv2/imgcodecs.hpp" #include "opencv2/opencv_modules.hpp" +#include "opencv2/core/ocl.hpp" + using namespace std; using namespace cv; using namespace perf; @@ -161,6 +163,9 @@ PERF_TEST_P(stitchDatasets, affine, testing::Combine(AFFINE_DATASETS, TEST_DETEC Ptr stitcher = Stitcher::create(Stitcher::SCANS, false); stitcher->setFeaturesFinder(featuresFinder); + if (cv::ocl::useOpenCL()) + cv::theRNG() = cv::RNG(12345); // prevent fails of Windows OpenCL builds (see #8294) + startTimer(); stitcher->stitch(imgs, pano); stopTimer();