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

60 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
//////////////////////////////////////////////////////////////////////////
#ifndef __CHARS_IDENTIFY_H__
#define __CHARS_IDENTIFY_H__
#include "prep.h"
/*! \namespace easypr
Namespace where all the C++ EasyPR functionality resides
*/
namespace easypr {
class CCharsIdentify
{
public:
CCharsIdentify();
//! 字符鉴别
string charsIdentify(Mat, bool, bool);
string charsIdentify(Mat input);
11 years ago
//! 字符分类
int classify(Mat, bool,bool);
int classify(Mat f);
//! 装载ANN模型
11 years ago
void LoadModel();
//! 装载ANN模型
11 years ago
void LoadModel(string s);
//! 设置与读取模型路径
11 years ago
inline void setModelPath(string path){ m_path = path; }
inline string getModelPath() const{ return m_path; }
private:
//使用的ANN模型
11 years ago
CvANN_MLP ann;
//! 模型存储路径
11 years ago
string m_path;
//! 特征尺寸
11 years ago
int m_predictSize;
//! 省份对应map
11 years ago
map<string, string> m_map;
};
} /* \namespace easypr */
#endif /* endif __CHARS_IDENTIFY_H__ */