Merge branch 'master' of https://github.com/micooz/EasyPR into micooz-master
commit
75e797e6c1
@ -1,11 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BUILD_PATH="_build/"
|
||||
build_tmp="_build/"
|
||||
|
||||
if [ ! -e $BUILD_PATH ]; then
|
||||
mkdir $BUILD_PATH
|
||||
fi
|
||||
mkdir ${build_tmp} 2>/dev/null
|
||||
cd ${build_tmp}
|
||||
|
||||
cd _build/
|
||||
cmake ../
|
||||
make -j 4
|
||||
cmake --clean-first ..
|
||||
make -j 4 --makefile Makefile
|
||||
|
@ -0,0 +1,6 @@
|
||||
////////////////////////////////////
|
||||
BatchTest Option:
|
||||
1. general_test;
|
||||
2. native_test;
|
||||
3. 返回;
|
||||
////////////////////////////////////
|
@ -0,0 +1,18 @@
|
||||
make_a_choice 请选择一项操作
|
||||
input_error 输入错误,请重新输入
|
||||
|
||||
original_plate 原牌
|
||||
empty_plate 无车牌
|
||||
diff 差距
|
||||
char 字符
|
||||
error_code 错误码
|
||||
summaries 统计参数
|
||||
sum_pictures 总图片数
|
||||
unrecognized 未识出图片
|
||||
locate_rate 定位率
|
||||
diff_average 平均字符差距
|
||||
full_match 完全匹配数
|
||||
full_rate 完全匹配率
|
||||
seconds 总时间
|
||||
seconds_average 平均执行时间
|
||||
sec 秒
|
@ -0,0 +1,3 @@
|
||||
|
||||
我们EasyPR团队目前有一个5人左右的小组在进行EasyPR后续版本的开发工作。
|
||||
人数已满,暂时不接受应聘信息,谢谢!
|
@ -0,0 +1,11 @@
|
||||
////////////////////////////////////
|
||||
EasyPR Option:
|
||||
1. 测试;
|
||||
2. 批量测试;
|
||||
3. SVM训练;
|
||||
4. ANN训练;
|
||||
5. GDTS生成;
|
||||
6. 开发团队;
|
||||
7. 感谢名单;
|
||||
8. 退出;
|
||||
////////////////////////////////////
|
@ -0,0 +1,31 @@
|
||||
zh_cuan 川
|
||||
zh_gan1 甘
|
||||
zh_hei 黑
|
||||
zh_jin 津
|
||||
zh_liao 辽
|
||||
zh_min 闽
|
||||
zh_qiong 琼
|
||||
zh_sx 晋
|
||||
zh_xin 新
|
||||
zh_yue 粤
|
||||
zh_zhe 浙
|
||||
zh_e 鄂
|
||||
zh_gui 贵
|
||||
zh_hu 沪
|
||||
zh_jing 京
|
||||
zh_lu 鲁
|
||||
zh_ning 宁
|
||||
zh_shan 陕
|
||||
zh_wan 皖
|
||||
zh_yu 豫
|
||||
zh_yun 云
|
||||
zh_gan 赣
|
||||
zh_gui1 桂
|
||||
zh_ji 冀
|
||||
zh_jl 吉
|
||||
zh_meng 蒙
|
||||
zh_qing 青
|
||||
zh_su 苏
|
||||
zh_xiang 湘
|
||||
zh_yu1 渝
|
||||
zh_zang 藏
|
@ -0,0 +1,12 @@
|
||||
////////////////////////////////////
|
||||
EasyPR Test:
|
||||
1. test plate_locate(车牌定位);
|
||||
2. test plate_judge(车牌判断);
|
||||
3. test plate_detect(车牌检测);
|
||||
4. test chars_segment(字符分隔);
|
||||
5. test chars_identify(字符鉴别);
|
||||
6. test chars_recognise(字符识别);
|
||||
7. test plate_recognize(车牌识别);
|
||||
8. test all(测试全部);
|
||||
9. 返回;
|
||||
////////////////////////////////////
|
@ -1,69 +1,54 @@
|
||||
#ifndef EASYPR_CONFIG_H_
|
||||
#define EASYPR_CONFIG_H_
|
||||
|
||||
namespace easypr {
|
||||
|
||||
static const char* kDefaultSvmPath = "resources/model/svm.xml";
|
||||
static const char* kDefaultAnnPath = "resources/model/ann.xml";
|
||||
|
||||
typedef enum {
|
||||
kForward = 1, // correspond to "has plate"
|
||||
kInverse = 0 // correspond to "no plate"
|
||||
} SvmLabel;
|
||||
|
||||
static const float kSvmPercentage = 0.7f;
|
||||
static const int kPredictSize = 10;
|
||||
static const int kNeurons = 40;
|
||||
|
||||
static const char *kChars[] = {
|
||||
"0", "1", "2",
|
||||
"3", "4", "5",
|
||||
"6", "7", "8",
|
||||
"9",
|
||||
/* 10 */
|
||||
"A", "B", "C",
|
||||
"D", "E", "F",
|
||||
"G", "H", /* {"I", "I"} */
|
||||
"J", "K", "L",
|
||||
"M", "N", /* {"O", "O"} */
|
||||
"P", "Q", "R",
|
||||
"S", "T", "U",
|
||||
"V", "W", "X",
|
||||
"Y", "Z",
|
||||
/* 24 */
|
||||
"zh_cuan" , "zh_e" , "zh_gan" ,
|
||||
"zh_gan1" , "zh_gui" , "zh_gui1" ,
|
||||
"zh_hei" , "zh_hu" , "zh_ji" ,
|
||||
"zh_jin" , "zh_jing" , "zh_jl" ,
|
||||
"zh_liao" , "zh_lu" , "zh_meng" ,
|
||||
"zh_min" , "zh_ning" , "zh_qing" ,
|
||||
"zh_qiong", "zh_shan" , "zh_su" ,
|
||||
"zh_sx" , "zh_wan" , "zh_xiang",
|
||||
"zh_xin" , "zh_yu" , "zh_yu1" ,
|
||||
"zh_yue" , "zh_yun" , "zh_zang" ,
|
||||
"zh_zhe"
|
||||
/* 31 */
|
||||
};
|
||||
|
||||
static const std::map<std::string, std::string> kCharsMap = {
|
||||
{"zh_cuan" , "川"}, {"zh_e" , "鄂"}, {"zh_gan" , "赣"},
|
||||
{"zh_gan1" , "甘"}, {"zh_gui" , "贵"}, {"zh_gui1" , "桂"},
|
||||
{"zh_hei" , "黑"}, {"zh_hu" , "沪"}, {"zh_ji" , "冀"},
|
||||
{"zh_jin" , "津"}, {"zh_jing" , "京"}, {"zh_jl" , "吉"},
|
||||
{"zh_liao" , "辽"}, {"zh_lu" , "鲁"}, {"zh_meng" , "蒙"},
|
||||
{"zh_min" , "闽"}, {"zh_ning" , "宁"}, {"zh_qing" , "青"},
|
||||
{"zh_qiong", "琼"}, {"zh_shan" , "陕"}, {"zh_su" , "苏"},
|
||||
{"zh_sx" , "晋"}, {"zh_wan" , "皖"}, {"zh_xiang", "湘"},
|
||||
{"zh_xin" , "新"}, {"zh_yu" , "豫"}, {"zh_yu1" , "渝"},
|
||||
{"zh_yue" , "粤"}, {"zh_yun" , "云"}, {"zh_zang" , "藏"},
|
||||
{"zh_zhe" , "浙"}
|
||||
/* 31 */
|
||||
};
|
||||
|
||||
static const int kCharsTotalNumber = 65;
|
||||
|
||||
static bool kDebug = false;
|
||||
|
||||
}
|
||||
|
||||
#ifndef EASYPR_CONFIG_H_
|
||||
#define EASYPR_CONFIG_H_
|
||||
|
||||
namespace easypr {
|
||||
|
||||
static const char* kDefaultSvmPath = "resources/model/svm.xml";
|
||||
static const char* kDefaultAnnPath = "resources/model/ann.xml";
|
||||
|
||||
typedef enum {
|
||||
kForward = 1, // correspond to "has plate"
|
||||
kInverse = 0 // correspond to "no plate"
|
||||
} SvmLabel;
|
||||
|
||||
static const float kSvmPercentage = 0.7f;
|
||||
static const int kPredictSize = 10;
|
||||
static const int kNeurons = 40;
|
||||
|
||||
static const char *kChars[] = {
|
||||
"0", "1", "2",
|
||||
"3", "4", "5",
|
||||
"6", "7", "8",
|
||||
"9",
|
||||
/* 10 */
|
||||
"A", "B", "C",
|
||||
"D", "E", "F",
|
||||
"G", "H", /* {"I", "I"} */
|
||||
"J", "K", "L",
|
||||
"M", "N", /* {"O", "O"} */
|
||||
"P", "Q", "R",
|
||||
"S", "T", "U",
|
||||
"V", "W", "X",
|
||||
"Y", "Z",
|
||||
/* 24 */
|
||||
"zh_cuan" , "zh_e" , "zh_gan" ,
|
||||
"zh_gan1" , "zh_gui" , "zh_gui1" ,
|
||||
"zh_hei" , "zh_hu" , "zh_ji" ,
|
||||
"zh_jin" , "zh_jing" , "zh_jl" ,
|
||||
"zh_liao" , "zh_lu" , "zh_meng" ,
|
||||
"zh_min" , "zh_ning" , "zh_qing" ,
|
||||
"zh_qiong", "zh_shan" , "zh_su" ,
|
||||
"zh_sx" , "zh_wan" , "zh_xiang",
|
||||
"zh_xin" , "zh_yu" , "zh_yu1" ,
|
||||
"zh_yue" , "zh_yun" , "zh_zang" ,
|
||||
"zh_zhe"
|
||||
/* 31 */
|
||||
};
|
||||
|
||||
static const int kCharsTotalNumber = 65;
|
||||
|
||||
static bool kDebug = false;
|
||||
|
||||
}
|
||||
|
||||
#endif // EASYPR_CONFIG_H_
|
@ -1,30 +1,36 @@
|
||||
#ifndef EASYPR_CORE_FEATURE_H_
|
||||
#define EASYPR_CORE_FEATURE_H_
|
||||
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
namespace easypr {
|
||||
|
||||
//! 获得车牌的特征数
|
||||
cv::Mat getTheFeatures(cv::Mat in);
|
||||
|
||||
//! EasyPR的getFeatures回调函数
|
||||
//! 用于从车牌的image生成svm的训练特征features
|
||||
typedef void (*svmCallback)(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! EasyPR的getFeatures回调函数
|
||||
//! 本函数是获取垂直和水平的直方图图值
|
||||
void getHistogramFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! 本函数是获取SIFT特征子
|
||||
void getSIFTFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! 本函数是获取HOG特征子
|
||||
void getHOGFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! 本函数是获取HSV空间量化的直方图特征子
|
||||
void getHSVHistFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
} /*! \namespace easypr*/
|
||||
|
||||
#ifndef EASYPR_CORE_FEATURE_H_
|
||||
#define EASYPR_CORE_FEATURE_H_
|
||||
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
namespace easypr {
|
||||
|
||||
//! 获得车牌的特征数
|
||||
|
||||
cv::Mat getTheFeatures(cv::Mat in);
|
||||
|
||||
//! EasyPR的getFeatures回调函数
|
||||
//! 用于从车牌的image生成svm的训练特征features
|
||||
|
||||
typedef void (*svmCallback)(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! EasyPR的getFeatures回调函数
|
||||
//! 本函数是获取垂直和水平的直方图图值
|
||||
|
||||
void getHistogramFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! 本函数是获取SIFT特征子
|
||||
|
||||
void getSIFTFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! 本函数是获取HOG特征子
|
||||
|
||||
void getHOGFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
//! 本函数是获取HSV空间量化的直方图特征子
|
||||
|
||||
void getHSVHistFeatures(const cv::Mat& image, cv::Mat& features);
|
||||
|
||||
} /*! \namespace easypr*/
|
||||
|
||||
#endif // EASYPR_CORE_FEATURE_H_
|
@ -1,56 +1,61 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Name: plate Header
|
||||
// Version: 1.0
|
||||
// Date: 2015-03-12
|
||||
// Author: liuruoze
|
||||
// Copyright: liuruoze
|
||||
// Desciption:
|
||||
// An abstract class for car plate.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#ifndef EASYPR_CORE_PLATE_H_
|
||||
#define EASYPR_CORE_PLATE_H_
|
||||
|
||||
#include "core_func.h"
|
||||
|
||||
/*! \namespace easypr
|
||||
Namespace where all the C++ EasyPR functionality resides
|
||||
*/
|
||||
namespace easypr {
|
||||
|
||||
class CPlate {
|
||||
public:
|
||||
bool bColored;
|
||||
|
||||
//! 构造函数
|
||||
CPlate();
|
||||
|
||||
//! 设置与读取变量
|
||||
inline void setPlateMat(Mat param) { m_plateMat = param; }
|
||||
inline Mat getPlateMat() const { return m_plateMat; }
|
||||
|
||||
inline void setPlatePos(RotatedRect param) { m_platePos = param; }
|
||||
inline RotatedRect getPlatePos() const { return m_platePos; }
|
||||
|
||||
inline void setPlateStr(String param) { m_plateStr = param; }
|
||||
inline String getPlateStr() const { return m_plateStr; }
|
||||
|
||||
inline void setPlateLocateType(LocateType param) { m_locateType = param; }
|
||||
inline LocateType getPlateLocateType() const { return m_locateType; }
|
||||
|
||||
private:
|
||||
//! 车牌的图块
|
||||
Mat m_plateMat;
|
||||
|
||||
//! 车牌在原图的位置
|
||||
RotatedRect m_platePos;
|
||||
|
||||
//! 车牌字符串
|
||||
String m_plateStr;
|
||||
|
||||
//! 车牌定位的方法
|
||||
LocateType m_locateType;
|
||||
};
|
||||
|
||||
} /*! \namespace easypr*/
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Name: plate Header
|
||||
// Version: 1.0
|
||||
// Date: 2015-03-12
|
||||
// Author: liuruoze
|
||||
// Copyright: liuruoze
|
||||
// Desciption:
|
||||
// An abstract class for car plate.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#ifndef EASYPR_CORE_PLATE_H_
|
||||
#define EASYPR_CORE_PLATE_H_
|
||||
#include "core_func.h"
|
||||
|
||||
/*! \namespace easypr
|
||||
Namespace where all the C++ EasyPR functionality resides
|
||||
*/
|
||||
namespace easypr {
|
||||
|
||||
class CPlate {
|
||||
public:
|
||||
bool bColored;
|
||||
|
||||
//! 构造函数
|
||||
|
||||
CPlate();
|
||||
|
||||
//! 设置与读取变量
|
||||
|
||||
inline void setPlateMat(Mat param) { m_plateMat = param; }
|
||||
inline Mat getPlateMat() const { return m_plateMat; }
|
||||
|
||||
inline void setPlatePos(RotatedRect param) { m_platePos = param; }
|
||||
inline RotatedRect getPlatePos() const { return m_platePos; }
|
||||
|
||||
inline void setPlateStr(String param) { m_plateStr = param; }
|
||||
inline String getPlateStr() const { return m_plateStr; }
|
||||
|
||||
inline void setPlateLocateType(LocateType param) { m_locateType = param; }
|
||||
inline LocateType getPlateLocateType() const { return m_locateType; }
|
||||
|
||||
private:
|
||||
//! 车牌的图块
|
||||
|
||||
Mat m_plateMat;
|
||||
|
||||
//! 车牌在原图的位置
|
||||
|
||||
RotatedRect m_platePos;
|
||||
|
||||
//! 车牌字符串
|
||||
|
||||
String m_plateStr;
|
||||
|
||||
//! 车牌定位的方法
|
||||
|
||||
LocateType m_locateType;
|
||||
};
|
||||
|
||||
} /*! \namespace easypr*/
|
||||
|
||||
#endif // EASYPR_CORE_PLATE_H_
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue