1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2026-02-11 13:54:39 +03:00
committed by Alexander Smorkalov
468 changed files with 16647 additions and 11284 deletions
+1 -1
View File
@@ -790,7 +790,7 @@ public:
Mat F(count == 7 ? 9 : 3, 3, CV_64F, f);
int n = count == 7 ? run7Point(m1, m2, F) : run8Point(m1, m2, F);
if( n == 0 )
if( n <= 0 )
_model.release();
else
F.rowRange(0, n*3).copyTo(_model);
+8
View File
@@ -44,6 +44,10 @@
#elif defined(HAVE_LAPACK)
#include "opencv_lapack.h"
#endif
#if defined(__APPLE__) && defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
namespace cv { namespace usac {
class DLSPnPImpl : public DLSPnP {
@@ -890,3 +894,7 @@ Ptr<DLSPnP> DLSPnP::create(const Mat &points_, const Mat &calib_norm_pts, const
return makePtr<DLSPnPImpl>(points_, calib_norm_pts, K);
}
}}
#if defined(__APPLE__) && defined(__clang__)
#pragma clang diagnostic pop
#endif
+8
View File
@@ -9,6 +9,10 @@
#elif defined(HAVE_LAPACK)
#include "opencv_lapack.h"
#endif
#if defined(__APPLE__) && defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
namespace cv { namespace usac {
/*
@@ -354,3 +358,7 @@ Ptr<EssentialMinimalSolver5pts> EssentialMinimalSolver5pts::create
return makePtr<EssentialMinimalSolver5ptsImpl>(points_, use_svd, is_nister);
}
}}
#if defined(__APPLE__) && defined(__clang__)
#pragma clang diagnostic pop
#endif
+8
View File
@@ -11,6 +11,10 @@
#elif defined(HAVE_LAPACK)
#include "opencv_lapack.h"
#endif
#if defined(__APPLE__) && defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
namespace cv { namespace usac {
class PnPMinimalSolver6PtsImpl : public PnPMinimalSolver6Pts {
@@ -408,3 +412,7 @@ Ptr<P3PSolver> P3PSolver::create(const Mat &points_, const Mat &calib_norm_pts,
return makePtr<P3PSolverImpl>(points_, calib_norm_pts, K);
}
}}
#if defined(__APPLE__) && defined(__clang__)
#pragma clang diagnostic pop
#endif
+2 -2
View File
@@ -388,12 +388,12 @@ void Utils::densitySort (const Mat &points, int knn, Mat &sorted_points, std::ve
sorted_mask[i] = i;
// get neighbors
FlannNeighborhoodGraph &graph = *FlannNeighborhoodGraph::create(points, points_size, knn,
cv::Ptr<FlannNeighborhoodGraph> graph = FlannNeighborhoodGraph::create(points, points_size, knn,
true /*get distances */, 6, 1);
std::vector<double> sum_knn_distances (points_size, 0);
for (int p = 0; p < points_size; p++) {
const std::vector<double> &dists = graph.getNeighborsDistances(p);
const std::vector<double> &dists = graph->getNeighborsDistances(p);
for (int k = 0; k < knn; k++)
sum_knn_distances[p] += dists[k];
}