Added unicode support in prepcharsfortraining

This commit is contained in:
Matt Hill
2015-04-22 00:36:42 -04:00
parent 090421ac66
commit a4870d883e

View File

@@ -26,6 +26,7 @@
#include <sys/stat.h>
#include "support/filesystem.h"
#include "../tclap/CmdLine.h"
#include "support/utf8.h"
using namespace std;
using namespace cv;
@@ -141,7 +142,9 @@ int main( int argc, const char** argv )
cout << "Processing file: " << (i + 1) << " of " << files.size() << " (" << files[i] << ")" << endl;
char charcode = files[i][0];
string::iterator utf_iterator = files[i].begin();
int cp = utf8::next(utf_iterator, files[i].end());
string charcode = utf8chr(cp);
Mat characterImg = imread(fullpath);