Question) GetUTF8Text Result

33 views
Skip to first unread message

최진우

unread,
Jun 19, 2017, 2:14:32 AM6/19/17
to tesseract-ocr
I'm using opencv + tesseract

First ! my Code is here!

char * text = NULL;

....

tesseract::TessBaseAPI api;
api.Init("tessdata PATH", "kor", tesseract::OEM_DEFAULT);
api.SetPageSegMode(tesseract::PSM_SINGLE_LINE);

...

text = api.GetUTF8Text();
cout << "OCR: " << text << endl;   ★

ofstream outFile("output.txt");
outFile << text << endl;                  ■
outFile.close();

...

★ <- code display terrible result (unknown language)
but ■ <- output.txt file's text is perfect !

why ★ display terrible result ?
plz help :-)
Reply all
Reply to author
Forward
0 new messages