關於 easyPr的問題

原文鏈接:https://blog.csdn.net/weixin_41215479/article/details/89487742

easypr/src/util/kv.cpp:11: void easypr::Kv::load(const string&): Assertion `reader’ failed.

 

這裏實際上就是在其調用model的時候出現了問題,可能文件不存在,說明路徑錯了。

解決方案:
在include/easypr/config.h中將相對地址全部修改爲絕對地址   或者是正確的相對地址,下面的案例是用了絕對地址。

static const char* kDefaultSvmPath = "/home/mxy/qt_code/easypr5/model/svm_hist.xml";
static const char* kLBPSvmPath = "/home/mxy/qt_code/easypr5/model/svm_lbp.xml";
static const char* kHistSvmPath = "/home/mxy/qt_code/easypr5/model/svm_hist.xml";

static const char* kDefaultAnnPath = "/home/mxy/qt_code/easypr5/model/ann.xml";
static const char* kChineseAnnPath = "/home/mxy/qt_code/easypr5/model/ann_chinese.xml";
static const char* kGrayAnnPath = "/home/mxy/qt_code/easypr5/model/annCh.xml";

//This is important to for key transform to chinese
static const char* kChineseMappingPath = "/home/mxy/qt_code/easypr5/model/province_mapping";

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章