opencv/modules/objdetect/test/test_precomp.hpp
Rong Mantle Bao 3135063100
Make objdetect/test C++11-compliant and reproducible
- Add conditional compilation directives to replace deprecated std::random_shuffle with new std::shuffle when C++11 is available.

- Set random seed to a fixed value before shuffling containers to ensure reproducibility.

Resolves opencv/opencv#22209.
2022-07-12 20:18:54 +08:00

18 lines
453 B
C++

// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
#include "opencv2/ts.hpp"
#include "opencv2/objdetect.hpp"
#include "opencv2/objdetect/objdetect_c.h"
#if defined CV_CXX11
#include <random>
#else
#include <cstdlib>
#endif
#endif