* ground truth revision, and add 5 new image.

v1.6alpha
liuruoze 9 years ago
parent 8ee0731a3a
commit 35674b7b6d

@ -35,7 +35,4 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
EndGlobal

@ -26,6 +26,12 @@ typedef enum {
kInverse = 0 // correspond to "no plate"
} SvmLabel;
static const int kPlateResizeWidth = 136;
static const int kPlateResizeHeight = 36;
static const int kShowWindowWidth = 800;
static const int kShowWindowHeight = 600;
static const float kSvmPercentage = 0.7f;
static const int kCharacterInput = 120;

@ -37,7 +37,7 @@ class CPlateDetect {
*/
int plateDetect(Mat src, std::vector<CPlate> &resultVec, int img_index = 0);
int showResult(const Mat &result, int img_index = 0);
Mat showResult(const Mat &result, int img_index = 0);
void LoadSVM(std::string s);

@ -24,8 +24,9 @@ namespace easypr {
public:
CPlateRecognize();
int plateRecognize(Mat src, std::vector<CPlate> &licenseVec, int img_index = 0);
int plateRecognize(Mat src, std::vector<CPlate> &plateVec, int img_index = 0);
int plateRecognize(Mat src, std::vector<std::string> &licenseVec);
int plateRecognize(Mat src, std::vector<CPlate> &plateVec, int img_index, Mat& output, const vector<CPlate>& plateVecGT);
int plateRecognizeAsText(Mat src, std::vector<CPlate> &licenseVec);
int plateRecognizeAsTextNM(Mat src, std::vector<CPlate> &licenseVec);

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

@ -47,7 +47,7 @@
<image>
<imageName>´¨A88888</imageName>
<taggedRectangles>
<taggedRectangle x="200" y="190" width="248" height="70" rotation="6" locateType="1">À¶ÅÆ:´¨A88888</taggedRectangle>
<taggedRectangle x="198" y="192" width="274" height="66" rotation="0" locateType="2">À¶ÅÆ:´¨A88888</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -65,7 +65,7 @@
<image>
<imageName>´¨AL0Q87</imageName>
<taggedRectangles>
<taggedRectangle x="174" y="284" width="149" height="39" rotation="4" locateType="0">À¶ÅÆ:´¨AL0Q87</taggedRectangle>
<taggedRectangle x="175" y="285" width="167" height="51" rotation="3" locateType="2">À¶ÅÆ:´¨AL0Q87</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -922,7 +922,7 @@
<image>
<imageName>ÔÁB901BF</imageName>
<taggedRectangles>
<taggedRectangle x="164" y="355" width="30" height="122" rotation="0" locateType="0">À¶ÅÆ:ÔÁB901BF</taggedRectangle>
<taggedRectangle x="164" y="355" width="119" height="25" rotation="2" locateType="2">À¶ÅÆ:ÔÁB901BF</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -1274,29 +1274,29 @@
<taggedRectangles>
<taggedRectangle x="444" y="223" width="111" height="35" rotation="0" locateType="0">À¶ÅÆ:´¨A095Q5</taggedRectangle>
</taggedRectangles>
</image>
</image>
<image>
<imageName>´¨A105LR</imageName>
<taggedRectangles>
<taggedRectangle x="344" y="313" width="127" height="50" rotation="0" locateType="1">À¶ÅÆ:´¨A105LR</taggedRectangle>
<taggedRectangle x="344" y="312" width="135" height="37" rotation="2" locateType="2">À¶ÅÆ:´¨A105LR</taggedRectangle>
</taggedRectangles>
</image>
<image>
<imageName>´¨A113YP</imageName>
<taggedRectangles>
<taggedRectangle x="350" y="209" width="126" height="32" rotation="0" locateType="1">À¶ÅÆ:´¨A113YP</taggedRectangle>
<taggedRectangle x="346" y="207" width="138" height="33" rotation="0" locateType="2">À¶ÅÆ:´¨A113YP</taggedRectangle>
</taggedRectangles>
</image>
<image>
<imageName>´¨A561WP</imageName>
<taggedRectangles>
<taggedRectangle x="516" y="182" width="112" height="28" rotation="0" locateType="0">À¶ÅÆ:´¨A561WP</taggedRectangle>
<taggedRectangle x="513" y="180" width="124" height="33" rotation="0" locateType="2">À¶ÅÆ:´¨A561WP</taggedRectangle>
</taggedRectangles>
</image>
<image>
<imageName>´¨A572F4</imageName>
<taggedRectangles>
<taggedRectangle x="129" y="318" width="174" height="68" rotation="0" locateType="0">À¶ÅÆ:´¨A572F4</taggedRectangle>
<taggedRectangle x="130" y="316" width="182" height="55" rotation="3" locateType="2">À¶ÅÆ:´¨A572F4</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -1308,13 +1308,13 @@
<image>
<imageName>´¨AE8H60</imageName>
<taggedRectangles>
<taggedRectangle x="427" y="335" width="131" height="44" rotation="0" locateType="1">À¶ÅÆ:´¨AE8H60</taggedRectangle>
<taggedRectangle x="421" y="334" width="143" height="40" rotation="-2" locateType="2">À¶ÅÆ:´¨AE8H60</taggedRectangle>
</taggedRectangles>
</image>
<image>
<imageName>´¨AGU052</imageName>
<taggedRectangles>
<taggedRectangle x="223" y="278" width="176" height="55" rotation="0" locateType="0">À¶ÅÆ:´¨AGU052</taggedRectangle>
<taggedRectangle x="223" y="278" width="194" height="52" rotation="2" locateType="2">À¶ÅÆ:´¨AGU052</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -1326,7 +1326,7 @@
<image>
<imageName>´¨AKM065</imageName>
<taggedRectangles>
<taggedRectangle x="453" y="193" width="113" height="34" rotation="0" locateType="1">À¶ÅÆ:´¨AKM065</taggedRectangle>
<taggedRectangle x="450" y="191" width="123" height="33" rotation="0" locateType="2">À¶ÅÆ:´¨AKM065</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -1350,7 +1350,7 @@
<image>
<imageName>´¨AR9X49</imageName>
<taggedRectangles>
<taggedRectangle x="156" y="360" width="178" height="66" rotation="0" locateType="1">À¶ÅÆ:´¨AR9X49</taggedRectangle>
<taggedRectangle x="154" y="359" width="188" height="51" rotation="3" locateType="2">À¶ÅÆ:´¨AR9X49</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -1368,7 +1368,7 @@
<image>
<imageName>´¨AY116F</imageName>
<taggedRectangles>
<taggedRectangle x="428" y="191" width="111" height="42" rotation="0" locateType="0">À¶ÅÆ:´¨AY116F</taggedRectangle>
<taggedRectangle x="427" y="189" width="117" height="32" rotation="1" locateType="2">À¶ÅÆ:´¨AY116F</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -1398,7 +1398,7 @@
<image>
<imageName>»¦B683J8</imageName>
<taggedRectangles>
<taggedRectangle x="371" y="228" width="105" height="42" rotation="0" locateType="1">À¶ÅÆ:»¦B683J8</taggedRectangle>
<taggedRectangle x="367" y="225" width="123" height="36" rotation="5" locateType="2">À¶ÅÆ:»¦B683J8</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -1416,9 +1416,9 @@
<image>
<imageName>ÕãL11921</imageName>
<taggedRectangles>
<taggedRectangle x="748" y="1074" width="152" height="49" rotation="0" locateType="0">»ÆÅÆ:ÕãL11921</taggedRectangle>
<taggedRectangle x="744" y="1072" width="152" height="40" rotation="-5" locateType="2">»ÆÅÆ:ÕãL11921</taggedRectangle>
</taggedRectangles>
</image>
</image>
<image>
<imageName>ÕãL66736</imageName>
<taggedRectangles>
@ -1434,7 +1434,7 @@
<image>
<imageName>ÓåBE7773</imageName>
<taggedRectangles>
<taggedRectangle x="840" y="361" width="193" height="116" rotation="0" locateType="0">À¶ÅÆ:ÓåBE7773</taggedRectangle>
<taggedRectangle x="841" y="362" width="210" height="64" rotation="12" locateType="2">À¶ÅÆ:ÓåBE7773</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -1483,7 +1483,7 @@
<image>
<imageName>ÔÁBA103N</imageName>
<taggedRectangles>
<taggedRectangle x="315" y="179" width="108" height="41" rotation="0" locateType="1">À¶ÅÆ:ÔÁBA103N</taggedRectangle>
<taggedRectangle x="313" y="177" width="105" height="32" rotation="7" locateType="2">À¶ÅÆ:ÔÁBA103N</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -1507,7 +1507,7 @@
<image>
<imageName>ÔÁX30479</imageName>
<taggedRectangles>
<taggedRectangle x="1082" y="797" width="218" height="79" rotation="0" locateType="0">»ÆÅÆ:ÔÁX30479</taggedRectangle>
<taggedRectangle x="1080" y="794" width="231" height="55" rotation="-4" locateType="2">»ÆÅÆ:ÔÁX30479</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -1525,7 +1525,7 @@
<image>
<imageName>ËÕA66U71</imageName>
<taggedRectangles>
<taggedRectangle x="501" y="484" width="275" height="86" rotation="0" locateType="0">À¶ÅÆ:ËÕA66U71</taggedRectangle>
<taggedRectangle x="500" y="483" width="282" height="47" rotation="5" locateType="2">À¶ÅÆ:ËÕA66U71</taggedRectangle>
</taggedRectangles>
</image>
<image>
@ -1549,7 +1549,7 @@
<image>
<imageName>ËÕAVW997</imageName>
<taggedRectangles>
<taggedRectangle x="349" y="419" width="97" height="52" rotation="0" locateType="0">À¶ÅÆ:ËÕAVW997</taggedRectangle>
<taggedRectangle x="349" y="418" width="105" height="32" rotation="-15" locateType="2">À¶ÅÆ:ËÕAVW997</taggedRectangle>
<taggedRectangle x="754" y="314" width="40" height="26" rotation="0" locateType="0">À¶ÅÆ:ËÕANC818</taggedRectangle>
</taggedRectangles>
</image>
@ -1571,4 +1571,34 @@
<taggedRectangle x="352" y="260" width="141" height="37" rotation="5" locateType="2">À¶ÅÆ:ÃöCPB592</taggedRectangle>
</taggedRectangles>
</image>
<image>
<imageName>ÍîAA3610</imageName>
<taggedRectangles>
<taggedRectangle x="279" y="446" width="39" height="141" rotation="-89" locateType="1">À¶ÅÆ:ÍîAA3610</taggedRectangle>
</taggedRectangles>
</image>
<image>
<imageName>ÍîA2F560</imageName>
<taggedRectangles>
<taggedRectangle x="455" y="167" width="70" height="20" rotation="0" locateType="0">À¶ÅÆ:ÍîA2F560</taggedRectangle>
</taggedRectangles>
</image>
<image>
<imageName>¾©PC5U22</imageName>
<taggedRectangles>
<taggedRectangle x="271" y="231" width="149" height="36" rotation="2" locateType="2">À¶ÅÆ:¾©PC5U22</taggedRectangle>
</taggedRectangles>
</image>
<image>
<imageName>ÔÁCXE592</imageName>
<taggedRectangles>
<taggedRectangle x="473" y="361" width="192" height="59" rotation="0" locateType="2">À¶ÅÆ:ÔÁCXE592</taggedRectangle>
</taggedRectangles>
</image>
<image>
<imageName>ÁÉBG0D80</imageName>
<taggedRectangles>
<taggedRectangle x="418" y="357" width="110" height="32" rotation="-13" locateType="2">À¶ÅÆ:ÁÉBG0D80</taggedRectangle>
</taggedRectangles>
</image>
</tagset>

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 186 KiB

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Before

Width:  |  Height:  |  Size: 205 KiB

After

Width:  |  Height:  |  Size: 205 KiB

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 113 KiB

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1878,3 +1878,48 @@ Recall:74.6006%, Precise:76.6991%, Fscore:75.6353%.
Recall:74.6368%, Precise:76.991%, Fscore:75.7956%.
0-error:60.3604%, 1-error:69.3694%, Chinese-precise:72.5225%
总时间:319秒, 平均执行时间:1.27092秒
2016-07-05 08:54:24
总图片数:251, Plates count:290, 未定位车牌:49, 定位率:83.1034%
Recall:74.6368%, Precise:76.991%, Fscore:75.7956%.
0-error:60.3604%, 1-error:69.3694%, Chinese-precise:72.5225%
总时间:1108秒, 平均执行时间:4.41434秒
2016-07-05 09:54:29
总图片数:251, Plates count:291, 未定位车牌:48, 定位率:83.5052%
Recall:75.4744%, Precise:78.1189%, Fscore:76.7739%.
0-error:60.2679%, 1-error:69.1964%, Chinese-precise:72.3214%
总时间:1694秒, 平均执行时间:6.749秒
2016-07-05 09:55:22
总图片数:1, Plates count:0, 未定位车牌:0, 定位率:-1.#IND%
Recall:0%, Precise:0%, Fscore:0%.
0-error:0%, 1-error:0%, Chinese-precise:100%
总时间:2秒, 平均执行时间:2秒
2016-07-05 09:55:43
总图片数:1, Plates count:1, 未定位车牌:1, 定位率:0%
Recall:0%, Precise:0%, Fscore:0%.
0-error:0%, 1-error:0%, Chinese-precise:100%
总时间:2秒, 平均执行时间:2秒
2016-07-05 10:03:58
总图片数:2, Plates count:2, 未定位车牌:1, 定位率:50%
Recall:45.3786%, Precise:90.7571%, Fscore:60.5048%.
0-error:0%, 1-error:0%, Chinese-precise:0%
总时间:7秒, 平均执行时间:3.5秒
2016-07-05 10:05:49
总图片数:3, Plates count:0, 未定位车牌:0, 定位率:-1.#IND%
Recall:0%, Precise:0%, Fscore:0%.
0-error:0%, 1-error:0%, Chinese-precise:100%
总时间:16秒, 平均执行时间:5.33333秒
2016-07-05 10:12:30
总图片数:3, Plates count:3, 未定位车牌:1, 定位率:66.6667%
Recall:65.3067%, Precise:97.96%, Fscore:78.368%.
0-error:0%, 1-error:0%, Chinese-precise:0%
总时间:7秒, 平均执行时间:2.33333秒
2016-07-05 10:16:09
总图片数:256, Plates count:297, 未定位车牌:51, 定位率:82.8283%
Recall:74.9149%, Precise:78.3019%, Fscore:76.5709%.
0-error:59.7345%, 1-error:68.5841%, Chinese-precise:71.6814%
总时间:86秒, 平均执行时间:0.335938秒
2016-07-05 11:49:45
总图片数:256, Plates count:297, 未定位车牌:51, 定位率:82.8283%
Recall:74.9149%, Precise:78.3019%, Fscore:76.5709%.
0-error:59.7345%, 1-error:68.5841%, Chinese-precise:71.6814%
总时间:95秒, 平均执行时间:0.371094秒

@ -2079,7 +2079,7 @@ void mserCharMatch(const Mat &src, std::vector<Mat> &match, std::vector<CPlate>&
destroyWindow("match");
}
if (0) {
if (1) {
std::stringstream ss(std::stringstream::in | std::stringstream::out);
ss << "resources/image/tmp/plateDetect/plate_" << img_index << "_" << the_color << ".jpg";
imwrite(ss.str(), result);

@ -1,5 +1,6 @@
#include "easypr/core/plate_detect.h"
#include "easypr/util/util.h"
#include "easypr/config.h"
namespace easypr {
@ -122,6 +123,7 @@ namespace easypr {
return 0;
}
int CPlateDetect::plateDetect(Mat src, std::vector<CPlate> &resultVec, int img_index) {
int result = plateDetect(src, resultVec, m_type, false, img_index);
return result;
@ -131,11 +133,12 @@ namespace easypr {
PlateJudge::instance()->LoadModel(path);
}
int CPlateDetect::showResult(const Mat &result, int img_index) {
Mat CPlateDetect::showResult(const Mat &result, int img_index) {
namedWindow("EasyPR", CV_WINDOW_AUTOSIZE);
const int RESULTWIDTH = 640; // 640 930
const int RESULTHEIGHT = 540; // 540 710
const int RESULTWIDTH = kShowWindowWidth; // 640 930
const int RESULTHEIGHT = kShowWindowHeight; // 540 710
Mat img_window;
img_window.create(RESULTHEIGHT, RESULTWIDTH, CV_8UC3);
@ -192,6 +195,6 @@ namespace easypr {
imwrite(ss.str(), img_window);
}
return 0;
return img_window;
}
}

@ -118,7 +118,7 @@ int CPlateRecognize::plateRecognizeAsText(Mat src, std::vector<CPlate> &licenseV
}
int CPlateRecognize::plateRecognize(Mat src, std::vector<CPlate> &licenseVec, int img_index) {
int CPlateRecognize::plateRecognize(Mat src, std::vector<CPlate> &plateVecOut, int img_index, Mat& output, const vector<CPlate>& plateVecGT) {
std::vector<CPlate> plateVec;
@ -155,12 +155,110 @@ int CPlateRecognize::plateRecognize(Mat src, std::vector<CPlate> &licenseVec, in
if (resultCR == 0) {
std::string license = plateColor + ":" + plateIdentify;
item.setPlateStr(license);
licenseVec.push_back(item);
plateVecOut.push_back(item);
}
else {
std::string license = plateColor;
item.setPlateStr(license);
licenseVec.push_back(item);
plateVecOut.push_back(item);
if (0) {
std::cout << "resultCR:" << resultCR << std::endl;
}
}
}
if (getResultShow()) {
Mat result;
src.copyTo(result);
for (size_t j = 0; j < num; j++) {
CPlate item = plateVec[j];
Mat plateMat = item.getPlateMat();
int height = 36;
int width = 136;
if (height * index + height < result.rows) {
Mat imageRoi = result(Rect(0, 0 + height * index, width, height));
addWeighted(imageRoi, 0, plateMat, 1, 0, imageRoi);
}
index++;
RotatedRect minRect = item.getPlatePos();
Point2f rect_points[4];
minRect.points(rect_points);
Scalar lineColor = Scalar(255, 255, 255);
if (item.getPlateLocateType() == SOBEL) lineColor = Scalar(255, 0, 0);
if (item.getPlateLocateType() == COLOR) lineColor = Scalar(0, 255, 0);
if (item.getPlateLocateType() == CMSER) lineColor = Scalar(0, 0, 255);
for (int j = 0; j < 4; j++)
line(result, rect_points[j], rect_points[(j + 1) % 4], lineColor, 2, 8);
}
for (auto plateG : plateVecGT) {
RotatedRect minRect = plateG.getPlatePos();
Point2f rect_points[4];
minRect.points(rect_points);
Scalar lineColor = Scalar(255, 255, 255);
for (int j = 0; j < 4; j++)
line(result, rect_points[j], rect_points[(j + 1) % 4], lineColor, 2, 8);
}
output = showResult(result);
}
}
return resultPD;
}
int CPlateRecognize::plateRecognize(Mat src, std::vector<CPlate> &plateVecOut, int img_index) {
std::vector<CPlate> plateVec;
int resultPD = plateDetect(src, plateVec, img_index);
if (resultPD == 0) {
size_t num = plateVec.size();
int index = 0;
for (size_t j = 0; j < num; j++) {
CPlate item = plateVec.at(j);
Mat plateMat = item.getPlateMat();
if (0) {
imshow("plate", plateMat);
waitKey(0);
destroyWindow("plate");
}
Color color = item.getPlateColor();
if (color == UNKNOWN) {
color = getPlateType(plateMat, true);
item.setPlateColor(color);
}
std::string plateColor = getPlateColor(color);
if (0) {
std::cout << "plateColor:" << plateColor << std::endl;
}
std::string plateIdentify = "";
int resultCR = charsRecognise(item, plateIdentify);
if (resultCR == 0) {
std::string license = plateColor + ":" + plateIdentify;
item.setPlateStr(license);
plateVecOut.push_back(item);
}
else {
std::string license = plateColor;
item.setPlateStr(license);
plateVecOut.push_back(item);
if (0) {
std::cout << "resultCR:" << resultCR << std::endl;
}
@ -200,6 +298,8 @@ int CPlateRecognize::plateRecognize(Mat src, std::vector<CPlate> &licenseVec, in
showResult(result);
}
}
return resultPD;
}
@ -263,8 +363,8 @@ int CPlateRecognize::plateRecognize(Mat src, std::vector<std::string> &licenseVe
Scalar lineColor = Scalar(255, 255, 255);
if (item.getPlateLocateType() == SOBEL) lineColor = Scalar(255, 0, 0);
if (item.getPlateLocateType() == COLOR) lineColor = Scalar(0, 255, 0);
if (item.getPlateLocateType() == CMSER) lineColor = Scalar(0, 0, 255);
for (int j = 0; j < 4; j++)
line(result, rect_points[j], rect_points[(j + 1) % 4], lineColor, 2,

@ -158,14 +158,11 @@ namespace easypr {
img_ss << kv->get("original_plate") << ":" << plateLicense << endl;
// remain
//XMLNode xNode, rectangleNodes;
//xNode = xMainNode.addChild("image");
//xNode.addChild("imageName").addText(plateLicense.c_str());
//rectangleNodes = xNode.addChild("taggedRectangles");
XMLNode xNode, rectangleNodes;
xNode = xMainNode.addChild("image");
xNode.addChild("imageName").addText(plateLicense.c_str());
rectangleNodes = xNode.addChild("taggedRectangles");
vector<CPlate> plateVec;
int result = pr.plateRecognize(src, plateVec, i);
// get the ground truth and compare it with the detect list;
vector<CPlate> plateVecGT;
#pragma omp critical
@ -179,6 +176,10 @@ namespace easypr {
img_ss << "No ground truth found!" << endl;
}
}
vector<CPlate> plateVec;
Mat output;
int result = pr.plateRecognize(src, plateVec, i, output, plateVecGT);
for (auto plate_g : plateVecGT) {
float bestmatch = 0.f;
@ -269,18 +270,18 @@ namespace easypr {
calcSafeRect(platePos_d, src, plateRect_d);
// remain
//XMLNode rectangleNode = rectangleNodes.addChild("taggedRectangle");
//RotatedRect rr = platePos_d;
//LocateType locateType = plate_d.getPlateLocateType();
XMLNode rectangleNode = rectangleNodes.addChild("taggedRectangle");
RotatedRect rr = platePos_d;
LocateType locateType = plate_d.getPlateLocateType();
//rectangleNode.addAttribute("x", to_string((int)rr.center.x).c_str());
//rectangleNode.addAttribute("y", to_string((int)rr.center.y).c_str());
//rectangleNode.addAttribute("width", to_string((int)rr.size.width).c_str());
//rectangleNode.addAttribute("height", to_string((int)rr.size.height).c_str());
rectangleNode.addAttribute("x", to_string((int)rr.center.x).c_str());
rectangleNode.addAttribute("y", to_string((int)rr.center.y).c_str());
rectangleNode.addAttribute("width", to_string((int)rr.size.width).c_str());
rectangleNode.addAttribute("height", to_string((int)rr.size.height).c_str());
//rectangleNode.addAttribute("rotation", to_string((int)rr.angle).c_str());
//rectangleNode.addAttribute("locateType", to_string(locateType).c_str());
//rectangleNode.addText(plate_d.getPlateStr().c_str());
rectangleNode.addAttribute("rotation", to_string((int)rr.angle).c_str());
rectangleNode.addAttribute("locateType", to_string(locateType).c_str());
rectangleNode.addText(plate_d.getPlateStr().c_str());
for (auto plate_g : plateVecGT) {
RotatedRect platePos_g = plate_g.getPlatePos();
@ -348,7 +349,7 @@ namespace easypr {
time(&end);
// the xml detection result
// xMainNode.writeToFile(path_result.c_str());
xMainNode.writeToFile(path_result.c_str());
cout << "------------------" << endl;
cout << "Easypr accuracy test end!" << endl;

@ -91,7 +91,7 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(OPENCV)\include;$(SolutionDir)include;$(SolutionDir)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4819</DisableSpecificWarnings>
<OpenMPSupport>false</OpenMPSupport>
<OpenMPSupport>true</OpenMPSupport>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>

Loading…
Cancel
Save