* little change

v1.6alpha
liuruoze 8 years ago
parent db253f2979
commit 19a2aaa4b7

@ -11,16 +11,8 @@ CCharsRecognise::~CCharsRecognise() { SAFE_RELEASE(m_charsSegment); }
int CCharsRecognise::charsRecognise(Mat plate, std::string& plateLicense) {
std::vector<Mat> matChars;
int result = m_charsSegment->charsSegment(plate, matChars);
//std::cout << "charsSegment:" << result << std::endl;
if (result == 0) {
//for (auto block : matChars) {
// auto character = CharsIdentify::instance()->identify(block);
// plateLicense.append(character.second);
//}
int num = matChars.size();
for (int j = 0; j < num; j++)
{

@ -108,22 +108,9 @@ namespace easypr {
CPlateRecognize pr;
pr.setResultShow(false);
pr.setLifemode(true);
int mode = PR_MODE_UNCONSTRAINED;
//int mode = PR_MODE_CAMERPOHNE;
//int mode = -1;
if (PR_MODE_UNCONSTRAINED == mode) {
pr.setDetectType(PR_DETECT_COLOR | PR_DETECT_CMSER);
pr.setMaxPlates(4);
} else if (PR_MODE_CAMERPOHNE == mode) {
pr.setDetectType(PR_DETECT_COLOR | PR_DETECT_CMSER);
pr.setMaxPlates(1);
} else {
pr.setDetectType(PR_DETECT_CMSER );
pr.setMaxPlates(1);
}
//pr.setDetectType(PR_DETECT_COLOR | PR_DETECT_SOBEL);
pr.setDetectType(PR_DETECT_COLOR | PR_DETECT_CMSER);
pr.setMaxPlates(4);
// load the maching learning model
//pr.LoadSVM("resources/model/svm.xml");
pr.LoadANN("resources/model/ann.xml");

Loading…
Cancel
Save