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

Merge pull request #29175 from asmorkalov:as/geometry2

Geometry module #29175

OpenCV Contrib: https://github.com/opencv/opencv_contrib/pull/4129
CI changes: https://github.com/opencv/ci-gha-workflow/pull/313

Continues
- https://github.com/opencv/opencv/pull/28804
- https://github.com/opencv/opencv/pull/29101
- https://github.com/opencv/opencv/pull/29108
- https://github.com/opencv/opencv/pull/28810

Todo for followup PRs:
- [x] Rename doxygen groups
- [x] Fix JS modules layout and whitelists
- [ ] Sort tutorials code/snippets

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Alexander Smorkalov
2026-05-31 14:23:15 +03:00
committed by GitHub
parent 14a475aa0b
commit 59218f9edd
291 changed files with 267 additions and 248 deletions
+47
View File
@@ -0,0 +1,47 @@
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#include "perf_precomp.hpp"
#include "opencv2/ts.hpp"
#include "opencv2/ts/ts_perf.hpp"
namespace opencv_test { namespace {
using namespace perf;
typedef TestBaseWithParam< tuple<MatDepth, int> > TestMinEnclosingCircle;
PERF_TEST_P(TestMinEnclosingCircle, minEnclosingCircle,
Combine(
testing::Values(CV_32S, CV_32F),
Values(400, 1000, 10000, 100000)
))
{
int ptType = get<0>(GetParam());
int n = get<1>(GetParam());
Mat pts(n, 2, ptType);
declare.in(pts, WARMUP_RNG);
Point2f center;
float radius;
TEST_CYCLE() minEnclosingCircle(pts, center, radius);
SANITY_CHECK_NOTHING();
}
typedef TestBaseWithParam<int> TestMinEnclosingCircleWorstCase;
PERF_TEST_P(TestMinEnclosingCircleWorstCase, minEnclosingCircle_sequential,
Values(400, 1000, 5000, 10000))
{
int n = GetParam();
vector<Point2f> contour;
for(int i = 0; i < n; ++i) {
float angle = (float)(i * 2 * CV_PI / n);
contour.push_back(Point2f(cos(angle) * 100, sin(angle) * 100));
}
Point2f center;
float radius;
TEST_CYCLE() minEnclosingCircle(contour, center, radius);
SANITY_CHECK_NOTHING();
}
}} // namespace