2015-06-29 42 views
0

我使用Tesseract OCR進行文本閱讀。我的二進制圖像很清晰,但是當圖像被OCR讀取時,讀取出現錯誤。實際數字是05820,但它被讀爲05320.非常清晰銳利的圖像有錯誤,執行過程中可能會出錯嗎? 我附上了我使用的圖像和Tessearact代碼。使用Tessearact OCR讀取錯誤

 ![enter image description here][1]int OCR::textRecognition(void){ 
     tesseract::TessBaseAPI tess; 
     tess.Init(NULL, "eng", tesseract::OEM_DEFAULT); 
     tess.SetPageSegMode(tesseract::PSM_SINGLE_BLOCK); 

     tess.SetImage((uchar*)extText.data, extText.cols, extText.rows, 1, extText.cols); 
     // Get the text 
     char* out = tess.GetUTF8Text(); 
     std::cout << out << std::endl; 
     return SUCCESS; 
    } 
使用您計劃使用的字體

enter image description here

回答