Merge pull request #24278 from georgthegreat:compat-fixes

More fixes for iterators-are-pointers case
pull/24290/head
Alexander Smorkalov 1 year ago committed by GitHub
commit 0a53afe8ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      modules/calib3d/src/checkchessboard.cpp
  2. 2
      modules/objdetect/src/aruco/apriltag/apriltag_quad_thresh.cpp

@ -55,15 +55,12 @@ static void icvGetQuadrangleHypotheses(const std::vector<std::vector< cv::Point
const float max_aspect_ratio = 3.0f;
const float min_box_size = 10.0f;
typedef std::vector< std::vector< cv::Point > >::const_iterator iter_t;
iter_t i;
for (i = contours.begin(); i != contours.end(); ++i)
for (size_t i = 0; i < contours.size(); ++i)
{
const iter_t::difference_type idx = i - contours.begin();
if (hierarchy.at(idx)[3] != -1)
if (hierarchy.at(i)[3] != -1)
continue; // skip holes
const std::vector< cv::Point > & c = *i;
const std::vector< cv::Point > & c = contours[i];
cv::RotatedRect box = cv::minAreaRect(c);
float box_size = MAX(box.size.width, box.size.height);

@ -349,7 +349,7 @@ int quad_segment_maxima(const DetectorParameters &td, int sz, struct line_fit_pt
}
y[iy] = acc;
}
copy(y.begin(), y.end(), errs.begin());
std::copy(y.begin(), y.end(), errs.begin());
}
std::vector<int> maxima(sz);

Loading…
Cancel
Save