ydsf16/PnP_Solver

EPnP: sign of the betas for N>1

Opened this issue · 0 comments

Thanks for open sourcing this great repo :)

If you have the time, I am curious about one aspect of the EPnP implementation:
Why the sign of the betas when $N > 1$ should be decided as the way they are implemented?

E.g. when $N=2$ :

PnP_Solver/pnp_solver.cpp

Lines 436 to 446 in 835e358

if ( b3[0] < 0 ) {
betas[0] = sqrt ( -b3[0] );
betas[1] = ( b3[2] < 0 ) ? sqrt ( -b3[2] ) : 0.0;
} else {
betas[0] = sqrt ( b3[0] );
betas[1] = ( b3[2] > 0 ) ? sqrt ( b3[2] ) : 0.0;
}
if ( b3[1] < 0 ) {
betas[0] = -betas[0];
}

However, by definition, $\beta_{11} = \beta_1 * \beta_1 &gt; 0$. Thereby, why an estimate $\beta_{11}&lt;0$ is still considered valid (keeping it as an absolute value), and is not ignored (thus assuming that solutions is spurious)?

Thanks in advance.