Commit d14f23c4 authored by benjaminwan's avatar benjaminwan
Browse files

Windows控制台编码修改为UTF8

parent 9fd14f09
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
#include "version.h" #include "version.h"
#include "OcrLite.h" #include "OcrLite.h"
#include "OcrUtils.h" #include "OcrUtils.h"
#ifdef _WIN32
#include <windows.h>
#endif
void printHelp(FILE *out, char *argv0) { void printHelp(FILE *out, char *argv0) {
fprintf(out, " ------- Usage -------\n"); fprintf(out, " ------- Usage -------\n");
...@@ -25,14 +28,17 @@ int main(int argc, char **argv) { ...@@ -25,14 +28,17 @@ int main(int argc, char **argv) {
printHelp(stderr, argv[0]); printHelp(stderr, argv[0]);
return -1; return -1;
} }
#ifdef _WIN32
SetConsoleOutputCP(CP_UTF8);
#endif
std::string modelsDir, modelDetPath, modelClsPath, modelRecPath, keysPath; std::string modelsDir, modelDetPath, modelClsPath, modelRecPath, keysPath;
std::string imgPath, imgDir, imgName; std::string imgPath, imgDir, imgName;
int numThread = 4; int numThread = 4;
int padding = 0; int padding = 50;
int maxSideLen = 1024; int maxSideLen = 1024;
float boxScoreThresh = 0.5f; float boxScoreThresh = 0.5f;
float boxThresh = 0.3f; float boxThresh = 0.3f;
float unClipRatio = 2.0f; float unClipRatio = 1.6f;
bool doAngle = true; bool doAngle = true;
int flagDoAngle = 1; int flagDoAngle = 1;
bool mostAngle = true; bool mostAngle = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment