Skip to content

Commit

Permalink
Merge branch 'master' of https://git.oschina.net/easypr/EasyPR
Browse files Browse the repository at this point in the history
Conflicts:
	Demo.vcxproj.filters
	accuracy.txt
	include/easypr/config.h
	include/easypr/core/chars_identify.h
	include/easypr/core/plate.h
	include/easypr/core/plate_judge.h
	include/easypr/core/plate_recognize.h
	src/core/chars_identify.cpp
	src/core/chars_recognise.cpp
	src/core/plate_detect.cpp
	src/core/plate_judge.cpp
	src/core/plate_recognize.cpp
	test/accuracy.hpp
	test/chars.hpp
	vcprojs/demo.vcxproj
	vcprojs/demo.vcxproj.filters
	vcprojs/demo.vcxproj.filters.orig
	vcprojs/libeasypr.vcxproj
	vcprojs/libeasypr.vcxproj.filters
  • Loading branch information
liuruoze committed Jun 14, 2016
2 parents e962b57 + f91b2e6 commit 93f8337
Show file tree
Hide file tree
Showing 90 changed files with 18,988 additions and 219 deletions.
220 changes: 172 additions & 48 deletions accuracy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1281,46 +1281,46 @@
��ͼƬ��:204��, δʶ��ͼƬ:6��, ��λ��:97.0588%
ƽ���ַ����:0.550505��, ��ȫƥ����:144��, ��ȫƥ����:72.7273%
��ʱ��:195��, ƽ��ִ��ʱ��:0.955882��
2015-08-03 14:05:55
��ͼƬ��:204��, δʶ��ͼƬ:6��, ��λ��:97.0588%
ƽ���ַ����:0.550505��, ��ȫƥ����:143��, ��ȫƥ����:72.2222%
��ʱ��:291��, ƽ��ִ��ʱ��:1.42647��
2016-05-30 15:08:22
��ͼƬ��:204��, δʶ��ͼƬ:6��, ��λ��:97.0588%
ƽ���ַ����:0.550505��, ��ȫƥ����:143��, ��ȫƥ����:72.2222%
��ʱ��:310��, ƽ��ִ��ʱ��:1.51961��
2016-05-30 16:12:30
��ͼƬ��:10��, δʶ��ͼƬ:0��, ��λ��:100%
ƽ���ַ����:0.6��, ��ȫƥ����:8��, ��ȫƥ����:80%
��ʱ��:9��, ƽ��ִ��ʱ��:0.9��
2016-05-30 16:18:39
��ͼƬ��:10��, δʶ��ͼƬ:0��, ��λ��:100%
ƽ���ַ����:0.6��, ��ȫƥ����:8��, ��ȫƥ����:80%
��ʱ��:8��, ƽ��ִ��ʱ��:0.8��
2016-05-30 16:25:23
��ͼƬ��:10��, δʶ��ͼƬ:0��, ��λ��:100%
ƽ���ַ����:0.6��, ��ȫƥ����:8��, ��ȫƥ����:80%
��ʱ��:8��, ƽ��ִ��ʱ��:0.8��
2016-05-30 16:41:45
��ͼƬ��:10��, δʶ��ͼƬ:0��, ��λ��:100%
ƽ���ַ����:0.6��, ��ȫƥ����:8��, ��ȫƥ����:80%
��ʱ��:8��, ƽ��ִ��ʱ��:0.8��
2016-05-30 16:56:59
��ͼƬ��:10��, δʶ��ͼƬ:0��, ��λ��:100%
ƽ���ַ����:0.6��, ��ȫƥ����:8��, ��ȫƥ����:80%
��ʱ��:8��, ƽ��ִ��ʱ��:0.8��
2016-05-30 17:08:54
��ͼƬ��:204��, δʶ��ͼƬ:6��, ��λ��:97.0588%
ƽ���ַ����:0.550505��, ��ȫƥ����:143��, ��ȫƥ����:72.2222%
��ʱ��:324��, ƽ��ִ��ʱ��:1.58824��
2016-05-30 17:17:21
��ͼƬ��:10��, δʶ��ͼƬ:0��, ��λ��:100%
ƽ���ַ����:0.6��, ��ȫƥ����:8��, ��ȫƥ����:80%
��ʱ��:9��, ƽ��ִ��ʱ��:0.9��
2016-05-30 17:20:29
��ͼƬ��:10��, δʶ��ͼƬ:0��, ��λ��:100%
ƽ���ַ����:0.6��, ��ȫƥ����:8��, ��ȫƥ����:80%
��ʱ��:7��, ƽ��ִ��ʱ��:0.7��
2015-12-03 19:52:21
��ͼƬ��:204��, δʶ��ͼƬ:3��, ��λ��:98.5294%
ƽ���ַ����:0.681592��, ��ȫƥ����:141��, ��ȫƥ����:70.1493%
��ʱ��:171��, ƽ��ִ��ʱ��:0.838235��
2015-12-03 19:53:11
��ͼƬ��:21��, δʶ��ͼƬ:7��, ��λ��:66.6667%
ƽ���ַ����:2.35714��, ��ȫƥ����:4��, ��ȫƥ����:28.5714%
��ʱ��:4��, ƽ��ִ��ʱ��:0.190476��
2015-12-03 20:11:38
��ͼƬ��:204��, δʶ��ͼƬ:3��, ��λ��:98.5294%
ƽ���ַ����:0.681592��, ��ȫƥ����:141��, ��ȫƥ����:70.1493%
��ʱ��:155��, ƽ��ִ��ʱ��:0.759804��
2015-12-03 20:35:20
��ͼƬ��:204��, δʶ��ͼƬ:3��, ��λ��:98.5294%
ƽ���ַ����:0.641791��, ��ȫƥ����:144��, ��ȫƥ����:71.6418%
��ʱ��:161��, ƽ��ִ��ʱ��:0.789216��
2015-12-30 07:58:57
��ͼƬ��:204��, δʶ��ͼƬ:3��, ��λ��:98.5294%
ƽ���ַ����:0.681592��, ��ȫƥ����:141��, ��ȫƥ����:70.1493%
��ʱ��:174��, ƽ��ִ��ʱ��:0.852941��
2015-12-30 08:07:06
��ͼƬ��:204��, δʶ��ͼƬ:3��, ��λ��:98.5294%
ƽ���ַ����:0.641791��, ��ȫƥ����:144��, ��ȫƥ����:71.6418%
��ʱ��:179��, ƽ��ִ��ʱ��:0.877451��
2015-12-30 08:13:36
��ͼƬ��:204��, δʶ��ͼƬ:3��, ��λ��:98.5294%
ƽ���ַ����:0.696517��, ��ȫƥ����:144��, ��ȫƥ����:71.6418%
��ʱ��:179��, ƽ��ִ��ʱ��:0.877451��
2015-12-30 08:38:13
��ͼƬ��:204��, δʶ��ͼƬ:3��, ��λ��:98.5294%
ƽ���ַ����:0.681592��, ��ȫƥ����:141��, ��ȫƥ����:70.1493%
��ʱ��:178��, ƽ��ִ��ʱ��:0.872549��
2016-01-12 09:46:45
��ͼƬ��:204��, δʶ��ͼƬ:5��, ��λ��:97.549%
ƽ���ַ����:0.688442��, ��ȫƥ����:141��, ��ȫƥ����:70.8543%
��ʱ��:180��, ƽ��ִ��ʱ��:0.882353��
2016-01-12 09:53:28
��ͼƬ��:204��, δʶ��ͼƬ:57��, ��λ��:72.0588%
ƽ���ַ����:1.4898��, ��ȫƥ����:87��, ��ȫƥ����:59.1837%
��ʱ��:187��, ƽ��ִ��ʱ��:0.916667��
2016-01-12 10:00:05
��ͼƬ��:204��, δʶ��ͼƬ:5��, ��λ��:97.549%
ƽ���ַ����:0.688442��, ��ȫƥ����:141��, ��ȫƥ����:70.8543%
Expand Down Expand Up @@ -1373,15 +1373,139 @@
��ͼƬ��:204, δʶ��ͼƬ:5, ��λ��:97.549%
ƽ���ַ����:0.643216, ��ȫƥ����:144, ��ȫƥ����:72.3618%
��ʱ��:217��, ƽ��ִ��ʱ��:1.06373��
2016-06-13 15:12:01
2016-04-14 21:19:51
��ͼƬ��:1, δʶ��ͼƬ:0, ��λ��:100%
ƽ���ַ����:8, ��ȫƥ����:0, ��ȫƥ����:0%
��ʱ��:2��, ƽ��ִ��ʱ��:2��
2016-04-14 21:21:58
��ͼƬ��:1, δʶ��ͼƬ:0, ��λ��:100%
ƽ���ַ����:8, ��ȫƥ����:0, ��ȫƥ����:0%
��ʱ��:107��, ƽ��ִ��ʱ��:107��
2016-05-30 21:33:01
��ͼƬ��:204, δʶ��ͼƬ:5, ��λ��:97.549%
ƽ���ַ����:0.643216, ��ȫƥ����:144, ��ȫƥ����:72.3618%
��ʱ��:324��, ƽ��ִ��ʱ��:1.58824��
2016-06-13 15:17:44
��ͼƬ��:8, δʶ��ͼƬ:7, ��λ��:12.5%
ƽ���ַ����:1, ��ȫƥ����:0, ��ȫƥ����:0%
��ʱ��:8��, ƽ��ִ��ʱ��:1��
2016-06-13 16:47:30
��ʱ��:188��, ƽ��ִ��ʱ��:0.921569��
2016-05-30 21:35:29
��ͼƬ��:10, δʶ��ͼƬ:0, ��λ��:100%
ƽ���ַ����:0.6, ��ȫƥ����:8, ��ȫƥ����:80%
��ʱ��:6��, ƽ��ִ��ʱ��:0.6��
2016-05-30 21:36:00
��ͼƬ��:10, δʶ��ͼƬ:0, ��λ��:100%
ƽ���ַ����:0.6, ��ȫƥ����:8, ��ȫƥ����:80%
��ʱ��:6��, ƽ��ִ��ʱ��:0.6��
2016-05-30 21:46:00
��ͼƬ��:204, δʶ��ͼƬ:5, ��λ��:97.549%
ƽ���ַ����:0.643216, ��ȫƥ����:144, ��ȫƥ����:72.3618%
��ʱ��:320��, ƽ��ִ��ʱ��:1.56863��
��ʱ��:190��, ƽ��ִ��ʱ��:0.931373��
2016-05-30 22:11:47
��ͼƬ��:204, δʶ��ͼƬ:5, ��λ��:97.549%
ƽ���ַ����:0.643216, ��ȫƥ����:144, ��ȫƥ����:72.3618%
��ʱ��:188��, ƽ��ִ��ʱ��:0.921569��
2016-05-31 08:34:11
��ͼƬ��:1, δʶ��ͼƬ:1, ��λ��:0%
ƽ���ַ����:0, ��ȫƥ����:0, ��ȫƥ����:0%
��ʱ��:38��, ƽ��ִ��ʱ��:38��
2016-05-31 09:50:04
��ͼƬ��:1, δʶ��ͼƬ:1, ��λ��:0%
ƽ���ַ����:0, ��ȫƥ����:0, ��ȫƥ����:0%
��ʱ��:83��, ƽ��ִ��ʱ��:83��
2016-05-31 09:52:11
��ͼƬ��:1, δʶ��ͼƬ:1, ��λ��:0%
ƽ���ַ����:0, ��ȫƥ����:0, ��ȫƥ����:0%
��ʱ��:75��, ƽ��ִ��ʱ��:75��
2016-05-31 09:53:43
��ͼƬ��:1, δʶ��ͼƬ:1, ��λ��:0%
ƽ���ַ����:0, ��ȫƥ����:0, ��ȫƥ����:0%
��ʱ��:82��, ƽ��ִ��ʱ��:82��
2016-05-31 10:00:18
��ͼƬ��:1, δʶ��ͼƬ:1, ��λ��:0%
ƽ���ַ����:0, ��ȫƥ����:0, ��ȫƥ����:0%
��ʱ��:73��, ƽ��ִ��ʱ��:73��
2016-05-31 10:15:29
��ͼƬ��:1, δʶ��ͼƬ:1, ��λ��:0%
ƽ���ַ����:0, ��ȫƥ����:0, ��ȫƥ����:0%
��ʱ��:7��, ƽ��ִ��ʱ��:7��
2016-05-31 10:43:54
��ͼƬ��:1, δʶ��ͼƬ:1, ��λ��:0%
ƽ���ַ����:0, ��ȫƥ����:0, ��ȫƥ����:0%
��ʱ��:366��, ƽ��ִ��ʱ��:366��
2016-05-31 15:39:20
��ͼƬ��:3, δʶ��ͼƬ:0, ��λ��:100%
ƽ���ַ����:4.66667, ��ȫƥ����:0, ��ȫƥ����:0%
��ʱ��:25��, ƽ��ִ��ʱ��:8.33333��
2016-05-31 15:42:50
��ͼƬ��:204, δʶ��ͼƬ:5, ��λ��:97.549%
ƽ���ַ����:0.638191, ��ȫƥ����:145, ��ȫƥ����:72.8643%
��ʱ��:184��, ƽ��ִ��ʱ��:0.901961��
2016-05-31 15:57:25
��ͼƬ��:3, δʶ��ͼƬ:0, ��λ��:100%
ƽ���ַ����:4.33333, ��ȫƥ����:0, ��ȫƥ����:0%
��ʱ��:1��, ƽ��ִ��ʱ��:0.333333��
2016-05-31 16:01:00
��ͼƬ��:204, δʶ��ͼƬ:5, ��λ��:97.549%
ƽ���ַ����:0.552764, ��ȫƥ����:148, ��ȫƥ����:74.3719%
��ʱ��:185��, ƽ��ִ��ʱ��:0.906863��
2016-05-31 20:29:46
��ͼƬ��:204, δʶ��ͼƬ:5, ��λ��:97.549%
ƽ���ַ����:0.552764, ��ȫƥ����:148, ��ȫƥ����:74.3719%
��ʱ��:15579��, ƽ��ִ��ʱ��:76.3676��
2016-05-31 20:39:55
��ͼƬ��:204, δʶ��ͼƬ:5, ��λ��:97.549%
ƽ���ַ����:0.552764, ��ȫƥ����:148, ��ȫƥ����:74.3719%
��ʱ��:197��, ƽ��ִ��ʱ��:0.965686��
2016-06-01 15:52:23
��ͼƬ��:24, δʶ��ͼƬ:15, ��λ��:37.5%
ƽ���ַ����:3.77778, ��ȫƥ����:1, ��ȫƥ����:11.1111%
��ʱ��:40��, ƽ��ִ��ʱ��:1.66667��
2016-06-01 15:55:25
��ͼƬ��:24, δʶ��ͼƬ:15, ��λ��:37.5%
ƽ���ַ����:3.77778, ��ȫƥ����:1, ��ȫƥ����:11.1111%
��ʱ��:146��, ƽ��ִ��ʱ��:6.08333��
2016-06-01 17:42:24
��ͼƬ��:42, δʶ��ͼƬ:22, ��λ��:47.619%
ƽ���ַ����:3.35, ��ȫƥ����:3, ��ȫƥ����:15%
��ʱ��:5314��, ƽ��ִ��ʱ��:126.524��
2016-06-13 19:38:10
��ͼƬ��:200, δʶ��ͼƬ:5, ��λ��:97.5%
ƽ���ַ����:0.553846, ��ȫƥ����:146, ��ȫƥ����:74.8718%
��ʱ��:187��, ƽ��ִ��ʱ��:0.935��
2016-06-13 19:39:44
��ͼƬ��:42, δʶ��ͼƬ:22, ��λ��:47.619%
ƽ���ַ����:3.35, ��ȫƥ����:3, ��ȫƥ����:15%
��ʱ��:41��, ƽ��ִ��ʱ��:0.97619��
2016-06-13 19:57:56
��ͼƬ��:200, δʶ��ͼƬ:5, ��λ��:97.5%
ƽ���ַ����:0.553846, ��ȫƥ����:146, ��ȫƥ����:74.8718%
��ʱ��:185��, ƽ��ִ��ʱ��:0.925��
2016-06-13 21:05:50
��ͼƬ��:200, δʶ��ͼƬ:5, ��λ��:97.5%
ƽ���ַ����:0.553846, ��ȫƥ����:146, ��ȫƥ����:74.8718%
��ʱ��:185��, ƽ��ִ��ʱ��:0.925��
2016-06-13 21:19:33
��ͼƬ��:200, δʶ��ͼƬ:9, ��λ��:95.5%
ƽ���ַ����:0.581152, ��ȫƥ����:143, ��ȫƥ����:74.8691%
��ʱ��:186��, ƽ��ִ��ʱ��:0.93��
2016-06-13 21:57:59
��ͼƬ��:200, δʶ��ͼƬ:7, ��λ��:96.5%
ƽ���ַ����:0.678756, ��ȫƥ����:133, ��ȫƥ����:68.9119%
��ʱ��:195��, ƽ��ִ��ʱ��:0.975��
2016-06-14 07:48:35
��ͼƬ��:200, δʶ��ͼƬ:7, ��λ��:96.5%
ƽ���ַ����:0.689119, ��ȫƥ����:132, ��ȫƥ����:68.3938%
��ʱ��:182��, ƽ��ִ��ʱ��:0.91��
2016-06-14 07:58:05
��ͼƬ��:200, δʶ��ͼƬ:10, ��λ��:95%
ƽ���ַ����:1.11053, ��ȫƥ����:117, ��ȫƥ����:61.5789%
��ʱ��:182��, ƽ��ִ��ʱ��:0.91��
2016-06-14 08:04:41
��ͼƬ��:200, δʶ��ͼƬ:7, ��λ��:96.5%
ƽ���ַ����:0.689119, ��ȫƥ����:132, ��ȫƥ����:68.3938%
��ʱ��:189��, ƽ��ִ��ʱ��:0.945��
2016-06-14 08:13:28
��ͼƬ��:200, δʶ��ͼƬ:7, ��λ��:96.5%
ƽ���ַ����:0.689119, ��ȫƥ����:132, ��ȫƥ����:68.3938%
��ʱ��:187��, ƽ��ִ��ʱ��:0.935��
2016-06-14 08:32:20
��ͼƬ��:200, δʶ��ͼƬ:7, ��λ��:96.5%
ƽ���ַ����:0.689119, ��ȫƥ����:132, ��ȫƥ����:68.3938%
��ʱ��:192��, ƽ��ִ��ʱ��:0.96��
2 changes: 1 addition & 1 deletion include/easypr/api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <string>
#include <vector>
#include <opencv2/opencv.hpp>
#include "opencv2/opencv.hpp"

namespace easypr {

Expand Down
1 change: 1 addition & 0 deletions include/easypr/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ static const char *kChars[] = {
/* 31 */
};

static const int kCharactersNumber = 34;
static const int kCharsTotalNumber = 65;

static bool kDebug = false;
Expand Down
6 changes: 4 additions & 2 deletions include/easypr/core/chars_identify.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@

#include "easypr/util/kv.h"
#include <memory>
#include <opencv2/opencv.hpp>
#include "opencv2/opencv.hpp"

namespace easypr {

class CharsIdentify {
public:
static CharsIdentify* instance();

std::pair<std::string, std::string> identify(cv::Mat input);
int classify(cv::Mat f, bool isChinses = false);

std::pair<std::string, std::string> identify(cv::Mat input, bool isChinese = false);

private:
CharsIdentify();
Expand Down
38 changes: 33 additions & 5 deletions include/easypr/core/plate.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,21 @@ class CPlate {
public:
bool bColored;

//! 构造函数
//! 构造函ć•

CPlate();

//! 设置与读取变量
CPlate(const CPlate& plate)
{
m_plateMat = plate.m_plateMat;
m_score = plate.m_score;
m_platePos = plate.m_platePos;
m_plateStr = plate.m_plateStr;
m_locateType = plate.m_locateType;
}


//! 设置与读取变é‡

inline void setPlateMat(Mat param) { m_plateMat = param; }
inline Mat getPlateMat() const { return m_plateMat; }
Expand All @@ -38,22 +48,40 @@ class CPlate {
inline void setPlateLocateType(LocateType param) { m_locateType = param; }
inline LocateType getPlateLocateType() const { return m_locateType; }

inline void setPlateScore(double param) { m_score = param; }
inline double getPlateScore() const { return m_score; }

bool operator < (const CPlate& plate) const
{
return (m_score < plate.m_score);
}

bool operator < (const CPlate& plate)
{
return (m_score < plate.m_score);
}

private:
//! 车牌的图块
//! 车牌的图ĺť

Mat m_plateMat;

//! 车牌在原图的位置

RotatedRect m_platePos;

//! 车牌字符串
//! 车牌字符ä¸

String m_plateStr;

//! 车牌定位的方法
//! 车牌定位的方ćł

LocateType m_locateType;

//! 车牌的置信度

double m_score;

};

} /*! \namespace easypr*/
Expand Down
2 changes: 2 additions & 0 deletions include/easypr/core/plate_judge.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class PlateJudge {
//! 对多幅车牌进行SVM判断

int plateJudge(const std::vector<CPlate> &, std::vector<CPlate> &);
int plateJudgeUsingNMS(const std::vector<CPlate> &, std::vector<CPlate> &);

//! 车牌判断

Expand All @@ -22,6 +23,7 @@ class PlateJudge {
//! 车牌判断(一副图像)

int plateJudge(const Mat &inMat, int &result);
int plateSetScore(CPlate& plate);

private:
PlateJudge();
Expand Down
5 changes: 4 additions & 1 deletion include/easypr/core/plate_recognize.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ class CPlateRecognize : public CPlateDetect, public CCharsRecognise {
CPlateRecognize();

//! 车牌检测与字符识别

int plateRecognize(Mat src, std::vector<CPlate> &licenseVec);
int plateRecognize(Mat src, std::vector<std::string> &licenseVec);

int plateRecognizeAsText(Mat src, std::vector<CPlate> &licenseVec);
int plateRecognizeAsTextNM(Mat src, std::vector<CPlate> &licenseVec);

//! 生活模式与工业模式切æ

inline void setLifemode(bool param) { CPlateDetect::setPDLifemode(param); }
Expand Down
2 changes: 1 addition & 1 deletion include/easypr/util/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <iostream>
#include <string>
#include <vector>
#include <opencv2/core/core.hpp>
#include "opencv2/core/core.hpp"

#if defined(WIN32) || defined(_WIN32)
#define OS_WINDOWS
Expand Down
Loading

0 comments on commit 93f8337

Please sign in to comment.