未验证 提交 1ebea1e0 编写于 作者: A Alexander Smorkalov 提交者: GitHub

Merge pull request #24232 from georgthegreat:missing-qualifiers

Add missing std namespace qualifiers
......@@ -115,8 +115,8 @@ TEST_P(EstimateAffine2D, testNPoints)
EXPECT_NEAR(0., cvtest::norm(aff_est, aff, NORM_INF), 1e-4);
bool inliers_good = count(inliers.begin(), inliers.end(), 1) == m &&
m == accumulate(inliers.begin(), inliers.begin() + m, 0);
bool inliers_good = std::count(inliers.begin(), inliers.end(), 1) == m &&
m == std::accumulate(inliers.begin(), inliers.begin() + m, 0);
EXPECT_TRUE(inliers_good);
}
......
......@@ -160,8 +160,8 @@ bool CV_Affine3D_EstTest::testNPoints()
return false;
}
bool outl_good = count(outl.begin(), outl.end(), 1) == m &&
m == accumulate(outl.begin(), outl.begin() + m, 0);
bool outl_good = std::count(outl.begin(), outl.end(), 1) == m &&
m == std::accumulate(outl.begin(), outl.begin() + m, 0);
if (!outl_good)
{
......
......@@ -125,8 +125,8 @@ TEST_P(EstimateAffinePartial2D, testNPoints)
EXPECT_NEAR(0., cvtest::norm(aff_est, aff, NORM_INF), 1e-4);
bool inliers_good = count(inliers.begin(), inliers.end(), 1) == m &&
m == accumulate(inliers.begin(), inliers.begin() + m, 0);
bool inliers_good = std::count(inliers.begin(), inliers.end(), 1) == m &&
m == std::accumulate(inliers.begin(), inliers.begin() + m, 0);
EXPECT_TRUE(inliers_good);
}
......
......@@ -740,8 +740,8 @@ public:
CV_StereoBMTest()
{
name = "stereobm";
fill(rmsEps.begin(), rmsEps.end(), 0.4f);
fill(fracEps.begin(), fracEps.end(), 0.022f);
std::fill(rmsEps.begin(), rmsEps.end(), 0.4f);
std::fill(fracEps.begin(), fracEps.end(), 0.022f);
}
protected:
......@@ -866,8 +866,8 @@ public:
CV_StereoSGBMTest()
{
name = "stereosgbm";
fill(rmsEps.begin(), rmsEps.end(), 0.25f);
fill(fracEps.begin(), fracEps.end(), 0.01f);
std::fill(rmsEps.begin(), rmsEps.end(), 0.25f);
std::fill(fracEps.begin(), fracEps.end(), 0.01f);
}
protected:
......
......@@ -91,8 +91,8 @@ TEST(Calib3d_EstimateTranslation3D, testNPoints)
<< "aff est: " << trans_est << endl
<< "aff ref: " << trans;
bool outl_good = count(outl.begin(), outl.end(), 1) == m &&
m == accumulate(outl.begin(), outl.begin() + m, 0);
bool outl_good = std::count(outl.begin(), outl.end(), 1) == m &&
m == std::accumulate(outl.begin(), outl.begin() + m, 0);
EXPECT_TRUE(outl_good);
}
......
......@@ -259,7 +259,7 @@ TEST_P (CountNonZeroND, ndim)
const int ONE_SIZE = 5;
vector<int> sizes(dims);
fill(sizes.begin(), sizes.end(), ONE_SIZE);
std::fill(sizes.begin(), sizes.end(), ONE_SIZE);
Mat data(sizes, CV_MAKETYPE(type, 1));
data = 0;
......
......@@ -142,7 +142,7 @@ TEST_P(DescriptorImage, no_crash)
{
vector<String> fnames;
glob(cvtest::TS::ptr()->get_data_path() + pattern, fnames, false);
sort(fnames.begin(), fnames.end());
std::sort(fnames.begin(), fnames.end());
Ptr<AKAZE> akaze_mldb = AKAZE::create(AKAZE::DESCRIPTOR_MLDB);
Ptr<AKAZE> akaze_mldb_upright = AKAZE::create(AKAZE::DESCRIPTOR_MLDB_UPRIGHT);
......
......@@ -1198,7 +1198,7 @@ void CV_CalcHistTest::run_func(void)
}
std::vector<cv::Mat> imagesv(cdims);
copy(images.begin(), images.begin() + cdims, imagesv.begin());
std::copy(images.begin(), images.begin() + cdims, imagesv.begin());
Mat mask = images[CV_MAX_DIM];
if( !CV_IS_SPARSE_HIST(hist[0]) )
......@@ -1493,7 +1493,7 @@ void CV_CalcBackProjectTest::run_func(void)
}
std::vector<cv::Mat> imagesv(hdims);
copy(images.begin(), images.begin() + hdims, imagesv.begin());
std::copy(images.begin(), images.begin() + hdims, imagesv.begin());
cv::Mat dst = images[CV_MAX_DIM+1];
......
......@@ -1249,14 +1249,14 @@ bool QRDecode::computeSidesPoints(const vector<Point> &result_integer_hull)
{
if (points.front().x > points.back().x)
{
reverse(points.begin(), points.end());
std::reverse(points.begin(), points.end());
}
}
else
{
if (points.front().y > points.back().y)
{
reverse(points.begin(), points.end());
std::reverse(points.begin(), points.end());
}
}
if (points.empty())
......@@ -1632,7 +1632,7 @@ bool QRDecode::findPatternsVerticesPoints(vector<vector<Point> > &patterns_verti
}
if ((int)min_angle_pnts_indexes.size() == num_vertices) { break; }
}
sort(min_angle_pnts_indexes.begin(), min_angle_pnts_indexes.end());
std::sort(min_angle_pnts_indexes.begin(), min_angle_pnts_indexes.end());
vector<Point> contour_vertices_points;
......@@ -1761,11 +1761,11 @@ bool QRDecode::findTempPatternsAddingPoints(vector<std::pair<int, vector<Point>
}
if (abs(p1.x - p2.x) > abs(p1.y - p2.y))
{
sort(points.begin(), points.end(), sortPointsByX());
std::sort(points.begin(), points.end(), sortPointsByX());
}
else
{
sort(points.begin(), points.end(), sortPointsByY());
std::sort(points.begin(), points.end(), sortPointsByY());
}
temp_patterns_add_points.push_back(std::pair<int, vector<Point> >(idx_curved_side,points));
......@@ -1909,11 +1909,11 @@ void QRDecode::completeAndSortSides()
Point p2 = it->second.back();
if (abs(p1.x - p2.x) > abs(p1.y - p2.y))
{
sort(it->second.begin(), it->second.end(), sortPointsByX());
std::sort(it->second.begin(), it->second.end(), sortPointsByX());
}
else
{
sort(it->second.begin(), it->second.end(), sortPointsByY());
std::sort(it->second.begin(), it->second.end(), sortPointsByY());
}
}
}
......@@ -2075,8 +2075,8 @@ bool QRDecode::divideIntoEvenSegments(vector<vector<Point2f> > &segments_points)
Point2f segment_start = segments_points[i][j];
Point2f segment_end = segments_points[i][j + 1];
vector<Point2f>::iterator it_start, it_end, it;
it_start = find(spline_lines[i].begin(), spline_lines[i].end(), segment_start);
it_end = find(spline_lines[i].begin(), spline_lines[i].end(), segment_end);
it_start = std::find(spline_lines[i].begin(), spline_lines[i].end(), segment_start);
it_end = std::find(spline_lines[i].begin(), spline_lines[i].end(), segment_end);
float max_dist_to_line = 0.0;
for (it = it_start; it != it_end; it++)
{
......
......@@ -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 )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册