gaoxiang12 / slambook2

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

ch12 dense_mapping.cpp 为什么运行最后报错“已放弃 (核心已转储)” #322

Open icefrogplus opened 2 months ago

icefrogplus commented 2 months ago

loop 201 terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::substr: __pos (which is 140) > this->size() (which is 0) 已放弃 (核心已转储)

icefrogplus commented 2 months ago

发现问题了,是索引超出范围了,给的数据不知道为什么少了一张照片,少了scene_107.png 所以是200张照片,但是对应的其他文件信息却是201个,所以运行到最后就会超出索引报错┭┮﹏┭┮ 主函数的for循环改成下面就能跑通了: for ( int index=1; index<color_image_files.size()-1; index++ )

Zhiyehhh commented 1 week ago

请问每个loop大概需要跑多久呢

icefrogplus commented 1 week ago

请问每个loop大概需要跑多久呢

看电脑性能了吧,我的轻薄本200个loop要跑一个小时左右,游戏本可能快些