mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
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.
This commit is contained in:
@@ -8,4 +8,10 @@
|
||||
#include "opencv2/objdetect.hpp"
|
||||
#include "opencv2/objdetect/objdetect_c.h"
|
||||
|
||||
#if defined CV_CXX11
|
||||
#include <random>
|
||||
#else
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user