Open LarryDong opened 4 years ago
That works for me, many thx!
I encountered the similar question "terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(4.2.0) ../modules/core/src/persistence.cpp:1730: error: (-215:Assertion failed) blockIdx < fs_data_ptrs.size() in function 'getNodePtr'". This solution works as well.
在运行时提示错误"Segmentation fault (core dumpted)" 经过一行行输出,发现问题出现在"visualodometry.cpp"中:("dataset_dir")));`
不确定和 issue #18 是否相同。
但下面提供的解决方法能够解决:
https://blog.csdn.net/sinat_39720504/article/details/102481421
bool VisualOdometry::Init()
中的`dataset=Dataset::Ptr(new Dataset(Config::Get即,将
Config::SetParameterFile
函数中config_->file_ = cv::FileStorage(filename.c_str(), cv::FileStorage::READ);
修改为
static cv::FileStorage file1( filename.c_str(), cv::FileStorage::READ ); config_->file_ = file1;
c++水平不高,也搞不清楚原理。放到这里希望对其他人有所帮助。