Open haiqiang-qv opened 7 months ago
Problem solved: Publish it, give everyone some confidence.
在libeasypr项目中,找到头文件中的easypr文件夹,找到config.h文件。 In the libeasypr project, locate the easypr folder in the header file and locate the config.h file.
//#ifdef CV_VERSION_THREE_TWO,做出下面的修改,解决未找到匹配的重载函数问题 //直接将#ifdef CV_VERSION_THREE_TWO替换成#if ((CV_MAJOR_VERSION > 3) || (CV_MAJOR_VERSION==3 && //CV_MINOR_VERSION>=2))
//#ifdef CV_VERSION_THREE_TWO, make the following changes to solve the problem of not finding a matching overloaded //function // Replace #ifdef CV_VERSION_THREE_TWO with #if ((CV_MAJOR_VERSION > 3) || (CV_MAJOR_VERSION==3 && //CV_MINOR_VERSION>=2))
model = ml::SVM::load(path);
model = ml::ANN_MLP::load(path);
model = ml::SVM::load<ml::SVM>(path);
model = ml::ANN_MLP::load<ml::ANN_MLP>(path);
编译报错: 严重性 代码 说明 项目 文件 行 禁止显示状态 详细信息 错误 C2672 “cv::Algorithm::load”: 未找到匹配的重载函数 libeasypr C:\Users\Codegod、\Desktop\EasyPR-master\EasyPR-master\src\core\chars_identify.cpp 22
问题代码显示
CharsIdentify::CharsIdentify() { LOAD_ANNMODEL(ann, kDefaultAnnPath);//问题:ann_ = ml::ANN_MLP::load(kDefaultAnnPath); LOAD_ANNMODEL(annChinese, kChineseAnnPath); LOAD_ANNMODEL(annGray, kGrayAnnPath);
kv_ = std::sharedptr(new Kv);
kv ->load(kChineseMappingPath);
extractFeature = getGrayPlusProject; }
void CharsIdentify::LoadModel(std::string path) { if (path != std::string(kDefaultAnnPath)) { if (!ann->empty()) ann->clear(); LOAD_ANNMODEL(ann, path); } }
void CharsIdentify::LoadChineseModel(std::string path) { if (path != std::string(kChineseAnnPath)) { if (!annChinese->empty()) annChinese->clear(); LOAD_ANNMODEL(annChinese, path); } }