Fix bug in ChessBoardDetector::cleanFoundConnectedQuads

This commit is contained in:
MaximSmolskiy 2023-12-06 22:46:09 +03:00
parent dc0c59fdc6
commit 2f0de10120

View File

@ -1215,7 +1215,7 @@ int ChessBoardDetector::cleanFoundConnectedQuads(std::vector<ChessBoardQuad*>& q
// (since we want the rectangle to be as small as possible) // (since we want the rectangle to be as small as possible)
// remove the quadrangle that causes the biggest reduction // remove the quadrangle that causes the biggest reduction
// in pattern size until we have the correct number // in pattern size until we have the correct number
for (; quad_count > count; quad_count--) while (quad_count > count)
{ {
double min_box_area = DBL_MAX; double min_box_area = DBL_MAX;
int min_box_area_index = -1; int min_box_area_index = -1;