Merge pull request #24659 from MaximSmolskiy:fix-bug-in-ChessBoardDetector-cleanFoundConnectedQuads

Fix bug in ChessBoardDetector::cleanFoundConnectedQuads
This commit is contained in:
Alexander Smorkalov 2023-12-19 16:05:29 +03:00 committed by GitHub
commit 509c1afb8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1216,7 +1216,7 @@ int ChessBoardDetector::cleanFoundConnectedQuads(std::vector<ChessBoardQuad*>& q
// (since we want the rectangle to be as small as possible)
// remove the quadrangle that causes the biggest reduction
// 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;
int min_box_area_index = -1;