0
我正在使用Swift 3構建移動應用程序,該應用程序允許用戶拍攝照片並在生成的圖像上運行Tesseract OCR。Swift 3 - 如何提高Tesseract的圖像質量?
但是,我一直在試圖提高掃描的質量,它似乎並沒有太多的工作。我已將照片分割成更加「放大」的區域,我想辨認甚至嘗試將其變爲黑白。是否有任何「增強」或優化圖像質量/尺寸的策略,以便Tesseract更好地識別它?謝謝!
tesseract.image = // the camera photo here
tesseract.recognize()
print(tesseract.recognizedText)
我得到了這些錯誤,而且不知道該怎麼做:
Error in pixCreateHeader: depth must be {1, 2, 4, 8, 16, 24, 32}
Error in pixCreateNoInit: pixd not made
Error in pixCreate: pixd not made
Error in pixGetData: pix not defined
Error in pixGetWpl: pix not defined
2017-03-11 22:22:30.019717 ProjectName[34247:8754102] Cannot convert image to Pix with bpp = 64
Error in pixSetYRes: pix not defined
Error in pixGetDimensions: pix not defined
Error in pixGetColormap: pix not defined
Error in pixClone: pixs not defined
Error in pixGetDepth: pix not defined
Error in pixGetWpl: pix not defined
Error in pixGetYRes: pix not defined
Please call SetImage before attempting recognition.Please call SetImage before attempting recognition.2017-03-11 22:22:30.026605 EOB-Reader[34247:8754102] No recognized text. Check that -[Tesseract setImage:] is passed an image bigger than 0x0.