Skip to content

Commit

Permalink
[multiview/P3P] bearing vectors are already normalized
Browse files Browse the repository at this point in the history
  • Loading branch information
rjanvier committed Apr 19, 2019
1 parent 9aa67ed commit 03f26b3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/openMVG/multiview/solver_resection_p3p_nordberg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,11 @@ bool computePosesNordberg(
Vec3 P2 = X.col(1);
Vec3 P3 = X.col(2);

// Extraction of feature vectors
// Extraction of bearing vectors
Vec3 f1 = bearing_vectors.col(0);
Vec3 f2 = bearing_vectors.col(1);
Vec3 f3 = bearing_vectors.col(2);

f1.normalize();
f2.normalize();
f3.normalize();

double b12 = -2.0 * (f1.dot(f2));
double b13 = -2.0 * (f1.dot(f3));
double b23 = -2.0 * (f2.dot(f3));
Expand Down Expand Up @@ -472,7 +468,6 @@ bool computePosesNordberg(
}
}

// if constexpr (refinement_iterations>0)
for (int i = 0; i < valid; ++i)
{
gauss_newton_refineL(Ls[i], a12, a13, a23, b12, b13, b23);
Expand Down

0 comments on commit 03f26b3

Please sign in to comment.