Merge pull request #22208 from vrabaud:34_calibinit

Add missing code.

* Add missing code.

This was removed in c7fc563dc0
The resize is also a side-effect.

* Use shorteer cv::Point2f *=
pull/22213/head
Vincent Rabaud 3 years ago committed by GitHub
parent 3891b72f33
commit 0a88f84847
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      modules/calib3d/src/calibinit.cpp

@ -1232,7 +1232,7 @@ int ChessBoardDetector::cleanFoundConnectedQuads(std::vector<ChessBoardQuad*>& q
centers[i] = ci;
center += ci;
}
center.x *= (1.0f / quad_count);
center *= (1.0f / quad_count);
// If we still have more quadrangles than we should,
// we try to eliminate bad ones based on minimizing the bounding box.
@ -1298,6 +1298,7 @@ int ChessBoardDetector::cleanFoundConnectedQuads(std::vector<ChessBoardQuad*>& q
quad_group[min_box_area_index] = quad_group[quad_count];
centers[min_box_area_index] = centers[quad_count];
}
quad_group.resize(quad_count);
return quad_count;
}

Loading…
Cancel
Save