gaoxiang12 / slambook2

edition 2 of the slambook
MIT License
5.41k stars 2k forks source link

ch13 calib.txt #206

Open warden2018 opened 2 years ago

warden2018 commented 2 years ago

没有在代码库中找到这个文件,请问在哪里能够找到?

warden2018 commented 2 years ago

在做当前帧的优化时,单元边使用如代码所示: EdgeProjectionPoseOnly *edge = new EdgeProjectionPoseOnly(mp->pos_, K);

在计算重投影误差的函数当中,地图点左乘T(是当前Frame的位姿)得到是在Frame坐标系下的坐标,再左乘相机内参数,做归一化处理得到像素坐标。我的问题是:整个项目的坐标系统是把左侧相机的坐标系统和Frame的坐标系统当作重合来处理?我在跑自己相机的数据时候,遇到了在建立初始地图之后,后面跟踪Frame时候(EstimateCurrentPose)重投影误差比较大,几乎所有点都是外点,导致跟踪失败。求大神们指导!

virtual void computeError() override { const VertexPose *v = static_cast<VertexPose *>(_vertices[0]); SE3 T = v->estimate(); Vec3 pos_pixel = _K * (T * _pos3d); pos_pixel /= pos_pixel[2]; _error = _measurement - pos_pixel.head<2>(); }

EstimateCurrentPose result:

82173 8787 frontend.cpp:203] Error of re-projection: -33.162,39.9522 frontend.cpp:203] Error of re-projection: 21.8449,31.5449 frontend.cpp:203] Error of re-projection: -116.593,-22.4425 frontend.cpp:203] Error of re-projection: 30.6026,34.995

再总结一下我的问题吧:

  1. Frame,left camera和right camera的坐标系统定义是什么样子?尤其是Frame和left camera
  2. 我想calib.txt文件里面应该是写清楚了三者的外参数关系,但是代码库当中没有找到该文件
LiKangyuLKY commented 2 years ago

calib.txt在KITTI的数据集中,目录为sequences\XX\calib.txt中

正好也请教您一个问题: #213

warden2018 commented 2 years ago

能发一下KITTI里面这个数据集的链接吗?我想进去看一看