OpenCV Bundle Adjustment



我正在尝试使用OpenCV Bundle Adjustment: LevMarqSparse::bundleAdjust不幸的是,输出似乎完全错误:

Iteration: 0, normError: 4.30244e+46 (3.64614e+44)
decreasing lambda to 0.024556
Iteration: 1, normError: 2.72985e+31 (2.31343e+29)
decreasing lambda to 0.0024556
Iteration: 2, normError: 8.00302e+25 (6.78222e+23)
move failed: lambda = 0.024556, e2 = 2.62043e+40 (2.2207e+38) > 8.00302e+25(6.78222e+23)
move failed: lambda = 0.24556, e2 = 7.31034e+40 (6.1952e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556, e2 = 1.59706e+40 (1.35344e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 24.556, e2 = 1.33882e+40 (1.13459e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 245.56, e2 = 1.31518e+40 (1.11456e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2455.6, e2 = 1.31283e+40 (1.11257e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 24556, e2 = 1.3126e+40 (1.11237e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 245560, e2 = 1.31257e+40 (1.11235e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+06, e2 = 1.31257e+40 (1.11235e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+07, e2 = 1.31257e+40 (1.11235e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+08, e2 = 1.31257e+40 (1.11235e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+09, e2 = 1.31257e+40 (1.11235e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+10, e2 = 1.3125e+40 (1.11229e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+11, e2 = 1.31102e+40 (1.11103e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+12, e2 = 1.3103e+40 (1.11042e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+13, e2 = 1.31471e+40 (1.11416e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+14, e2 = 1.29156e+40 (1.09454e+38) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+15, e2 = 1.15709e+40 (9.80585e+37) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+16, e2 = 3.81423e+39 (3.2324e+37) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+17, e2 = 6.59182e+36 (5.58629e+34) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+18, e2 = 8.07694e+34 (6.84487e+32) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+19, e2 = 7.73149e+52 (6.55211e+50) > 8.00302e+25 (6.78222e+23)
move failed: lambda = 2.4556e+20, e2 = 2.061e+40 (1.74661e+38) > 8.00302e+25 (6.78222e+23)
decreasing lambda to 2.4556e+19

如果我手动重新投影我对关键点的第一次猜测,我得到的总(求和)欧几里得距离(像素误差)为169.541在每个关键点和它的三角点的重投影之间。在调用LevMarqSparse:: bundlead1之后,同样的错误检查给出了5.50025e+12的错误。

谁能告诉我正确的方向?谢谢。

一般情况下,当bundle调整出现这种情况时,至少有可能出现以下错误之一:

  1. 2D投影不是3D点的正确投影,导致一个3D点被重投影到错误的2D投影上,重投影误差非常大。也许2D投影和3D点之间的指数发生了变化。
  2. 您使用的相机不像OpenCV要求的那样在相同的坐标系中。想象一下旋转180°或反向移动,3D点将投射到某个地方,但肯定不是正确的2D位置。所以,也许可以试着取逆相机矩阵。如果P是你的4x4齐次投影矩阵之一,取P.inv()代替P.

这将有助于得到平均重投影误差。这个和并不是很有意义,因为我们不知道在你的重建中有多少3D点和2D投影。

相关内容

  • 没有找到相关文章

最新更新