1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2025-02-05 09:28:27 +03:00
180 changed files with 11419 additions and 1819 deletions
+7 -1
View File
@@ -115,7 +115,13 @@ void Board::Impl::generateImage(Size outSize, OutputArray img, int marginSize, i
}
// get marker
Size dst_sz(outCorners[2] - outCorners[0]); // assuming CCW order
Point2f vecWidth = outCorners[1] - outCorners[0];
float width = (float)cv::norm(vecWidth);
Point2f vecHeight = outCorners[2] - outCorners[0];
float height = (float)cv::norm(vecHeight);
Size dst_sz(cvRound(width), cvRound(height));
dst_sz.width = dst_sz.height = std::min(dst_sz.width, dst_sz.height); //marker should be square
dictionary.generateImageMarker(ids[m], dst_sz.width, marker, borderBits);
+5 -2
View File
@@ -19,7 +19,6 @@
#include <limits>
#include <cmath>
#include <queue>
#include <limits>
#include <map>
namespace cv
@@ -3710,7 +3709,11 @@ bool QRDetectMulti::checkSets(vector<vector<Point2f> >& true_points_group, vecto
vector<int> set_size(true_points_group.size());
for (size_t i = 0; i < true_points_group.size(); i++)
{
set_size[i] = int( (true_points_group[i].size() - 2 ) * (true_points_group[i].size() - 1) * true_points_group[i].size()) / 6;
const std::uint64_t true_points_group_size = true_points_group[i].size();
// ensure set_size[i] doesn't overflow
CV_Assert(true_points_group_size <= 2345);
set_size[i] = static_cast<int>((true_points_group_size - 2) * (true_points_group_size - 1) *
true_points_group_size / 6);
}
vector< vector< Vec3i > > all_points(true_points_group.size());