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

关于恢复线的三维位置 #11

Closed
fightmoney opened this issue Dec 7, 2021 · 1 comment
Closed

关于恢复线的三维位置 #11

fightmoney opened this issue Dec 7, 2021 · 1 comment

Comments

@fightmoney
Copy link

fightmoney commented Dec 7, 2021

visualization.cpp里面369行Lc和您论文里面关于Lc的公式似乎不一样?公式(14)
QQ截图20211207214810

还有对之后恢复线端点3维位置不是很明白?

希望您能解答一下 感谢!!

Lc << skew_symmetric(nc), vc, -vc.transpose(), 0;

Vector4d obs = it_per_id.linefeature_per_frame[0].lineobs;   // 第一次观测到这帧
Vector3d p11 = Vector3d(obs(0), obs(1), 1.0);
Vector3d p21 = Vector3d(obs(2), obs(3), 1.0);
Vector2d ln = ( p11.cross(p21) ).head(2);     // 直线的垂直方向
ln = ln / ln.norm();

Vector3d p12 = Vector3d(p11(0) + ln(0), p11(1) + ln(1), 1.0);  // 直线垂直方向上移动一个单位
Vector3d p22 = Vector3d(p21(0) + ln(0), p21(1) + ln(1), 1.0);
Vector3d cam = Vector3d( 0, 0, 0 );

Vector4d pi1 = pi_from_ppp(cam, p11, p12);
Vector4d pi2 = pi_from_ppp(cam, p21, p22);

Vector4d e1 = Lc * pi1;
Vector4d e2 = Lc * pi2;
e1 = e1/e1(3);
e2 = e2/e2(3);
@HeYijia
Copy link
Owner

HeYijia commented Dec 8, 2021

这部分代码是计算 3D 直线的两个端点,具体可以阅读论文:Building a 3D Line-based Map Using a Stereo SLAM。

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