linuxxx / EasyPR_Android

EasyPR移植到Android版本
508 stars 251 forks source link

E/cv::error(): OpenCV Error: Parsing error (Missing or invalid SVM type) #21

Open kingjames92 opened 8 years ago

kingjames92 commented 8 years ago

已经安装好apk,刚打开就闪退,run记录上写着 E/cv::error(): OpenCV Error: Parsing error (Missing or invalid SVM type) in void cv::ml::SVMImpl::read_params(const cv::FileNode&), file /Volumes/Linux/builds/master_pack-android/opencv/modules/ml/src/svm.cpp, line 2122 求大神解释。。用windows平台和mac平台都显示这个错误信息。

kingjames92 commented 8 years ago

svm.xml文件就存在res/raw里。不知道是不是opencv的问题啊。

flyingnn commented 7 years ago

用新的1.5 的EasyPR,就出现这个问题,如何解决呢?

flyingnn commented 7 years ago

可以了,要改点代码, PlateJudge::PlateJudge() { //svm = ml::SVM::load(kDefaultSvmPath); //svm = ml::SVM::load(kLBPSvmPath);
extractFeature = getLBPFeatures; }

void PlateJudge::LoadModel(std::string path) { /* if (path != std::string(kDefaultSvmPath)) {

  if (!svm_->empty())
    svm_->clear();

  svm_ = ml::SVM::load<ml::SVM>(path);
}
*/
svm_ = ml::SVM::load<ml::SVM>(path);

}