Skip to content

Commit

Permalink
Windows控制台编码修改为UTF8
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminwan committed Oct 17, 2022
1 parent 9fd14f0 commit d14f23c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include "version.h"
#include "OcrLite.h"
#include "OcrUtils.h"
#ifdef _WIN32
#include <windows.h>
#endif

void printHelp(FILE *out, char *argv0) {
fprintf(out, " ------- Usage -------\n");
Expand All @@ -25,14 +28,17 @@ int main(int argc, char **argv) {
printHelp(stderr, argv[0]);
return -1;
}
#ifdef _WIN32
SetConsoleOutputCP(CP_UTF8);
#endif
std::string modelsDir, modelDetPath, modelClsPath, modelRecPath, keysPath;
std::string imgPath, imgDir, imgName;
int numThread = 4;
int padding = 0;
int padding = 50;
int maxSideLen = 1024;
float boxScoreThresh = 0.5f;
float boxThresh = 0.3f;
float unClipRatio = 2.0f;
float unClipRatio = 1.6f;
bool doAngle = true;
int flagDoAngle = 1;
bool mostAngle = true;
Expand Down

0 comments on commit d14f23c

Please sign in to comment.