diff --git a/modules/stitching/src/seam_finders.cpp b/modules/stitching/src/seam_finders.cpp index c8a320dc744fd8c5bc4ca00cd16e7ceb277c12f7..a19f5a6cfce76f844b239fcf3c5e886201b705b1 100644 --- a/modules/stitching/src/seam_finders.cpp +++ b/modules/stitching/src/seam_finders.cpp @@ -554,8 +554,8 @@ void DpSeamFinder::computeGradients(const Mat &image1, const Mat &image2) bool DpSeamFinder::hasOnlyOneNeighbor(int comp) { std::set >::iterator begin, end; - begin = lower_bound(edges_.begin(), edges_.end(), std::make_pair(comp, std::numeric_limits::min())); - end = upper_bound(edges_.begin(), edges_.end(), std::make_pair(comp, std::numeric_limits::max())); + begin = edges_.lower_bound(std::make_pair(comp, std::numeric_limits::min())); + end = edges_.upper_bound(std::make_pair(comp, std::numeric_limits::max())); return ++begin == end; }