1.3
Micooz 11 years ago
parent 2ffae1307f
commit 3e409cc5ec

@ -24,6 +24,8 @@ class CCharsRecognise {
public:
CCharsRecognise();
~CCharsRecognise();
//! 字符分割与识别
int charsRecognise(Mat, String&);

@ -25,9 +25,11 @@ class CPlateDetect {
public:
CPlateDetect();
~CPlateDetect();
//! 深度车牌检测使用颜色与二次Sobel法综合
int plateDetect(Mat src, vector<CPlate>& resultVec,
bool showDetectArea = true, int index = 0);
bool showDetectArea = true, int index = 0);
//! 展示中间的结果
int showResult(const Mat& result);

@ -14,6 +14,14 @@
#define OS_LINUX
#endif
#ifndef SAFE_RELEASE
#define SAFE_RELEASE(p) \
if ((p)) { \
delete (p); \
(p) = NULL; \
}
#endif
namespace easypr {
class Utils {
public:

@ -1,4 +1,5 @@
#include "easypr/chars_recognise.h"
#include "easypr/util.h"
/*! \namespace easypr
Namespace where all the C++ EasyPR functionality resides
@ -6,11 +7,15 @@ Namespace where all the C++ EasyPR functionality resides
namespace easypr {
CCharsRecognise::CCharsRecognise() {
// cout << "CCharsRecognise" << endl;
m_charsSegment = new CCharsSegment();
m_charsIdentify = new CCharsIdentify();
}
CCharsRecognise::~CCharsRecognise() {
SAFE_RELEASE(m_charsSegment);
SAFE_RELEASE(m_charsIdentify);
}
void CCharsRecognise::LoadANN(string s) {
m_charsIdentify->LoadModel(s.c_str());
}

@ -15,10 +15,15 @@ CPlateDetect::CPlateDetect() {
m_maxPlates = 3;
}
CPlateDetect::~CPlateDetect() {
SAFE_RELEASE(m_plateLocate);
SAFE_RELEASE(m_plateJudge);
}
void CPlateDetect::LoadSVM(string s) { m_plateJudge->LoadModel(s.c_str()); }
int CPlateDetect::plateDetect(Mat src, vector<CPlate>& resultVec,
bool showDetectArea, int index) {
bool showDetectArea, int index) {
vector<Mat> resultPlates;
vector<CPlate> color_Plates;

Loading…
Cancel
Save