Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why ScaramuzzaCamera's liftProjective return xc[0], xc[1], -z #76

Open
renjingc opened this issue May 8, 2018 · 1 comment
Open

why ScaramuzzaCamera's liftProjective return xc[0], xc[1], -z #76

renjingc opened this issue May 8, 2018 · 1 comment

Comments

@renjingc
Copy link

renjingc commented May 8, 2018

void
OCAMCamera::liftProjective(const Eigen::Vector2d& p, Eigen::Vector3d& P) const
{
// Relative to Center
Eigen::Vector2d xc(p[0] - mParameters.center_x(), p[1] - mParameters.center_y());

// Affine Transformation
// xc_a = inv(A) * xc;
Eigen::Vector2d xc_a(
    m_inv_scale * (xc[0] - mParameters.D() * xc[1]),
    m_inv_scale * (-mParameters.E() * xc[0] + mParameters.C() * xc[1])
);

double phi = std::sqrt(xc_a[0] * xc_a[0] + xc_a[1] * xc_a[1]);
double phi_i = 1.0;
double z = 0.0;

for (int i = 0; i < SCARAMUZZA_POLY_SIZE; i++)
{
    z += phi_i * mParameters.poly(i);
    phi_i *= phi;
}

P << xc[0], xc[1], -z;

}

why return xc[0], xc[1], -z
I think maybe is xc_a[0], xc_a[1], -z

@ouyangandy
Copy link

i think you r right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants