IAM使用的Tesseract OCR在C++读书德国PNG图像和我买了一些特殊字符的问题,像正方体OCR德国特殊字符
SS A○ü等。
我需要培训tesseract阅读此正确或需要做什么?
This is the part of the original image read by tesseract
tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();
UPDATE
SetConsoleOutputCP(1252);//changed to german.
SetConsoleCP(1252);//changed to german
wcout << "ÄÖÜ?ß" << endl;
// Open input image with leptonica library
Pix *image = pixRead("D:\\Images\\Document.png");
api->Init("D:\\TesseractBeispiele\\Tessaractbeispiel\\Tessaractbeispiel\\tessdata", "deu");
api->SetImage(image);
api->SetVariable("save_blob_choices", "T");
api->SetRectangle(1000, 3000, 9000, 9000);
api->Recognize(NULL);
// Get OCR result
wcout << api->GetUTF8Text());
After changing the Code below the Update 硬编码的变音符号会显示正确,但是从图像issnt文字正确的,我需要改变什么?
正方体的版本是3.0.2 leptonica版本是1.68
几乎肯定不配置为UTF-8的控制台。 – MSalters
你将如何为UTF8配置控制台? – Cazzador