-
Notifications
You must be signed in to change notification settings - Fork 367
Open
Description
你好,这个对识别的图片有什么要求么,我用手机拍照之后,然后压缩了之后,仍然无法识别出了。调试发现
/**
* 对多幅图像进行SVM判断
*
* @param inVec
* @param resultVec
* @return
*/
public int plateJudge(Vector inVec, Vector resultVec) {
for (int j = 0; j < inVec.size(); j++) {
Mat inMat = inVec.get(j);
if (1 == plateJudge(inMat)) {
resultVec.add(inMat);
} else { // 再取中间部分判断一次
int w = inMat.cols();
int h = inMat.rows();
Mat tmpDes = inMat.clone();
Mat tmpMat = new Mat(inMat, new Rect((int) (w * 0.05), (int) (h * 0.1), (int) (w * 0.9),
(int) (h * 0.8)));
resize(tmpMat, tmpDes, new Size(inMat.size()));
if (plateJudge(tmpDes) == 1) {
resultVec.add(inMat);
}
}
}
return 0;
}
这个方法,对于你提供的测试图片 返回就是1 但是对我拍照的图片返回值就 0 要么就报 Bad argument (INTERNAL ERROR: Unknown SVM type, the SVM structure is probably corrupted) in CvSVM::predict。。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels