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

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2023-07-27 18:38:25 +03:00
151 changed files with 5199 additions and 1111 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ public:
}
std::vector<double> c(11), rs;
// filling coefficients of 10-degree polynomial satysfying zero-determinant constraint of essential matrix, ie., det(E) = 0
// filling coefficients of 10-degree polynomial satisfying zero-determinant constraint of essential matrix, ie., det(E) = 0
// based on "An Efficient Solution to the Five-Point Relative Pose Problem" (David Nister)
// same as in five-point.cpp
c[10] = (b[0]*b[17]*b[34]+b[26]*b[4]*b[21]-b[26]*b[17]*b[8]-b[13]*b[4]*b[34]-b[0]*b[21]*b[30]+b[13]*b[30]*b[8]);
+1 -1
View File
@@ -322,7 +322,7 @@ void UniversalRANSAC::initialize (int state, Ptr<MinimalSolver> &min_solver, Ptr
params->getUpperIncompleteOfSigmaQuantile()); break;
case ScoreMethod::SCORE_METHOD_LMEDS :
quality = LMedsQuality::create(points_size, threshold, error); break;
default: CV_Error(cv::Error::StsNotImplemented, "Score is not imeplemeted!");
default: CV_Error(cv::Error::StsNotImplemented, "Score is not implemented!");
}
const auto is_ge_solver = params->getRansacSolver() == GEM_SOLVER;
+4 -4
View File
@@ -62,8 +62,8 @@ Ptr<UniformSampler> UniformSampler::create(int state, int sample_size_, int poin
/////////////////////////////////// PROSAC (SIMPLE) SAMPLER ///////////////////////////////////////
/*
* PROSAC (simple) sampler does not use array of precalculated T_n (n is subset size) samples, but computes T_n for
* specific n directy in generateSample() function.
* Also, the stopping length (or maximum subset size n*) by default is set to points_size (N) and does not updating
* specific n directly in generateSample() function.
* Also, the stopping length (or maximum subset size n*) by default is set to points_size (N) and does not update
* during computation.
*/
class ProsacSimpleSamplerImpl : public ProsacSimpleSampler {
@@ -176,7 +176,7 @@ protected:
// In our experiments, the parameter was set to T_N = 200000
int growth_max_samples;
// how many time PROSAC generateSample() was called
// how many times PROSAC generateSample() was called
int kth_sample_number;
Ptr<UniformRandomGenerator> random_gen;
public:
@@ -488,7 +488,7 @@ public:
points_large_neighborhood_size = 0;
// find indicies of points that have sufficient neighborhood (at least sample_size-1)
// find indices of points that have sufficient neighborhood (at least sample_size-1)
for (int pt_idx = 0; pt_idx < points_size; pt_idx++)
if ((int)neighborhood_graph->getNeighbors(pt_idx).size() >= sample_size-1)
points_large_neighborhood[points_large_neighborhood_size++] = pt_idx;
+1 -1
View File
@@ -19,7 +19,7 @@ public:
/*
* Get upper bound iterations for any sample number
* n is points size, w is inlier ratio, p is desired probability, k is expceted number of iterations.
* n is points size, w is inlier ratio, p is desired probability, k is expected number of iterations.
* 1 - p = (1 - w^n)^k,
* k = log_(1-w^n) (1-p)
* k = ln (1-p) / ln (1-w^n)
+2 -2
View File
@@ -1531,8 +1531,8 @@ TEST(Calib3d_SolvePnP, generic)
}
else
{
p3f = p3f_;
p2f = p2f_;
p3f = vector<Point3f>(p3f_.begin(), p3f_.end());
p2f = vector<Point2f>(p2f_.begin(), p2f_.end());
}
vector<double> reprojectionErrors;