slambook2
slambook2 copied to clipboard
ch7下pose_estimation_3d2d.cpp运行终止
-- Max dist : 95.000000 -- Min dist : 4.000000 一共找到了79组匹配点 3d-2d pairs: 76 solve pnp in opencv cost time: 0.000257344 seconds. R= [0.9978662025826269, -0.05167241613316376, 0.03991244360207524; 0.0505958915956335, 0.998339762771668, 0.02752769192381471; -0.04126860182960625, -0.025449547736074, 0.998823919929363] t= [-0.1272259656955879; -0.007507297652615337; 0.06138584177157709] calling bundle adjustment by gauss newton iteration 0 cost=45538.1857253 iteration 1 cost=413.221881688 iteration 2 cost=301.36705717 iteration 3 cost=301.365779441 pose by g-n: 0.99786620258 -0.0516724160901 0.0399124437155 -0.127225965886 0.050595891549 0.998339762774 0.02752769194 -0.00750729768072 -0.0412686019426 -0.0254495477483 0.998823919924 0.0613858418151 0 0 0 1 solve pnp by gauss newton cost time: 0.000119001 seconds. calling bundle adjustment by g2o terminate called after throwing an instance of 'std::bad_array_new_length' what(): std::bad_array_new_length 已放弃 (核心已转储) 出现上述: terminate called after throwing an instance of 'std::bad_array_new_length' what(): std::bad_array_new_length
我也出现了这个问题。把代码中的argv[1] argv[2] 和 argv[3] 改为图片的绝对路径,然后用vscode调试运行可以运行成功。 但是用生成的二进制文件直接运行还是会报错。还是不知道真正问题是什么
已解决。是g2o版本问题,切换为g2o_20200410版本后就没问题了。