add version.h

v1.6alpha
liuruoze 10 years ago
parent 902a02f884
commit ea5ee79cf2

@ -1489,3 +1489,19 @@
总图片数: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秒

@ -23,7 +23,7 @@ class PlateJudge {
//! 车牌判断(一副图像)
int plateJudge(const Mat &inMat, int &result);
int plateScore(CPlate& plate);
int plateSetScore(CPlate& plate);
private:
PlateJudge();

@ -127,8 +127,8 @@
<image>
<imageName>½òDTG667</imageName>
<taggedRectangles>
<taggedRectangle x="675" y="64" width="58" height="12" rotation="0" locateType="0">未知:宁1Q1111</taggedRectangle>
<taggedRectangle x="668" y="703" width="47" height="176" rotation="-84" locateType="1">À¶ÅÆ:½òDTG667</taggedRectangle>
<taggedRectangle x="675" y="64" width="58" height="12" rotation="0" locateType="0">δ֪:ÔÆJ1M111</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -241,7 +241,7 @@
<image>
<imageName>ÕãA13840</imageName>
<taggedRectangles>
<taggedRectangle x="308" y="252" width="61" height="182" rotation="-87" locateType="0">δ֪:ÕãA13840</taggedRectangle>
<taggedRectangle x="308" y="254" width="62" height="180" rotation="-87" locateType="0">黄牌:津A13840</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -253,7 +253,7 @@
<image>
<imageName>ÕãA50819</imageName>
<taggedRectangles>
<taggedRectangle x="352" y="238" width="59" height="176" rotation="-86" locateType="0">À¶ÅÆ:ÃöA50879</taggedRectangle>
<taggedRectangle x="351" y="239" width="57" height="179" rotation="-87" locateType="0">蓝牌:浙A5089</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -277,13 +277,13 @@
<image>
<imageName>ÕãA88888</imageName>
<taggedRectangles>
<taggedRectangle x="252" y="283" width="183" height="58" rotation="-4" locateType="1">À¶ÅÆ:»¦LV8888</taggedRectangle>
<taggedRectangle x="251" y="281" width="192" height="62" rotation="-2" locateType="0">蓝牌:浙A88888</taggedRectangle>
</taggedRectangles>
</image>
<image>
<imageName>ÕãA95044</imageName>
<taggedRectangles>
<taggedRectangle x="442" y="269" width="53" height="178" rotation="-85" locateType="0">À¶ÅÆ:ÃöQ95044</taggedRectangle>
<taggedRectangle x="442" y="268" width="53" height="185" rotation="-86" locateType="0">蓝牌:浙A950AA</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -295,7 +295,7 @@
<image>
<imageName>ÕãAA4586</imageName>
<taggedRectangles>
<taggedRectangle x="127" y="166" width="46" height="162" rotation="-86" locateType="0">δ֪:ÕãAAA586</taggedRectangle>
<taggedRectangle x="137" y="172" width="49" height="137" rotation="-90" locateType="0">未知:琼RA4586</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -379,8 +379,8 @@
<image>
<imageName>ÏæA07G31</imageName>
<taggedRectangles>
<taggedRectangle x="899" y="651" width="129" height="33" rotation="-2" locateType="1">蓝牌:川AD7G31</taggedRectangle>
<taggedRectangle x="96" y="885" width="191" height="61" rotation="0" locateType="1">À¶ÅÆ:ÇíA11R55</taggedRectangle>
<taggedRectangle x="899" y="651" width="129" height="33" rotation="-2" locateType="1">À¶ÅÆ:ÏæA07G31</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -394,7 +394,8 @@
<imageName>ÏæA0PQ76</imageName>
<taggedRectangles>
<taggedRectangle x="1196" y="569" width="101" height="33" rotation="-2" locateType="0">À¶ÅÆ:ÏæA21A42</taggedRectangle>
<taggedRectangle x="574" y="675" width="276" height="94" rotation="0" locateType="0">À¶ÅÆ:´¨1111RF</taggedRectangle>
<taggedRectangle x="564" y="736" width="168" height="53" rotation="-1" locateType="0">蓝牌:浙A0PQ7N</taggedRectangle>
<taggedRectangle x="574" y="675" width="276" height="94" rotation="0" locateType="0">蓝牌:新111111</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -440,6 +441,7 @@
<image>
<imageName>ÏæA97971</imageName>
<taggedRectangles>
<taggedRectangle x="1366" y="542" width="107" height="37" rotation="-1" locateType="0">蓝牌:湘A0GT1</taggedRectangle>
<taggedRectangle x="97" y="687" width="135" height="46" rotation="0" locateType="1">»ÆÅÆ:ÏæA97971</taggedRectangle>
</taggedRectangles>
</image>
@ -447,7 +449,6 @@
<imageName>ÏæA9NU97</imageName>
<taggedRectangles>
<taggedRectangle x="970" y="640" width="127" height="39" rotation="0" locateType="0">À¶ÅÆ:ÏæA9NU91</taggedRectangle>
<taggedRectangle x="64" y="834" width="125" height="43" rotation="0" locateType="0">À¶ÅÆ:¹óH4501</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -455,7 +456,7 @@
<taggedRectangles>
<taggedRectangle x="1308" y="529" width="103" height="31" rotation="-1" locateType="1">À¶ÅÆ:ÏæA0PC37</taggedRectangle>
<taggedRectangle x="198" y="883" width="213" height="69" rotation="0" locateType="1">À¶ÅÆ:ÏæA9YU86</taggedRectangle>
<taggedRectangle x="215" y="764" width="333" height="70" rotation="0" locateType="0">À¶ÅÆ:´¨111111</taggedRectangle>
<taggedRectangle x="215" y="764" width="333" height="70" rotation="0" locateType="0">蓝牌:川U11111</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -524,7 +525,6 @@
<imageName>ÏæGR0L16</imageName>
<taggedRectangles>
<taggedRectangle x="128" y="679" width="126" height="34" rotation="0" locateType="1">À¶ÅÆ:ÕãGR0L16</taggedRectangle>
<taggedRectangle x="96" y="680" width="98" height="40" rotation="-1" locateType="0">À¶ÅÆ:½úLGRL1</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -682,7 +682,7 @@
<image>
<imageName>ÍîQ06417</imageName>
<taggedRectangles>
<taggedRectangle x="434" y="191" width="68" height="14" rotation="0" locateType="0">»ÆÅÆ:¾©Q06413</taggedRectangle>
<taggedRectangle x="434" y="191" width="68" height="14" rotation="0" locateType="0">未知:闽1QDA41</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -715,7 +715,7 @@
<imageName>ÍîQA2825</imageName>
<taggedRectangles>
<taggedRectangle x="357" y="133" width="17" height="75" rotation="-90" locateType="0">À¶ÅÆ:Íî0A2825</taggedRectangle>
<taggedRectangle x="356" y="125" width="76" height="27" rotation="0" locateType="0">À¶ÅÆ:ÔÁA28MS</taggedRectangle>
<taggedRectangle x="356" y="125" width="76" height="27" rotation="0" locateType="0">蓝牌:渝MA9Q95</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -728,7 +728,7 @@
<image>
<imageName>ÔÁA5J512</imageName>
<taggedRectangles>
<taggedRectangle x="449" y="258" width="57" height="186" rotation="-89" locateType="1">À¶ÅÆ:ÔÁA5J512</taggedRectangle>
<taggedRectangle x="447" y="257" width="73" height="209" rotation="-89" locateType="0">蓝牌:粤A5J512</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -740,7 +740,7 @@
<image>
<imageName>ÔÁA5Q951</imageName>
<taggedRectangles>
<taggedRectangle x="417" y="320" width="219" height="70" rotation="-1" locateType="0">À¶ÅÆ:ÔÁA5Q931</taggedRectangle>
<taggedRectangle x="417" y="320" width="219" height="70" rotation="-1" locateType="0">蓝牌:粤A50951</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -764,7 +764,7 @@
<image>
<imageName>ÔÁAA0825</imageName>
<taggedRectangles>
<taggedRectangle x="380" y="169" width="279" height="69" rotation="0" locateType="0">δ֪:´¨A0857</taggedRectangle>
<taggedRectangle x="380" y="169" width="279" height="69" rotation="0" locateType="0">黄牌:宁10857</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -871,7 +871,7 @@
<imageName>ÔÁB5W601</imageName>
<taggedRectangles>
<taggedRectangle x="1449" y="763" width="256" height="82" rotation="0" locateType="0">À¶ÅÆ:ÔÁB5W601</taggedRectangle>
<taggedRectangle x="1691" y="894" width="197" height="37" rotation="0" locateType="0">À¶ÅÆ:ÃÉ7550D</taggedRectangle>
<taggedRectangle x="1691" y="894" width="197" height="37" rotation="0" locateType="0">蓝牌:川1B5F1L</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -978,7 +978,7 @@
<imageName>ÔÁSD050L</imageName>
<taggedRectangles>
<taggedRectangle x="1434" y="716" width="188" height="59" rotation="-1" locateType="1">À¶ÅÆ:ÔÁSL050L</taggedRectangle>
<taggedRectangle x="1692" y="895" width="196" height="39" rotation="0" locateType="0">δ֪:Äþ80021</taggedRectangle>
<taggedRectangle x="1692" y="895" width="196" height="39" rotation="0" locateType="0">蓝牌:藏KF1113</taggedRectangle>
</taggedRectangles>
</image>
<image>

@ -44,7 +44,7 @@ int PlateJudge::plateJudge(const std::vector<Mat> &inVec,
//! 设置车牌图像的置信度
//! 返回值0代表是车牌其他值代表不是
int PlateJudge::plateScore(CPlate& plate) {
int PlateJudge::plateSetScore(CPlate& plate) {
Mat features;
getHistogramFeatures(plate.getPlateMat(), features);
@ -68,11 +68,13 @@ int PlateJudge::plateScore(CPlate& plate) {
//! 非极大值抑制
void NMS(std::vector<CPlate> &inVec, std::vector<CPlate> &resultVec, double overlap) {
std::sort(inVec.begin(), inVec.end());
std::vector<CPlate>::iterator it = inVec.begin();
for (; it != inVec.end(); ++it) {
CPlate plateSrc = *it;
//std::cout << "plateScore:" << plateSrc.getPlateScore() << std::endl;
Rect rectSrc = plateSrc.getPlatePos().boundingRect();
std::vector<CPlate>::iterator itc = it + 1;
@ -102,12 +104,30 @@ int PlateJudge::plateJudgeUsingNMS(const std::vector<CPlate> &inVec, std::vector
for (int j = 0; j < num; j++) {
CPlate plate = inVec[j];
Mat inMat = plate.getPlateMat();
int response = plateSetScore(plate);
if (response == 0) {
plateVec.push_back(plate);
}
else {
int w = inMat.cols;
int h = inMat.rows;
//再取中间部分判断一次
int result = plateScore(plate);
plateVec.push_back(plate);
//if (result == 0) {
// plateVec.push_back(plate);
//}
Mat tmpmat = inMat(Rect_<double>(w * 0.05, h * 0.1, w * 0.9, h * 0.8));
Mat tmpDes = inMat.clone();
resize(tmpmat, tmpDes, Size(inMat.size()));
plate.setPlateMat(tmpDes);
int responseCascade = plateSetScore(plate);
if (responseCascade == 0) {
plateVec.push_back(plate);
}
}
}
// 使用非极大值抑制来去除那些重叠的车牌

@ -33,11 +33,11 @@ void SvmTrain::train() {
fprintf(stdout, ">> Training SVM model, please wait...\n");
long start = utils::getTimestamp();
svm_->trainAuto(train_data, 10, SVM::getDefaultGrid(SVM::C),
SVM::getDefaultGrid(SVM::GAMMA), SVM::getDefaultGrid(SVM::P),
SVM::getDefaultGrid(SVM::NU), SVM::getDefaultGrid(SVM::COEF),
SVM::getDefaultGrid(SVM::DEGREE), true);
//svm_->train(train_data);
//svm_->trainAuto(train_data, 10, SVM::getDefaultGrid(SVM::C),
// SVM::getDefaultGrid(SVM::GAMMA), SVM::getDefaultGrid(SVM::P),
// SVM::getDefaultGrid(SVM::NU), SVM::getDefaultGrid(SVM::COEF),
// SVM::getDefaultGrid(SVM::DEGREE), true);
svm_->train(train_data);
long end = utils::getTimestamp();
fprintf(stdout, ">> Training done. Time elapse: %ldms\n", end - start);

@ -39,7 +39,7 @@ int test_chars_identify() {
int result = cs.charsSegment(plate, matChars);
if (result == 0) {
for (int block_i = 0; block_i < matChars.size(); block_i++) {
for (size_t block_i = 0; block_i < matChars.size(); block_i++) {
auto block = matChars[block_i];
if (block_i == 0) {
auto character = CharsIdentify::instance()->identify(block, true);

@ -191,6 +191,7 @@
<ClInclude Include="..\include\easypr\util\switch.hpp" />
<ClInclude Include="..\include\easypr\util\util.h" />
<ClInclude Include="..\include\text\erfilter.hpp" />
<ClInclude Include="version.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\LICENSE" />

@ -188,6 +188,9 @@
<ClInclude Include="..\include\text\erfilter.hpp">
<Filter>头文件\text</Filter>
</ClInclude>
<ClInclude Include="version.h">
<Filter>头文件\easypr</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\LICENSE" />

@ -0,0 +1,24 @@
#include <opencv2/opencv.hpp>
#define CV_VERSION_ID CVAUX_STR(CV_MAJOR_VERSION) CVAUX_STR(CV_MINOR_VERSION) CVAUX_STR(CV_SUBMINOR_VERSION)
#ifdef _DEBUG
#define cvLIB(name) "opencv_" name CV_VERSION_ID "d"
#else
#define cvLIB(name) "opencv_" name CV_VERSION_ID
#endif
#pragma comment( lib, cvLIB("core") )
#pragma comment( lib, cvLIB("imgproc") )
#pragma comment( lib, cvLIB("highgui") )
#pragma comment( lib, cvLIB("flann") )
#pragma comment( lib, cvLIB("features2d") )
#pragma comment( lib, cvLIB("calib3d") )
#pragma comment( lib, cvLIB("gpu") )
#pragma comment( lib, cvLIB("legacy") )
#pragma comment( lib, cvLIB("ml") )
#pragma comment( lib, cvLIB("objdetect") )
#pragma comment( lib, cvLIB("ts") )
#pragma comment( lib, cvLIB("video") )
#pragma comment( lib, cvLIB("contrib") )
#pragma comment( lib, cvLIB("nonfree") )
Loading…
Cancel
Save