2016-10-22 69 views

回答

1

我們可以爲Tesseract提供一個Rectangle對象,用於在特定區域執行OCR。 Tesseract instance = Tesseract.getInstance();

Rectangle rect = new Rectangle(coordinates.getX(), coordinates.getY(), coordinates.getWidth(), coordinates.getHeight()); 
String result = instance.doOCR(bufferedImage, rect); 

結果將使我們從矩形區域識別的字符

希望這將幫助你

+0

感謝您的幫助,但座標不會對所有圖像的工作。是否有任何其他方式來執行此任務。 – Shilpa