diff --git a/modules/imgproc/src/intersection.cpp b/modules/imgproc/src/intersection.cpp index cdee36663..dfebd260e 100644 --- a/modules/imgproc/src/intersection.cpp +++ b/modules/imgproc/src/intersection.cpp @@ -231,7 +231,7 @@ int rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect& r // Found a dupe, remove it std::swap(intersection[j], intersection.back()); intersection.pop_back(); - i--; // restart check + j--; // restart check } } }