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