mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge branch 4.x
This commit is contained in:
@@ -318,4 +318,12 @@ TEST(CV_ArucoGenerateBoard, regression_1226) {
|
||||
});
|
||||
}
|
||||
|
||||
TEST(CV_ArucoDictionary, extendDictionary) {
|
||||
aruco::Dictionary base_dictionary = aruco::getPredefinedDictionary(aruco::DICT_4X4_250);
|
||||
aruco::Dictionary custom_dictionary = aruco::extendDictionary(150, 4, base_dictionary);
|
||||
|
||||
ASSERT_EQ(custom_dictionary.bytesList.rows, 150);
|
||||
ASSERT_EQ(cv::norm(custom_dictionary.bytesList, base_dictionary.bytesList.rowRange(0, 150)), 0.);
|
||||
}
|
||||
|
||||
}} // namespace
|
||||
|
||||
@@ -355,7 +355,7 @@ int CV_DetectorTest::validate( int detectorIdx, vector<vector<Rect> >& objects )
|
||||
map[minIdx] = 1;
|
||||
}
|
||||
}
|
||||
noPair += (int)count_if( map.begin(), map.end(), isZero );
|
||||
noPair += (int)std::count_if( map.begin(), map.end(), isZero );
|
||||
totalNoPair += noPair;
|
||||
|
||||
/*if( noPair > cvRound(valRects.size()*eps.noPair)+1 )
|
||||
|
||||
@@ -264,7 +264,8 @@ TEST(Objdetect_QRCode_Encode_Decode, regression)
|
||||
int true_capacity = establishCapacity(mode, version, cur_capacity);
|
||||
|
||||
std::string input_info = symbol_set;
|
||||
std::random_shuffle(input_info.begin(),input_info.end());
|
||||
std::mt19937 rand_gen {1};
|
||||
std::shuffle(input_info.begin(), input_info.end(), rand_gen);
|
||||
int count = 0;
|
||||
if((int)input_info.length() > true_capacity)
|
||||
{
|
||||
@@ -390,15 +391,8 @@ TEST(Objdetect_QRCode_Encode_Decode_Structured_Append, DISABLED_regression)
|
||||
std::string symbol_set = config["symbols_set"];
|
||||
|
||||
std::string input_info = symbol_set;
|
||||
#if defined CV_CXX11
|
||||
// std::random_shuffle is deprecated since C++11 and removed in C++17.
|
||||
// Use manually constructed RNG with a fixed seed and std::shuffle instead.
|
||||
std::mt19937 rand_gen {1};
|
||||
std::shuffle(input_info.begin(), input_info.end(), rand_gen);
|
||||
#else
|
||||
SeededRandFunctor<1> rand_gen;
|
||||
std::random_shuffle(input_info.begin(), input_info.end(), rand_gen);
|
||||
#endif
|
||||
for (int j = min_stuctures_num; j < max_stuctures_num; j++)
|
||||
{
|
||||
QRCodeEncoder::Params params;
|
||||
|
||||
Reference in New Issue
Block a user