v1.6alpha
liuruoze 8 years ago
parent ae198c9593
commit e65ac910df

@ -2178,3 +2178,13 @@ Recall:84.2263%, Precise:70.6573%, Fscore:76.8474%.
Recall:84.2263%, Precise:70.6573%, Fscore:76.8474%.
0-error:60.4%, 1-error:71.6%, Chinese-precise:73.2%
总时间:173秒, 平均执行时间:0.675781秒
2017-03-18 08:20:48
总图片数:256, Plates count:297, 未定位车牌:29, 定位率:90.2357%
Recall:84.2263%, Precise:70.6573%, Fscore:76.8474%.
0-error:60.4%, 1-error:71.6%, Chinese-precise:73.2%
总时间:165秒, 平均执行时间:0.644531秒
2017-03-19 08:42:59
总图片数:256, Plates count:297, 未定位车牌:29, 定位率:90.2357%
Recall:84.2263%, Precise:70.6573%, Fscore:76.8474%.
0-error:60.4%, 1-error:71.6%, Chinese-precise:73.2%
总时间:172秒, 平均执行时间:0.671875秒

@ -1,10 +0,0 @@
#include "easypr/core/plate.h"
/*! \namespace easypr
Namespace where all the C++ EasyPR functionality resides
*/
namespace easypr {
CPlate::CPlate() { bColored = true; }
} /*! \namespace easypr*/

@ -217,9 +217,7 @@ int CPlateRecognize::plateRecognize(Mat src, std::vector<CPlate> &plateVecOut, i
}
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) {

@ -7,36 +7,40 @@ Kv::Kv() { }
void Kv::load(const std::string &file) {
this->clear();
std::ifstream reader(file);
while (!reader.eof()) {
std::string line;
std::getline(reader, line);
if (line.empty()) continue;
assert(reader);
if (reader.is_open()) {
while (!reader.eof()) {
std::string line;
std::getline(reader, line);
if (line.empty()) continue;
const auto parse = [](const std::string &str) {
std::string tmp, key, value;
for (size_t i = 0, len = str.length(); i < len; ++i) {
const char ch = str[i];
if (ch == ' ') {
if (i > 0 && str[i - 1] != ' ' && key.empty()) {
key = tmp;
tmp.clear();
const auto parse = [](const std::string &str) {
std::string tmp, key, value;
for (size_t i = 0, len = str.length(); i < len; ++i) {
const char ch = str[i];
if (ch == ' ') {
if (i > 0 && str[i - 1] != ' ' && key.empty()) {
key = tmp;
tmp.clear();
}
}
else {
tmp.push_back(ch);
}
if (i == len - 1) {
value = tmp;
}
} else {
tmp.push_back(ch);
}
if (i == len - 1) {
value = tmp;
}
}
return std::make_pair(key, value);
};
return std::make_pair(key, value);
};
auto kv = parse(line);
this->add(kv.first, kv.second);
auto kv = parse(line);
this->add(kv.first, kv.second);
}
reader.close();
}
reader.close();
}
std::string Kv::get(const std::string &key) {

Loading…
Cancel
Save