prepare for dl

1.3
Fenix 10 years ago
parent 0f15d58fdd
commit a768ba804f

@ -29,7 +29,7 @@ const char strCharacters[] = {'0','1','2','3','4','5',\
'6','7','8','9','A','B', 'C', 'D', 'E','F', 'G', 'H', /* 没有I */\
'J', 'K', 'L', 'M', 'N', /* 没有O */ 'P', 'Q', 'R', 'S', 'T', \
'U','V', 'W', 'X', 'Y', 'Z'};
const int numCharacter = 34; /* 没有I和0,10个数字与24个英文字符之和 */
const int numCharacter = 34; /* 没有I和O,10个数字与24个英文字符之和 */
//以下都是我训练时用到的中文字符数据,并不全面,有些省份没有训练数据所以没有字符
//有些后面加数字2的表示在训练时常看到字符的一种变形也作为训练数据存储

@ -14,7 +14,7 @@
using namespace std;
using namespace cv;
const int LEARANDATA_COUNT = 1000;
const int LEARANDATA_COUNT = 5000;
void getFiles( string path, vector<string>& files );
void SplitString(const string& s, vector<string>& v, const string& c);
@ -126,7 +126,7 @@ bool isNotNight(const string& filepath)
//! MC将rawdata的文件换个路径到learndata里
bool getNewPath(const string& filepath, string& newfilepath)
{
string writePath = "F:/data/easypr-data/learndata/";
string writePath = "F:/data/easypr-data/learndata_dl/";
vector<string> spilt_path;
SplitString(filepath, spilt_path, "\\");
@ -215,8 +215,8 @@ void getLearnData()
string filepath = files[i].c_str();
//只处理白天的数据
if (isNotNight(filepath)!=true)
continue;
//if (isNotNight(filepath)!=true)
// continue;
//读取数据,并对图片进行预处理
Mat img = imread(filepath);

Loading…
Cancel
Save