You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
EasyPR/include/easypr/chars_identify.h

63 lines
1.3 KiB

11 years ago
//////////////////////////////////////////////////////////////////////////
// Name: chars_identify Header
// Version: 1.0
// Date: 2014-09-25
// Author: liuruoze
// Copyright: liuruoze
// Reference: Mastering OpenCV with Practical Computer Vision Projects
// Reference: CSDN Bloger taotao1233
// Desciption:
// Defines CCharsIdentify
11 years ago
//////////////////////////////////////////////////////////////////////////
#ifndef __CHARS_IDENTIFY_H__
#define __CHARS_IDENTIFY_H__
#include <opencv2/opencv.hpp>
11 years ago
using namespace cv;
using namespace std;
/*! \namespace easypr
Namespace where all the C++ EasyPR functionality resides
*/
11 years ago
namespace easypr {
class CCharsIdentify {
public:
CCharsIdentify();
11 years ago
//! <20>ַ<EFBFBD><D6B7>ָ<EFBFBD>
string charsIdentify(Mat, bool, bool);
string charsIdentify(Mat input);
11 years ago
//! <20>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>
int classify(Mat, bool, bool);
int classify(Mat f);
11 years ago
//! װ<><D7B0>ANNģ<4E><C4A3>
void LoadModel();
11 years ago
//! װ<><D7B0>ANNģ<4E><C4A3>
void LoadModel(string s);
11 years ago
//! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡģ<C8A1><C4A3>·<EFBFBD><C2B7>
inline void setModelPath(string path) { m_path = path; }
inline string getModelPath() const { return m_path; }
private:
//<2F><>ʹ<EFBFBD>õ<EFBFBD>ANNģ<4E><C4A3>
CvANN_MLP ann;
//! ģ<>ʹ洢·<E6B4A2><C2B7>
string m_path;
//! <20><><EFBFBD><EFBFBD><EFBFBD>ߴ<EFBFBD>
int m_predictSize;
//! ʡ<>ݶ<EFBFBD>Ӧmap
std::map<string, string> m_map;
11 years ago
};
} /* \namespace easypr */
11 years ago
#endif /* endif __CHARS_IDENTIFY_H__ */