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

predictPtsInNextFrame函数 #35

Open
xixishui1999 opened this issue Oct 13, 2023 · 1 comment
Open

predictPtsInNextFrame函数 #35

xixishui1999 opened this issue Oct 13, 2023 · 1 comment

Comments

@xixishui1999
Copy link

作者您好,我在predictPtsInNextFrame函数有个疑问
void FeatureTracker::predictPtsInNextFrame(const Matrix3d &_relative_R)
{
predict_pts.resize(cur_pts.size());
for (unsigned int i = 0; i < cur_pts.size(); ++i)
{
Eigen::Vector3d tmp_P;
m_camera->liftProjective(Eigen::Vector2d(cur_pts[i].x, cur_pts[i].y), tmp_P);
Eigen::Vector3d predict_P = _relative_R * tmp_P;
Eigen::Vector2d tmp_p;
m_camera->spaceToPlane(predict_P, tmp_p);
predict_pts[i].x = tmp_p.x();
predict_pts[i].y = tmp_p.y();
}
}
这里的_relative_R是R21吗,你这里是对上一帧的归一化坐标乘以这个旋转,然后得到预测的坐标,之后你再将坐标转为像素坐标。我想问下_relative_R * tmp_P的意义,因为做变换时P2 = (R21*P1 + t21) 这个P1并不是归一化坐标,需要有深度信息

@jianhengLiu
Copy link
Collaborator

因为预测仅考虑了旋转,射线上重投影的都是一个像素坐标与深度无关

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