mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08:00
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 *=
This commit is contained in:
parent
3891b72f33
commit
0a88f84847
@ -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…
Reference in New Issue
Block a user