-2

I am working on Tess4j for reading passport. Is there any function to recognise only part of passport image such as Name, Surname etc. Does Tesseract supports zonal OCR? How can I achieve this task using Tesseract? Give me some suggestions on it.

4

1 回答 1

2

我们可以向 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);

结果将为我们提供从矩形区域识别的字符

希望对你有帮助

于 2016-10-22T05:46:36.863 回答