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

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//////////////////////////////////////////////////////////////////////////
// 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 <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
/*! \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);
//! 字符分类
int classify(Mat, bool, bool);
int classify(Mat f);
//! 装载ANN模型
void LoadModel();
//! 装载ANN模型
void LoadModel(string s);
//! 设置与读取模型路径
inline void setModelPath(string path) { m_path = path; }
inline string getModelPath() const { return m_path; }
private:
//使用的ANN模型
CvANN_MLP ann;
//! 模型存储路径
string m_path;
//! 特征尺寸
int m_predictSize;
//! 省份对应map
std::map<string, string> m_map;
};
} /* \namespace easypr */
#endif /* endif __CHARS_IDENTIFY_H__ */